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

common: add randbytes() wrapper to override cryptographic entropy: $CLN_DEV_ENTROPY_SEED

Public commit record

What the developer wrote

Authored by Rusty Russell

90/100 · Strong
common: add randbytes() wrapper to override cryptographic entropy: $CLN_DEV_ENTROPY_SEED

Only in developer mode, ofc.

Notes:
1. We have to move the initialization before the lightningd main trace_start,
since that uses pseudorand().
2. To make the results stable, we need to use per-caller values to randbytes().
Otherwise external timing changes the call order.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit adds a developer-only feature that lets programmers override the randomness source used by Core Lightning during testing, via an environment variable. It is explicitly gated behind 'developer mode' and is not intended for production use. The patch itself only updates test build files and adds missing stub functions so unit tests compile with the new wrapper. There is no indication it weakens real network security.

Recommended action

Verify that the new $CLN_DEV_ENTROPY_SEED override is strictly disabled in release/production builds and cannot be compiled in accidentally. Review the randbytes() wrapper implementation (not included in this diff) for proper gating. No urgent action is required for the build/test changes shown.

Security signals we found

01

New cryptographic-randomness override mechanism, but explicitly developer-mode only

02

Environment-variable seeding could reduce entropy if accidentally enabled in production

03

No production code changes visible in the diff

04

Commit message clearly frames feature as testing aid, not security fix or vulnerability

Risk score

Why this scored 18/100

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