Bitcoin

Why do PSBT and descriptors force the root to provide a BIP32 derived path?

There is no such requirement. Any key in the derivation path is the master key for all descendants derived from the derivation path. Making xprv2 the master key within a descriptor or PSBT is not easy. Even if there were a requirement to use an actual master key, there would be no way to enforce this unless the signer knew all possible derived descendants and their paths. Other signers and generic software cannot enforce such restrictions at all.

The purpose of including the derivation path is to allow a signer holding the master key to use BIP 32 and sign for descendants for which the derivation path is unknown. If the master key is actually a subkey of another key, the PSBT and any descriptors can only contain paths related to that key. The fact that you’re not a “master” doesn’t matter. Any key can be a master key and is not special.

Are both paths (m/99/88h/0/0 and 99/88h/0/0) considered valid? I have observed both in several PSBTs generated by different libraries.

Yes, and they are not distinct. Within PSBT m It’s not actually saved. This may not be useful information to the computer, but it is useful information to the user. So depending on the software m May be prepended when displaying. But in reality it doesn’t exist.

If the answer to the above question is yes, then what is the purpose of master key marker ‘m’?

Indicates to the user to visually distinguish that they are actually looking at a derivation path and that the key is derived from some master key. It’s just a notation and not meaningfully useful.

Related Articles

Back to top button