mirror of
https://github.com/lightning/bolts.git
synced 2025-02-22 22:25:42 +01:00
BOLT 8: Nonces should be little-endian, 64 bit.
This follows the Noise spec. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
856331e347
commit
fcc93d480a
1 changed files with 3 additions and 2 deletions
|
@ -138,13 +138,14 @@ The following functions will also be referenced:
|
|||
|
||||
* `encryptWithAD(k, n, ad, plaintext)`: outputs `encrypt(k, n, ad, plaintext)`
|
||||
* where `encrypt` is an evaluation of `ChaCha20-Poly1305` (IETF variant) with the passed
|
||||
arguments, with nonce `n` encoded as a big-endian 96-bit value.
|
||||
arguments, with nonce `n` encoded as 32 zero bits followed by a *little-endian* 64-bit value (this
|
||||
follows the Noise Protocol convention, rather than our normal endian).
|
||||
|
||||
|
||||
|
||||
* `decryptWithAD(k, n, ad, ciphertext)`: outputs `decrypt(k, n, ad, ciphertext)`
|
||||
* where `decrypt` is an evaluation of `ChaCha20-Poly1305` (IETF variant) with the passed
|
||||
arguments, with nonce `n` encoded as a big-endian 96-bit value.
|
||||
arguments, with nonce `n` encoded as 32 zero bits followed by a *little-endian* 64-bit value.
|
||||
|
||||
* `generateKey()`
|
||||
* where generateKey generates and returns a fresh `secp256k1` keypair
|
||||
|
|
Loading…
Add table
Reference in a new issue