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

lightning: derive local channel keys instead of storing them (see #4909)

Public commit record

What the developer wrote

Authored by ThomasV

81/100 · Strong
lightning: derive local channel keys instead of storing them (see #4909)

Keep only pubkeys in LocalConfig. Privkeys and per_commitment_secret_seed
are removed; they are re-derived from channel_seed on startup, and checked
against the pubkeys. Secrets (channel_seed, multisig privkey) and
funding_locked_received are moved to channel storage.

WalletDB conversion 73->74.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit refactors how Electrum stores Lightning channel keys. Instead of keeping private keys inside the channel configuration object that gets saved to disk, it now keeps only public keys there and re-derives the private keys from a channel seed when the wallet starts up. The goal is to reduce the amount of secret material sitting in persisted channel data. It also adds a wallet database upgrade that strips old private keys from existing wallets and moves the remaining secrets into the channel storage. This is a defensive hardening change, not a fix for an active exploit.

Recommended action

Review the upgrade conversion path for edge cases where stored keys do not match derived keys, ensure the new ChannelKeys derivation is deterministic and tested across channel backup restoration, and verify that no private key fields remain serialized in LocalConfig. Users should upgrade to a version containing this change once it is released.

Security signals we found

01

Reduction of persisted secret material in channel config objects

02

New key-derivation path with pubkey verification on channel load

03

Wallet database migration that removes old private key fields from existing storage

04

Explicit check that derived keys match stored pubkeys during upgrade and at runtime

05

Payment basepoint private key for anchor channels derived from static wallet secret plus funding pubkey nonce

Risk score

Why this scored 31/100

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