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

Verify the pubnonce in the PSBT during round 2 of MuSig2

Public commit record

What the developer wrote

Authored by Salvatore Ingala

88/100 · Strong
Verify the pubnonce in the PSBT during round 2 of MuSig2

doc/musig.md (following BIP-327) prescribes that round 2 verifies that
the pubnonce contained in the psbt matches the one synthetically
recomputed, but the check was missing.

Without this check, the signer would produce an (invalid) partial
signature, and other cosigners would identify this signer as the disruptive one.

Added the check, and a test to validate that the signer fails as expected
if provided with a mismatching pubnonce at the beginning of Round 2.

This check also replaces the guarantee that used to come from having the
transaction in the psbt_session_id: rather than approximating "same
transaction", it directly verifies "these are the nonces of the session I
am about to use", which is the property that actually matters.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a missing safety check in the Ledger Bitcoin app when using the MuSig2 multi-signature protocol. During round 2 of signing, the app now verifies that the public nonce in the PSBT (the data file used to coordinate signing) matches the nonce the device itself generated earlier. Without this check, the device could produce a partial signature that doesn't match what other signers expect, making the final combined signature invalid and causing other participants to blame this device as the 'disruptive signer.' The fix prevents that by failing cleanly instead of producing a bad signature.

Recommended action

Treat this as a security-hardening fix for a functional bug with denial-of-reputation / multi-party disruption implications. Review whether prior firmware versions could be induced to emit invalid partial signatures through stale or swapped MuSig2 sessions, and consider whether a security advisory is warranted for users relying on MuSig2.

Security signals we found

01

Missing input validation in cryptographic signing path

02

MuSig2 nonce mismatch could produce invalid aggregate signature

03

Device could be falsely identified as disruptive signer per BIP-327

04

Fix adds explicit memcmp verification before partial signature generation

05

Regression test added for wrong-pubnonce rejection path

06

Secret nonce zeroized on failure path

Risk score

Why this scored 60/100

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