diff options
author | Atanas Filyanov <[email protected]> | 2017-09-13 17:42:33 +0200 |
---|---|---|
committer | Atanas Filyanov <[email protected]> | 2017-09-13 17:42:33 +0200 |
commit | ce8963a9a1b30fc183da7991119e18eb79c49938 (patch) | |
tree | 60b8a8c4ef48fea0084c1bc30666f47c6cb018b8 /src/lib/modes | |
parent | 5651315cd6fc35f9380f99a9f571d9c0b044a4ee (diff) |
allow 12 byte GCM tags and add test vectors
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index f9ffdee97..4e28b1b48 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -182,7 +182,7 @@ GCM_Mode::GCM_Mode(BlockCipher* cipher, size_t tag_size) : m_ctr.reset(new CTR_BE(cipher, 4)); // CTR_BE takes ownership of cipher - if(m_tag_size != 8 && m_tag_size != GCM_BS) + if(m_tag_size != 8 && m_tag_size != 12 && m_tag_size != GCM_BS) throw Invalid_Argument(name() + ": Bad tag size " + std::to_string(m_tag_size)); } |