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

sign_tx: Strengthen liquid commitment checks against the tx being signed

Public commit record

What the developer wrote

Authored by Jon Griffiths

83/100 · Strong
sign_tx: Strengthen liquid commitment checks against the tx being signed

This change ensures that the transaction and any commitment values
match, if an asset/value commitment pair are given.

Commitments given as part of tx input data must have these fields, while
they are optional (and should be discouraged) for tx outputs.

We move the validation checking which was spread over several unrelated
areas into the function fetching the commitment data. This ensures that
when fetching it, it is either fully validated from that point on or an
error is returned.

Following this we remove the commitment fields from the commitment_t struct
since they are now redundant for the remainder of sign_tx processing.

From experience debugging tests where the commitments mismatched, the
old error messages were not helpful. Update these to include 'trusted
commitment' in all messages to make it clearer when a mismatch is
detected.

Note This commit is deliberately minimal to make the core logic changes
easier to review.
✓ 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 hardens how Blockstream Jade validates confidential (blinded) transaction data on Liquid. It moves and strengthens checks so that any asset/value commitment pair supplied by the caller must match the transaction actually being signed, and it removes redundant commitment fields from an internal data structure. The change is defensive: it reduces the chance that a malicious or buggy host could trick the hardware wallet into signing a transaction with mismatched blinding data.

Recommended action

Review the refactored validation logic for completeness, especially the SPIRAM-gated explicit proof verification and the handling of partial commitment fields. Run the updated test_jade.py bad-commitment test vectors to confirm all expected rejections still occur. Consider whether any caller still relies on the removed verify_commitment_consistent() symbol.

Security signals we found

01

Strengthens validation of asset/value commitment pairs against the transaction being signed

02

Makes input commitments mandatory and output commitments optional-but-matched

03

Centralizes commitment validation in get_commitment_data() to reduce inconsistent validation paths

04

Removes redundant commitment fields from commitment_t to prevent use of unvalidated data later

05

Improves error messages to clarify 'trusted commitment' mismatches

Risk score

Why this scored 59/100

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