mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Include the frame number in the header.
This ensures the frame number is covered by the MAC, cleanly separating encryption from authentication (previously we depended on the encryption layer to garble frames if they were reordered).
This commit is contained in:
@@ -7,6 +7,9 @@ public interface TransportConstants {
|
||||
*/
|
||||
static final int MAX_FRAME_LENGTH = 65536; // 2^16, 64 KiB
|
||||
|
||||
/** The length of the frame header in bytes. */
|
||||
static final int FRAME_HEADER_LENGTH = 8;
|
||||
|
||||
/**
|
||||
* The length in bytes of the pseudo-random tag that uniquely identifies a
|
||||
* connection.
|
||||
|
||||
Reference in New Issue
Block a user