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

Merge pull request #11061 from bitromortac/2604-bolt12-1f

Public commit record

What the developer wrote

Authored by Yong

73/100 · Adequate
Merge pull request #11061 from bitromortac/2604-bolt12-1f

bolt12: add Merkle tree and BIP-340 message signatures
✓ Specific, 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 the missing cryptographic signature layer for BOLT 12 offers in LND. It builds a Merkle tree from the message fields, signs that tree with a BIP-340 Schnorr signature, and now rejects invoice requests and invoices whose signatures do not verify. It also tightens decoding so non-minimal encodings of feature bits and amounts are rejected, preventing a message from being accepted in one form but re-encoded into a different byte form that would break the signature.

Recommended action

Review the Merkle leaf encoding path for any field that does not round-trip byte-exactly (especially custom/experimental TLVs and amount types), confirm that all production call sites now invoke VerifyInvoiceRequest/VerifyInvoice or ValidateInvoiceRequestRead/ValidateInvoiceRead, and run the new spec-vector tests before release.

Security signals we found

01

Adds BIP-340 Schnorr signature verification for BOLT 12 invoice_request and invoice messages

02

Merkle tree commits to canonical re-encoded TLV records; non-minimal feature/amount encodings now rejected to preserve byte-exactness

03

Signature TLV type 240 and reserved range 240-1000 excluded from the signed Merkle root

04

Reader validation now rejects missing or invalid signatures instead of only checking presence

05

Extensive test coverage including spec vectors, tampering tests, nil-key guards, and order-sensitivity property tests

Risk score

Why this scored 34/100

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