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

Show cleartext representation of wallet policy, when possible

Public commit record

What the developer wrote

Authored by Salvatore Ingala

83/100 · Strong
Show cleartext representation of wallet policy, when possible

Wires the cleartext engine into the register-wallet flow: the handler
computes the confusion score and, when below the threshold, renders the
cleartext spending-path lines shown before the raw descriptor template.

For multisig wallet policies specifically, this also simplifies the UX by
omitting the raw descriptor template altogether. This is safe for such
simple policies, with very little ambiguity. In the long term, we might be
able to extend this to more complex wallet policies, but that needs to be
done intentionally, and possibly be an opt-in feature that is explicitly
requested by software wallets that adapt their own UX accordingly.

Unit tests of register_wallet had to be adapted slightly to take into
account that the descriptor is not always shown.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit changes how Ledger devices display Bitcoin wallet policies during setup. Instead of always showing the raw technical descriptor, it tries to show a human-readable summary ("cleartext") of the spending rules. For simple multisig wallets, it hides the raw descriptor entirely because the plain-English summary is considered unambiguous. This is a UX improvement, not a fix for a known vulnerability, but it touches security-critical user confirmation code.

Recommended action

Review the cleartext engine (common/cleartext.h and its implementation) to confirm the confusion-score threshold and classification logic cannot be bypassed or misclassify ambiguous descriptors as simple multisig. Ensure that hiding the raw descriptor does not allow a malicious software wallet to register a policy whose cleartext summary is misleading. Consider whether descriptor_hidden should require explicit user opt-in for complex policies.

Security signals we found

01

UI confirmation flow modified for wallet policy registration

02

Raw descriptor template hidden for simple multisig policies

03

New dependency on cleartext classification/confusion-score engine

04

Bounds assertions added for cleartext line count

05

No cryptographic, parsing, or memory-safety bug visible in diff

Risk score

Why this scored 22/100

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