mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 01:50:03 +01:00
Change from "Encrypting Messages"/"Decrypting Messages" to "Encrypting and Sending Messages"/"Receiving and Decrypting Messages"
In order to reflect what is actually documented.
This commit is contained in:
parent
c132855d4b
commit
5fe7fc3d62
@ -19,8 +19,8 @@ of a node.
|
|||||||
* [Handshake State Initialization](#handshake-state-initialization)
|
* [Handshake State Initialization](#handshake-state-initialization)
|
||||||
* [Handshake Exchange](#handshake-exchange)
|
* [Handshake Exchange](#handshake-exchange)
|
||||||
* [Lightning Message Specification](#lightning-message-specification)
|
* [Lightning Message Specification](#lightning-message-specification)
|
||||||
* [Encrypting Messages](#encrypting-messages)
|
* [Encrypting and Sending Messages](#encrypting-messages)
|
||||||
* [Decrypting Messages](#decrypting-messages)
|
* [Receiving and Decrypting Messages](#decrypting-messages)
|
||||||
* [Lightning Message Key Rotation](#lightning-message-key-rotation)
|
* [Lightning Message Key Rotation](#lightning-message-key-rotation)
|
||||||
* [Security Considerations](#security-considerations)
|
* [Security Considerations](#security-considerations)
|
||||||
* [Appendix A: Transport Test Vectors](#appendix-a-transport-test-vectors)
|
* [Appendix A: Transport Test Vectors](#appendix-a-transport-test-vectors)
|
||||||
@ -438,10 +438,10 @@ The structure of packets on the wire resembles the following:
|
|||||||
The prefixed message length is encoded as a 2-byte big-endian integer,
|
The prefixed message length is encoded as a 2-byte big-endian integer,
|
||||||
for a total maximum packet length of `2 + 16 + 65535 + 16` = `65569` bytes.
|
for a total maximum packet length of `2 + 16 + 65535 + 16` = `65569` bytes.
|
||||||
|
|
||||||
### Encrypting Messages
|
### Encrypting and Sending Messages
|
||||||
|
|
||||||
In order to encrypt a Lightning message (`m`), given a sending key (`sk`) and a nonce
|
In order to encrypt and send a Lightning message (`m`) to the network stream,
|
||||||
(`sn`), the following is done:
|
given a sending key (`sk`) and a nonce (`sn`), the following is done:
|
||||||
|
|
||||||
1. let `l = len(m)`
|
1. let `l = len(m)`
|
||||||
* where `len` obtains the length in bytes of the Lightning message
|
* where `len` obtains the length in bytes of the Lightning message
|
||||||
@ -459,7 +459,7 @@ In order to encrypt a Lightning message (`m`), given a sending key (`sk`) and a
|
|||||||
5. Send `lc || c` over the network buffer.
|
5. Send `lc || c` over the network buffer.
|
||||||
|
|
||||||
|
|
||||||
### Decrypting Messages
|
### Receiving and Decrypting Messages
|
||||||
|
|
||||||
In order to decrypt the _next_ message in the network stream, the following is
|
In order to decrypt the _next_ message in the network stream, the following is
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user