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

hsmd_wire: remove hsmd_derive_bip86_key and add it to hsmd_init_reply_v4

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

73/100 · Adequate
hsmd_wire: remove hsmd_derive_bip86_key and add it to hsmd_init_reply_v4

Instead of having a separate field to derive the bip86 base key, we return it in the hsmd init reply once we know that the hsm_secret is of mnemonic type
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit refactors how Core Lightning's Hardware Security Module (HSM) provides a BIP86 base key. Previously, the main daemon asked the HSM for the key via a separate request after initialization. Now, the HSM includes the key directly in its initialization reply when the secret is mnemonic-based. This is a design cleanup that reduces the number of HSM messages and removes a dedicated key-derivation wire command. There is no direct evidence in the commit that this fixes an active security vulnerability, but it does reduce the attack surface by removing one HSM interface that exposed a sensitive extended key.

Recommended action

Treat as a defensive hardening/cleanup change. Reviewers should verify that the bip86_base TLV is only populated for mnemonic-based HSM secrets, that legacy secrets do not receive the key, and that no other code paths still expect the removed WIRE_HSMD_DERIVE_BIP86_KEY message. No immediate incident response is indicated absent additional disclosure context.

Security signals we found

01

Removal of an HSM wire command that returned a sensitive extended key (BIP86 base)

02

Reduction in number of synchronous HSM round-trips that expose key material

03

TLV-based key delivery tied to mnemonic secret type, reducing unconditional exposure

04

Simplification of P2TR UTXO key derivation logic, removing scriptPubkey probing

Risk score

Why this scored 29/100

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