BP-WG / bp-std

Modern & lightweight implementation of bitcoin standards without rust-bitcoin/miniscript dependencies
Apache License 2.0
16 stars 17 forks source link

cannot create XpubDerivable from a non-hardened derivation path #16

Closed nicbus closed 7 months ago

nicbus commented 7 months ago

Trying to build a XpubDerivable (to then build a RgbDescr) I get the following error:

DerivationPath(InvalidIndex("84/1/0", HardenedRequired("84")))

Using RGB v0.10 there was no problem using a normal (non-hardened) derivation path. Why is it not supported by bp-std/derive?

dr-orlovsky commented 7 months ago

Since it is a non-standard (and insecure) to use non-hardened derivation path.

In RGB v0.10 we were using rust-bitcoin, which allows doing non-secure things.

With the move to the BP library this has changed: the API prevents you from doing non-standard tricks - or you need to write your own custom code using traits from there if you know why you are actually doing something non-secure.

dr-orlovsky commented 7 months ago

@nicbus can I close this issue?

nicbus commented 7 months ago

it makes sense to me, thanks for the clarification