Specify start of extended encryption.

This commit is contained in:
Adam Ierymenko 2024-09-24 10:27:06 -04:00
parent a44fd40889
commit 6faee38395
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
2 changed files with 20 additions and 10 deletions

View file

@ -1005,9 +1005,13 @@ static inline int LZ4_decompress_safe(const char* source, char* dest, int compre
const unsigned char Packet::ZERO_KEY[32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
void Packet::armor(const void *key,bool encryptPayload,const AES aesKeys[2])
void Packet::armor(const void *key,bool encryptPayload,bool extendedArmor,const AES aesKeys[2],const Identity &identity)
{
uint8_t *const data = reinterpret_cast<uint8_t *>(unsafeData());
if (extendedArmor) {
}
if ((aesKeys) && (encryptPayload)) {
setCipher(ZT_PROTO_CIPHER_SUITE__AES_GMAC_SIV);
@ -1066,7 +1070,7 @@ void Packet::armor(const void *key,bool encryptPayload,const AES aesKeys[2])
}
}
bool Packet::dearmor(const void *key,const AES aesKeys[2])
bool Packet::dearmor(const void *key,const AES aesKeys[2],const Identity &identity)
{
uint8_t *const data = reinterpret_cast<uint8_t *>(unsafeData());
const unsigned int payloadLen = size() - ZT_PACKET_IDX_VERB;