|
|
@ -494,7 +494,6 @@ Where `s` is the static public key of the initiator.
|
|
|
|
3. `se = ECDH(s.priv, re)`
|
|
|
|
3. `se = ECDH(s.priv, re)`
|
|
|
|
+
|
|
|
|
+
|
|
|
|
Where `re` is the ephemeral public key of the responder.
|
|
|
|
Where `re` is the ephemeral public key of the responder.
|
|
|
|
[role="pagebreak-before"]
|
|
|
|
|
|
|
|
4. `ck, temp_k3 = HKDF(ck, se)`
|
|
|
|
4. `ck, temp_k3 = HKDF(ck, se)`
|
|
|
|
+
|
|
|
|
+
|
|
|
|
The final intermediate shared secret is mixed into the running chaining key.
|
|
|
|
The final intermediate shared secret is mixed into the running chaining key.
|
|
|
@ -583,6 +582,7 @@ total maximum packet length of pass:[<span>2 + 16 + 65,535 + 16 = 65,569</span>]
|
|
|
|
|
|
|
|
|
|
|
|
====== Encrypting and sending messages
|
|
|
|
====== Encrypting and sending messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[role="pagebreak-after"]
|
|
|
|
To encrypt and send a Lightning message (`m`) to the network stream,
|
|
|
|
To encrypt and send a Lightning message (`m`) to the network stream,
|
|
|
|
given a sending key (`sk`) and a nonce (`sn`), the following steps are
|
|
|
|
given a sending key (`sk`) and a nonce (`sn`), the following steps are
|
|
|
|
completed:
|
|
|
|
completed:
|
|
|
|