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

common: follow BOLT 4 requirements to make decryption constant time.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
common: follow BOLT 4 requirements to make decryption constant time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Protocol: use BOLT4's paranoid advice about doing constant-time error decryption.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change fixes a privacy weakness in how Core Lightning processes returned error messages from the Lightning network routing protocol. Previously, the software stopped decrypting as soon as it found the error's origin, which could let a malicious routing node figure out its position in the payment path by measuring how quickly the sender reacted. The patch now always performs 27 decryption rounds and uses dummy keys after the real origin is found, following the BOLT 4 specification's 'paranoid' advice to make the process take the same amount of time regardless of where the failure occurred.

Recommended action

Apply the patch. No immediate incident response is required, but operators running nodes that process multi-hop payments should upgrade to prevent route-position leakage via timing analysis. Review related Sphinx/onion handling code for other early-exit timing discrepancies.

Security signals we found

01

Timing side-channel mitigation in cryptographic error handling

02

Constant-time / fixed-iteration decryption loop

03

Dummy secret substitution for out-of-range hops

04

Removal of early-break on HMAC validation success

05

Explicit reference to BOLT 4 paranoid requirements

06

Privacy protection for payment sender route position

Risk score

Why this scored 67/100

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