diff options
author | Atanas Filyanov <[email protected]> | 2017-09-15 09:34:09 +0200 |
---|---|---|
committer | Atanas Filyanov <[email protected]> | 2017-09-15 09:34:09 +0200 |
commit | 5185deae57f6cfc71914dbea246d2f4304efab69 (patch) | |
tree | 5cc9b8cb4f91b8b24863b70d838502c83b0b7b23 /src/lib/modes/aead/gcm/gcm.cpp | |
parent | 206091f9bea256e5259bc7dd84323bb0377985d1 (diff) |
reenable 8 byte gcm tags
Diffstat (limited to 'src/lib/modes/aead/gcm/gcm.cpp')
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index 828cc2c42..becd3484b 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -183,7 +183,8 @@ GCM_Mode::GCM_Mode(BlockCipher* cipher, size_t tag_size) : m_ctr.reset(new CTR_BE(cipher, 4)); // CTR_BE takes ownership of cipher /* We allow any of the values 128, 120, 112, 104, or 96 bits as a tag size */ - if(m_tag_size < 12 || m_tag_size > 16) + /* 64 bit tag is still supported but deprecated and will be removed in the future */ + if(m_tag_size != 8 && (m_tag_size < 12 || m_tag_size > 16)) throw Invalid_Argument(name() + ": Bad tag size " + std::to_string(m_tag_size)); } |