AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 32 Bitcoin

Merge bitcoin-core/HWI#842: Add `registerdescriptors` command for registering a descriptor with a device

Public commit record

What the developer wrote

Authored by Ava Chow

91/100 · Strong
Merge bitcoin-core/HWI#842: Add `registerdescriptors` command for registering a descriptor with a device

50f5781e70552cca094cba23d0d301f46d364306 test: Add basic test for register_descriptor (Ava Chow)
8fc30319af2fc7f20417be594164f73c596723ad jade: Implement register_descriptor (Ava Chow)
3fc07a6ced1aa1c43d8265ef245c303b5cd385b9 coldcard: Implement register_descriptor (Ava Chow)
9f91e1a61c10ed13782407eac7a0bfb67933d2e2 bitbox02: Implement register_descriptor (Ava Chow)
1d6361bb32332eabcc78862bbcdc0de8e7c504e5 ledger: Implement register_descriptor (Ava Chow)
24ca3c64536b5ff71639b6dab614803edf4c8432 Implement register_descriptors for devices that don't support it (Ava Chow)
da7aa3f32178b1028069d71dfbc45fb070ded063 CLI command and boilerplate for registerdescriptor (Ava Chow)
875d7b6ee4142d9b57c90417ef768b0b80f1b934 descriptor: Add RegisteredDescriptor for holding registration data (Ava Chow)
50a6e78dd6e5dc39bbf964fa52f22f07f9c24ba4 descriptor: Add functions for making BIP 388 wallet policies (Ava Chow)
3cfc210e6fb2f28b37eaad527d96f1932f9da9ab descriptor: Parse multipath path specifiers (Ava Chow)
e2bd86e88c736e51dc36b6ad7c1de2baae37e78e descriptors: Actually parse the derivation path (Ava Chow)
1f5d85a4f3b520983cf1d646b2481bf82d3a80cf descriptor: Track key expression index (Ava Chow)
447991ffcbdeb05762ae81a2e20d204ec0d0c72d descriptor: Don't sort PubkeyProviders in sortedmulti (Ava Chow)

Pull request description:

The Ledger, BitBox02, Jade, and Coldcard all support registering descriptors with the device to enable signing txs involving complex scripts. This PR adds a `registerdescriptor` command which takes a name and the descriptor to register. The command returns a `registration` which may contain data that must be provided to the device at a later time to remind it of the registered descriptor.

For the BiBox02, Jade, and Coldcard, this command returns an empty string for the registration as these devices store the registration and do not need a reminder.

For the Ledger, the `registration` is the HMAC that the device returns.

Some devices take a descriptor, others take a BIP 388 policy that is stuffed into their protocol. The `Descriptor` and `PubkeyProvider` classes are modified to allow produce BIP 388 compatible strings that can be provided as needed.

Each device does different validation of the descriptor it is provided. We will not do any validation - the user may provide a descriptor that a device refuses to register and any such registration errors will be propagated from the device.

The test case includes a descriptor that should work on all devices.

ACKs for top commit:
Sjors:
re-ACK 50f5781e70552cca094cba23d0d301f46d364306

Tree-SHA512: d4b15c7a94f4045d66c9604e1eaa9a2f94514322a0014ec32b60d8beddb7b2269d639cfddc6c1db28304d384b9f06e66e6e8dd6a3a546810b673e3f37c8bcf4a
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit adds a new command called `registerdescriptor` to the HWI tool, which lets users register Bitcoin output descriptors with supported hardware wallets (Ledger, BitBox02, Jade, Coldcard). It also rewrites how descriptors are parsed and stored internally to support newer multi-path descriptor formats and to convert descriptors into BIP 388 wallet policies where needed. The change is a feature addition, not a bug fix, and the commit message and code do not describe any security vulnerability. The main security-relevant aspect is that the tool now passes user-supplied descriptors directly to the device without extra validation, relying on each device's own checks.

Recommended action

Treat this as a routine feature merge, not a security patch. Reviewers should focus on whether the new descriptor parsing and BIP 388 conversion correctly preserve semantics for all descriptor types, whether the `registerdescriptor` command properly handles malformed or malicious descriptors, and whether the `RegisteredDescriptor` serialization format is robust. Because the commit explicitly states that no validation is performed, downstream users should ensure they only register descriptors they trust and that their hardware wallet firmware performs adequate checks.

Security signals we found

01

New command registers user-supplied descriptors with hardware wallets

02

HWI explicitly does not validate descriptors before passing them to the device; device errors are propagated

03

Descriptor parser changed from string-based derivation paths to structured list-of-lists, affecting all descriptor handling

04

sortedmulti no longer sorts pubkeys at construction time

05

BIP 388 policy conversion added for Ledger, BitBox02, and Jade

06

RegisteredDescriptor serialization uses a custom binary format with base64 encoding and version check

07

No CVE, advisory, or vendor security statement present in the supplied materials

Risk score

Why this scored 32/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.