move some constants to bravais_internal.h

This commit is contained in:
2026-10-31 14:52:59 +01:00
parent 252bcdee85
commit a4f37e3b87
2 changed files with 17 additions and 14 deletions
+17
View File
@@ -1,4 +1,21 @@
#ifndef BRAVAIS_INTERNAL_H
#define BRAVAIS_INTERNAL_H
#include "bravais.h"
#define BRAVAIS_CID_LENGTH 8
#define BRAVAIS_NONCE_LENGTH 12
#define BRAVAIS_AEAD_TAG_LENGTH 16 // Poly1305 and GCM alike
#define BRAVAIS_CHACHA20_POLY1305_KEY_LENGTH 32
#define BRAVAIS_QUIC_INITIAL_KEY_LENGTH 16 // AES-128-GCM
#define BRAVAIS_QUIC_INITIAL_IV_LENGTH 12 // XORed with the packet number
#define BRAVAIS_QUIC_HP_KEY_LENGTH 16 // AES-128-ECB header protection
#define BRAVAIS_QUIC_HP_SAMPLE_LENGTH 16
#define BRAVAIS_ML_KEM_768_PUBLIC_KEY_LENGTH 1184 // encapsulation key
#define BRAVAIS_ML_KEM_768_PRIVATE_KEY_LENGTH 2400 // decapsulation key, expanded
#define BRAVAIS_ML_KEM_768_SEED_LENGTH 64 // d || z, expands to the private key
#define BRAVAIS_ML_KEM_768_CIPHERTEXT_LENGTH 1088
#define BRAVAIS_ML_KEM_768_SHARED_SECRET_LENGTH 32
#endif // BRAVAIS_INTERNAL_H