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

hsmd/libhsmd: add BIP86 base-key

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

68/100 · Adequate
hsmd/libhsmd: add BIP86 base-key

BIP86 wants the full 64-byte BIP32 seed (from BIP39). This wires up BIP86
support so the HSM derives the hardened base m/86'/0'/0' inside the box,
and exposes helpers:
• derive_bip86_base_key() // m/86'/0'/0'
• bip86_key(index) // m/86'/0'/0'/0/index

Spoiler: derive_bip86_base_key() and bip86_key() now live in libhsmd.c as they will later be used to check the derived wallet address against hsmd's derivation, this is just to sanity check that we haven't had an accidental bit flip while we have generated this address.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds support for deriving Bitcoin BIP86-style keys inside Core Lightning's Hardware Security Module (HSM) daemon. It introduces two new wire messages that let authorized clients ask the HSM to derive a BIP86 base key and to check whether a public key matches the HSM's own derivation. The commit also adds a new permission bit controlling access to these messages. There is no direct evidence in the commit that this fixes an active vulnerability; it reads as feature work to support a new wallet/key derivation path, with a sanity-check helper to catch accidental derivation mismatches.

Recommended action

Review the new HSM_PERM_DERIVE_BIP86_KEY permission assignments to ensure only trusted clients receive it. Verify that the BIP86 base path (m/86'/0'/0') and final derivation path (m/86'/0'/0'/0/index) match the intended BIP86 specification and network conventions. Confirm that rejecting legacy 32-byte HSM secrets is acceptable for deployments. Treat as feature code, not an urgent security patch, unless additional context emerges.

Security signals we found

01

New HSM capability/permission bit added (HSM_PERM_DERIVE_BIP86_KEY)

02

New wire messages guarded by capability check in hsmd_check_client_capabilities

03

HSM aborts on derivation mismatch (status_failed STATUS_FAIL_INTERNAL_ERROR)

04

Requires 64-byte mnemonic-based BIP32 seed; rejects legacy 32-byte secrets

05

BIP86 derivation path uses hardcoded m/86'/0'/0' base and non-hardened 0/index final path

06

No explicit security relevance, CVE, or bug-fix framing in commit message

Risk score

Why this scored 33/100

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