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

lightning-hsmtool: support extracting the mnemonic from hsm_secret.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
lightning-hsmtool: support extracting the mnemonic from hsm_secret.

We cannot use the codex32 or raw hex for recovery of 25.12 nodes,
since they will then use the incorrect derivation for all paths, and
be unable to spend (or even find!) their funds.

So implement `getsecret` to replace `getcodexsecret`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: `lightning-hsmtool`: `getsecret` replaces `getcodexsecret` for modern nodes (gives mnemonic).
Changelog-Deprecated: `lightning-hsmtool`: `getcodexsecret`. Use `getsecret`.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit updates the Core Lightning wallet recovery tool so it can extract the correct backup phrase (mnemonic) used by newer nodes. The old command only produced a codex32 string, which would cause v25.12+ nodes to derive the wrong keys and potentially be unable to find or spend funds during recovery. There is no vulnerability being fixed; it is a usability and correctness improvement for wallet backups.

Recommended action

No urgent action. Operators should prefer `lightning-hsmtool getsecret` for backups on v25.12+ nodes and update any scripts still using `getcodexsecret`.

Security signals we found

01

Incorrect backup/recovery format could lead to inaccessible funds

02

Deprecation of legacy command that does not work with modern secret storage

03

Tool now rejects use of old command on mnemonic-format secrets

Risk score

Why this scored 20/100

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