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

input+signrpc+lnwallet+multi: implement combined nonce support

Public commit record

What the developer wrote

Authored by Elle Mouton

73/100 · Adequate
input+signrpc+lnwallet+multi: implement combined nonce support

Add CombinedNonce() and RegisterCombinedNonce() methods with full implementation
stack.

Interface and core implementation:
- input/musig2.go: Added methods to MuSig2Session and MuSig2Signer interfaces
- input/musig2_session_manager.go: MusigSessionManager implementation using
HaveAllNonces flag for state tracking (simplified, no extra fields)
- internal/musig2v040: Stub implementations returning ErrUnsupportedMethod
- Mock implementations (MockInputSigner, MockSigner, DummySigner)

RPC layer:
- lnrpc/signrpc/signer.proto: RPC method definitions and messages
- lnrpc/signrpc/signer.yaml: REST API endpoint mappings
- Generated protobuf code (all .pb.go files)
- lnwallet/rpcwallet/rpcwallet.go: RPCKeyRing client implementation

The proto types and RPCKeyRing are added together since RPCKeyRing implements
the Signer interface and requires proto types to fulfill the contract.

For v0.4.0, these methods return ErrUnsupportedMethod. Use MuSig2Version100RC2
to access these features.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds new experimental API methods to LND's MuSig2 multi-signature signing system, allowing a coordinator to register an already-aggregated combined nonce instead of each participant registering individual nonces. It is a feature addition, not a fix for a known security bug. The new RPCs are marked highly experimental and only work with the newer MuSig2 v1.0.0rc2 version; the legacy v0.4.0 implementation rejects them.

Recommended action

Treat this as a routine feature commit, not a security patch. Review the final implementation of the v1.0.0rc2 session's RegisterCombinedNonce and CombinedNonce for proper nonce validation, length checks, and mutual-exclusion enforcement before the experimental flag is removed. Ensure RPC authentication/authorization covers the new signer endpoints.

Security signals we found

01

New experimental RPC surface increases attack exposure for the signer service

02

Combined nonce registration bypasses per-nonce validation, relying on caller-provided aggregated nonce correctness

03

No input length validation visible in the diff for the 66-byte combined nonce field

04

Legacy v0.4.0 implementation explicitly returns ErrUnsupportedMethod, reducing risk of accidental misuse

Risk score

Why this scored 20/100

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