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

hsmd: use the new mnemonic-compatible hsm_secret routines.

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

73/100 · Adequate
hsmd: use the new mnemonic-compatible hsm_secret routines.

Changelog-Changed: hsmd: New nodes will now be created with a BIP-39 12-word phrase as their root secret.
Changelog-Deprecated: config: `encrypted-hsm` to require a passphrase (use `hsm-passphrase`).
Changelog-Added: config: `hsm-passphrase` indicates we should use a manual passphrase with the hsm secret.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how Core Lightning's Hardware Security Module daemon (hsmd) creates and stores the master secret for new nodes. Instead of a raw 32-byte random secret (optionally encrypted with a password-derived key), new nodes now get a 12-word BIP-39 mnemonic phrase as their root secret, with an optional passphrase. The old --encrypted-hsm option is deprecated in favor of --hsm-passphrase. The change is a feature redesign of key storage, not a fix for a known exploitable bug, but it touches critical cryptographic material and removes legacy encrypted-secret handling.

Recommended action

Review the new common/hsm_secret.h implementation (not shown in the diff) for correct BIP-39 entropy generation, passphrase handling, memory zeroization, and error handling. Verify that legacy encrypted hsm_secret files are still supported for existing users or that migration guidance is documented. Audit the new hsmd_init_reply_failure path for memory safety and ensure the old --encrypted-hsm deprecation window is clearly communicated.

Security signals we found

01

Change to root secret storage format and derivation

02

Deprecation of encrypted-hsm in favor of hsm-passphrase

03

Removal of legacy encrypted hsm_secret upgrade path

04

Addition of hsmd_init_reply_failure error reporting

05

Use of BIP-39 mnemonic + optional passphrase for new nodes

06

Memory locking of hsm_secret.secret.data with sodium_mlock retained

Risk score

Why this scored 33/100

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