Lightning uses different Pubkeys to gain more privacy and security, I am not sure how they are calculated. In BOLT03 it says:

The corresponding private keys can be similarly derived, if the basepoint secrets are known (i.e. the private keys corresponding to localpubkey, local_htlcpubkey, and local_delayedpubkey only):

privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)

I was wondering whether its the same per_commitment_point we use for our local commitment revocation path, which secret later gets reveiled to revoke the local commitment tx.

Meaning that the "to_local" path looks as the following:

    # Penalty transaction

where the local_delayedpubkey is calculated like this:

local_delayedpubkey = basepoint_local_delayedpubkey + SHA256(per_commitment_point || basepoint_local_delayedpubkey) * G

and the revocationpubkey is calculated as follows:

revocationpubkey_local = revocation_basepoint_remote * SHA256(revocation_basepoint_remote || per_commitment_point) + per_commitment_point * SHA256(per_commitment_point || revocation_basepoint_remote)

With both paths using the same per_commitment_point which was created locally or to write it differently:


meaning that when I have to recover from a force close, I always need to not my latest per_commitment_point_local to sweep my "to_local" funds when I broadcast my force close transaction


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.