From dadfcf55f251f9e989eb3181fae68426fad21ea3 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 18 Dec 2015 14:46:49 +1000 Subject: [PATCH] Recommended tag and IV sizes in GCM were backwards --- libraries/Crypto/GCM.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Crypto/GCM.cpp b/libraries/Crypto/GCM.cpp index a18f42d7..537a25db 100644 --- a/libraries/Crypto/GCM.cpp +++ b/libraries/Crypto/GCM.cpp @@ -65,13 +65,13 @@ size_t GCMCommon::keySize() const size_t GCMCommon::ivSize() const { - return 16; + // The GCM specification recommends an IV size of 96 bits. + return 12; } size_t GCMCommon::tagSize() const { - // The GCM specification recommends an IV size of 96 bits. - return 12; + return 16; } bool GCMCommon::setKey(const uint8_t *key, size_t len)