mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Final crypto changes for BTPv2. #111
Use BLAKE2s to generate tags. KDF arguments for key rotation. Frame IV format.
This commit is contained in:
@@ -8,12 +8,12 @@ public interface TransportConstants {
|
||||
/** The length of the pseudo-random tag in bytes. */
|
||||
int TAG_LENGTH = 16;
|
||||
|
||||
/** The length of the stream header IV in bytes. */
|
||||
int STREAM_HEADER_IV_LENGTH = 24;
|
||||
|
||||
/** The length of the message authentication code (MAC) in bytes. */
|
||||
int MAC_LENGTH = 16;
|
||||
|
||||
/** The length of the stream header initialisation vector (IV) in bytes. */
|
||||
int STREAM_HEADER_IV_LENGTH = 24;
|
||||
|
||||
/** The length of the stream header in bytes. */
|
||||
int STREAM_HEADER_LENGTH = STREAM_HEADER_IV_LENGTH + SecretKey.LENGTH
|
||||
+ MAC_LENGTH;
|
||||
@@ -21,8 +21,11 @@ public interface TransportConstants {
|
||||
/** The length of the frame initalisation vector (IV) in bytes. */
|
||||
int FRAME_IV_LENGTH = 24;
|
||||
|
||||
/** The length of the frame header payload in bytes. */
|
||||
int FRAME_HEADER_PAYLOAD_LENGTH = 4;
|
||||
|
||||
/** The length of the frame header in bytes. */
|
||||
int FRAME_HEADER_LENGTH = 4 + MAC_LENGTH;
|
||||
int FRAME_HEADER_LENGTH = FRAME_HEADER_PAYLOAD_LENGTH + MAC_LENGTH;
|
||||
|
||||
/** The maximum length of a frame in bytes, including the header and MAC. */
|
||||
int MAX_FRAME_LENGTH = 1024;
|
||||
|
||||
Reference in New Issue
Block a user