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

Merge pull request #536 from LedgerHQ/bip322

Public commit record

What the developer wrote

Authored by Salvatore Ingala

68/100 · Adequate
Merge pull request #536 from LedgerHQ/bip322

BIP-322 v2.0.0 signed messages and proofs of reserves
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit adds a new feature to the Ledger Bitcoin app: support for BIP-322 generic signed messages and proof-of-funds. It lets users sign messages and prove ownership of coins through a PSBT, with on-screen review. The change is a feature addition, not a documented security fix, but it touches sensitive signing code and introduces new validation rules that could affect app safety if implemented incorrectly.

Recommended action

Treat this as a high-priority feature review. Audit validate_bip322_request() for bypasses of the to_spend binding, ensure the message stream cannot be altered between the hashing and display passes, verify that proof-of-funds amount aggregation cannot include external inputs, and run the new unit/integration tests on all target devices. Consider a security review before release because it changes how the app interprets PSBTs and produces signatures.

Security signals we found

01

New signing path added to SIGN_PSBT handler

02

On-device recomputation of to_spend txid binds signature to displayed message

03

Rejects non-default sighashes, external inputs, timelocks, and Exchange/swap context

04

Exempts BIP-322 virtual to_spend input from missing non-witness-UTXO warning

05

Adds new error codes for BIP-322 structural/safety failures

06

Large diff (+3,049/-151) across signing, UI, tests, and generated vectors

Risk score

Why this scored 35/100

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