diff options
Diffstat (limited to 'ncrypt.h')
-rw-r--r-- | ncrypt.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -11,9 +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) -#define NCRYPT_PACKET_MIN_SIZE (NCRYPT_PACKET_OVERHEAD + NETWORK_BUFFER_LENGTH_DIGITS + 3 /* "{}\n" */) struct aes { @@ -25,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; @@ -39,6 +41,7 @@ struct ncrypt { void * libctx; const char * propq; + void * private_key; unsigned char shared_secret[NCRYPT_X25519_KEYLEN]; struct peer * peers; }; |