Skip to content

Commit 35909ba

Browse files
committed
cryptomsg: wording fix with update to latest BOLT.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent f7cc079 commit 35909ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightningd/cryptomsg.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ struct io_plan *peer_write_message(struct io_conn *conn,
229229
*
230230
* * Encrypt `l` using `ChaChaPoly-1305`, `sn`, and `sk` to obtain `lc`
231231
* (`18-bytes`)
232-
* * The nonce `sn` is encoded as a 96-bit big-endian number.
232+
* * 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.
233235
* * The nonce `sn` MUST be incremented after this step.
234236
* * A zero-length byte slice is to be passed as the AD
235237
*/

0 commit comments

Comments
 (0)