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

Merge bitcoin-core/HWI#792: Optionally pass BIP388 policy to signtx

Public commit record

What the developer wrote

Authored by Ava Chow

91/100 · Strong
Merge bitcoin-core/HWI#792: Optionally pass BIP388 policy to signtx

97c13f1e99384816518a48095e59a8a1f9468d7a test: navigate Ledger transaction review screens (Sjors Provoost)
4ca5396e7f794fe5bef3e2c65257ceb23dc3df32 test: dismiss Ledger completion screens (Sjors Provoost)
e0b2b836236e7978bcdeb7aa2097ec44791fae5b test: sign with multiple registered descriptors (Sjors Provoost)
5642ebdda3d0d836039c6bca8bd4631774e46993 test: sign with registered descriptors (Sjors Provoost)
adc8ccb3a9644f5b179ee40aafbd273a87fa9142 test: extract PSBT helpers (Sjors Provoost)
a76f344799d659442e5d2ce3ce92f210a0d85408 bitbox02: support BIP388 policy signing (Sjors Provoost)
db189db5271a0fcaee93e36307ff73290efa3ecb jade: support BIP388 policy signing (Sjors Provoost)
7e278f48f82c3276da318cdf16d753b7304e6de9 coldcard: support BIP388 policy signing (Sjors Provoost)
826a2ac5d8d4f9b2b7adb3b98e8a70a393244b59 coldcard: extract transaction signing helpers (Sjors Provoost)
3cc349378aff80936943ddff087b3502eb207346 psbt: detect keys and signatures by fingerprint (Sjors Provoost)
ac80a37b80a0a8160aa1cfe32362abc2b2b39ebd ledger: support BIP388 policy signing (Sjors Provoost)
b8cecf0e4345b73436fc5fcd85331d9f0a0523c8 descriptor: remove unused script expansion (Sjors Provoost)
db15214dd9227f6dbea80ab5a3deb483392445e7 descriptor: add address type helper (Sjors Provoost)
6f44e48980bf610a57195f43a74027f4dc20e385 signtx: add BIP388 policy support (Sjors Provoost)
dc1f9b42cf9ac251ae980b579b20c6f2d2e934d6 Consistently name sign_tx psbt argument (Sjors Provoost)

Pull request description:

Another step toward #785.

This adds optional registered BIP388 descriptor policy information to
`signtx`. Existing `signtx` usage remains unchanged when no registration
is supplied.

`signtx` accepts `--registration`, containing the serialized
`RegisteredDescriptor` returned by the `registerdescriptor` command from
#842. The registration contains the policy name, descriptor, device type,
and any device-specific registration data, so separate `--policy-desc`
and `--policy-name` arguments are not needed.

Example:

```bash
hwi --device-type ledger signtx \
--registration "cmRlc2M..." \
"cHNidP..."

ACKs for top commit:
achow101:
ACK 97c13f1e99384816518a48095e59a8a1f9468d7a

Tree-SHA512: dd1fc192f06016ade895e4f87d35a7f1b22a01a8e562e3a3d2a4ddcf1da6dd36dd2ad80ac414b339affeab99389c8dee0750e63ac93f38f0fe1ffcb1f4c5ffdd
✓ 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 an optional feature to the HWI tool that lets users pass previously registered Bitcoin wallet policies (BIP388) when signing transactions. It is a feature addition, not a fix for a known vulnerability. The change extends the command-line interface and several hardware wallet backends to accept an optional `--registration` argument during signing. Existing behavior is preserved when the argument is not provided. There is no direct evidence in the commit that this introduces a security bug, but any code that handles cryptographic signing and parses external data deserves careful review.

Recommended action

Review the new registration deserialization path and device-specific policy handling for input-validation issues, but treat this commit as a feature addition rather than an urgent security patch. No immediate action is required unless downstream consumers rely on the new BIP388 flow, in which case they should verify that their hardware wallet firmware supports the feature and that registrations are transmitted securely.

Security signals we found

01

New CLI argument `--registration` is appended to `signtx` and deserialized before being passed to hardware wallet clients

02

Several backends now accept and use `registered_descriptors` during PSBT signing

03

Backends without BIP388 support raise `UnavailableActionError` when registrations are supplied

04

Descriptor parsing logic changed: removed `expand()` script generation, added `get_address_type()`

05

PSBT input helpers added to detect fingerprint presence and signatures

Risk score

Why this scored 29/100

Our methodology →
Potential impact 5/30
Exploitability 4/25
Stealth signal 3/15
Affected reach 6/15
Confidence 7/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.