From 675a899d114a247a6f1ee5e8aa44cd73febb1293 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 12 Sep 2018 15:22:30 +0200 Subject: [PATCH] No need to provison for the tag if we are below SIZE_MAX --- src/libsodium/include/sodium/crypto_aead_aes256gcm.h | 2 +- src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/crypto_aead_aes256gcm.h b/src/libsodium/include/sodium/crypto_aead_aes256gcm.h index 46a3800f..5e67aa99 100644 --- a/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +++ b/src/libsodium/include/sodium/crypto_aead_aes256gcm.h @@ -52,7 +52,7 @@ size_t crypto_aead_aes256gcm_abytes(void); #define crypto_aead_aes256gcm_MESSAGEBYTES_MAX \ SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aes256gcm_ABYTES, \ - (16ULL * ((1ULL << 32) - 2ULL)) - crypto_aead_aes256gcm_ABYTES) + (16ULL * ((1ULL << 32) - 2ULL))) SODIUM_EXPORT size_t crypto_aead_aes256gcm_messagebytes_max(void); diff --git a/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h b/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h index b6e04851..8ab31243 100644 --- a/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +++ b/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h @@ -32,7 +32,7 @@ size_t crypto_aead_chacha20poly1305_ietf_abytes(void); #define crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX \ SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ietf_ABYTES, \ - (64ULL * ((1ULL << 32) - 1ULL)) - crypto_aead_chacha20poly1305_ietf_ABYTES) + (64ULL * ((1ULL << 32) - 1ULL))) SODIUM_EXPORT size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void);