<p>While I have experienced the same situation as the person described in the video the information is only partially true. </p>

<p>It is very <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#keys" rel="nofollow noreferrer">well described in BOLT 03 how keys are being derived</a>. The general derivation of the keys you are looking fore is described in this formula:</p>

<blockquote>
  <p>privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)</p>
</blockquote>

<p>so what you can see is that your secret is added with a <code>per_commitment_point</code> which contains information about the channel state. This is done to increase your privacy and is the reason why lightning nodes need the channel state in order to derive the keys from your seed.</p>

CC BY-SA 4.0
2022-06-23T13:05:25.587Z
I understand the need for privacy, but couldn't these keys just have been derived from a hardened path of the usual BIP-32 derivation? I'm sure this is a naive outlook, but what would break or what could not be done if we had all the different  keys attached somehow to one's seed? This would allow the recovery of funds from seed alone, which is pretty attractive.
Bilthon
CC BY-SA 4.0
2019-03-01T13:59:42.257Z
2019-03-01T13:59:42.257Z
Rene Pickhardt
<p>Keys for creating lightning channels seem to be derived differently than in usual bitcoin wallets. Lightning node data corruption, despite backup of master seed phrase, seems to prevent recovery of channel keys. How are channel keys currently derived, and why is recovering these keys with a corrupted node extremely difficult? </p>

<p>This question is in response to #3 of the following video (timestamped) <a href="https://www.youtube.com/watch?v=5fMv8MpzLgQ&amp;feature=youtu.be&amp;t=143" rel="nofollow noreferrer">https://www.youtube.com/watch?v=5fMv8MpzLgQ&amp;feature=youtu.be&amp;t=143</a> </p>

<lightning-network><recover-private-key>
How are keys for lightning channels currently created?
Shaun
# How are keys for lightning channels currently created?

(Asked by: username_0 on 2019-03-01)

Keys for creating lightning channels seem to be derived differently than in usual bitcoin wallets. Lightning node data corruption, despite backup of master seed phrase, seems to prevent recovery of channel keys. How are channel keys currently derived, and why is recovering these keys with a corrupted node extremely difficult?

This question is in response to #3 of the following video (timestamped) <https://www.youtube.com/watch?v=5fMv8MpzLgQ&feature=youtu.be&t=143>

**Tags:** lightning-network, recover-private-key


---

## 1 answers

### Answer by username_1 on 2019-03-01. Score: 3 | Accepted answer

While I have experienced the same situation as the person described in the video the information is only partially true.

It is very [well described in BOLT 03 how keys are being derived](https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#keys). The general derivation of the keys you are looking fore is described in this formula:

> privkey = basepoint\_secret + SHA256(per\_commitment\_point || basepoint)

so what you can see is that your secret is added with a `per_commitment_point` which contains information about the channel state. This is done to increase your privacy and is the reason why lightning nodes need the channel state in order to derive the keys from your seed.

> **Comments:**
> **username_2**: I understand the need for privacy, but couldn't these keys just have been derived from a hardened path of the usual BIP-32 derivation? I'm sure this is a naive outlook, but what would break or what could not be done if we had all the different  keys attached somehow to one's seed? This would allow the recovery of funds from seed alone, which is pretty attractive.  

---

