mirror of
https://github.com/bitcoin/bips.git
synced 2025-05-12 12:03:29 +00:00
BIP151: Clarifications on AAD and sequence numbers.
This commit is contained in:
parent
2ac0b472da
commit
f388fef2f6
@ -123,12 +123,14 @@ After a successful <code>encinit</code>/<code>encack</code> interaction from bot
|
|||||||
|
|
||||||
Encrypted messages do not have the 4byte network magic.
|
Encrypted messages do not have the 4byte network magic.
|
||||||
|
|
||||||
|
The ciphertext payload length must be included in the AEAD MAC as AAD.
|
||||||
|
|
||||||
The maximum message length needs to be chosen carefully. The 4 byte length field can lead to a required message buffer of 4 GiB.
|
The maximum message length needs to be chosen carefully. The 4 byte length field can lead to a required message buffer of 4 GiB.
|
||||||
Processing the message before the authentication succeeds must not be done.
|
Processing the message before the authentication succeeds must not be done.
|
||||||
|
|
||||||
The 4byte sha256 checksum is no longer required because the AEAD.
|
The 4byte sha256 checksum is no longer required because the AEAD.
|
||||||
|
|
||||||
Both peers need to track the message number (int64) of sent messages to the remote peer for building a symmetric cipher IV. Padding might be required (96bit IVs).
|
Both peers need to track the message sequence number (uint32) of sent messages to the remote peer for building a 64 bit symmetric cipher IV. Sequence numbers are allowed to overflow to zero after 4294967295 (2^32-1).
|
||||||
|
|
||||||
The encrypted payload will result decrypted in one or many unencrypted messages:
|
The encrypted payload will result decrypted in one or many unencrypted messages:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user