aboutsummaryrefslogtreecommitdiff
path: root/ncrypt.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-04-21 19:38:45 +0200
committerToni Uhlig <matzeton@googlemail.com>2025-05-28 09:55:59 +0200
commitbf35103b5519e81a3cb3a234816f166bf236d7d7 (patch)
treea740144951dc84d688d68f859cdc65dad5e6b74c /ncrypt.h
parentf4461a9692d11692f048dd3dd86a63b2e19a590d (diff)
Added send packets with type i.e. keyex / json-dataadd/udp-aes256-gcm
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'ncrypt.h')
-rw-r--r--ncrypt.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ncrypt.h b/ncrypt.h
index bd2f00149..344badfcd 100644
--- a/ncrypt.h
+++ b/ncrypt.h
@@ -11,8 +11,6 @@
#define NCRYPT_TAG_SIZE 16
#define NCRYPT_AAD_SIZE 3 // packet type + packet size
#define NCRYPT_BUFFER_SIZE NETWORK_BUFFER_MAX_SIZE
-#define NCRYPT_PACKET_OVERHEAD (NCRYPT_AAD_SIZE + NCRYPT_AES_IVLEN + NCRYPT_TAG_SIZE)
-#define NCRYPT_PACKET_BUFFER_SIZE (NCRYPT_PACKET_OVERHEAD + NCRYPT_BUFFER_SIZE)
struct aes
{
@@ -24,6 +22,11 @@ struct peer
nDPIsrvd_hashkey hash_key;
struct nDPIsrvd_address address;
unsigned char iv[NCRYPT_AES_IVLEN];
+ struct
+ {
+ void * last_private_key;
+ void * current_private_key;
+ } ephemeral;
size_t key_rotations;
size_t cryptions;
size_t crypto_errors;