Skip to content

13.x: do not fulfill BIP32 requests outside descriptor path - #1010

Open
noahjoeris wants to merge 2 commits into
rust-bitcoin:release-13.xfrom
noahjoeris:13.x/get-key-master-xprv-sibling-paths
Open

13.x: do not fulfill BIP32 requests outside descriptor path#1010
noahjoeris wants to merge 2 commits into
rust-bitcoin:release-13.xfrom
noahjoeris:13.x/get-key-master-xprv-sibling-paths

Conversation

@noahjoeris

Copy link
Copy Markdown
Contributor

Backport of #1004.

Fixes bypassing descriptor path validation for GetKey on sibling paths.

Remove the early `Xpriv::get_key` return in `DescriptorSecretKey::get_key`.
That path matched on fingerprint only and ignored derivation path / wildcard,
so a master xprv in e.g. `.../0/*` would sign sibling paths like `.../9/7`.
Rely on `matches()` only.

Assisted-by: Grok 4.5
Regression: master xprv descriptors such as `.../0/*` must not fulfill
`KeyRequest::Bip32` for sibling paths like `.../9/7`.

Assisted-by: Grok 4.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant