We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7cc079 commit 35909baCopy full SHA for 35909ba
lightningd/cryptomsg.c
@@ -229,7 +229,9 @@ struct io_plan *peer_write_message(struct io_conn *conn,
229
*
230
* * Encrypt `l` using `ChaChaPoly-1305`, `sn`, and `sk` to obtain `lc`
231
* (`18-bytes`)
232
- * * The nonce `sn` is encoded as a 96-bit big-endian number.
+ * * The nonce `sn` is encoded as a 96-bit little-endian number.
233
+ * As our decoded nonces a 64-bit, we encode the 96-bit nonce as
234
+ * follows: 32-bits of leading zeroes followed by a 64-bit value.
235
* * The nonce `sn` MUST be incremented after this step.
236
* * A zero-length byte slice is to be passed as the AD
237
*/
0 commit comments