aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/siv/siv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/modes/aead/siv/siv.cpp')
-rw-r--r--src/lib/modes/aead/siv/siv.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/modes/aead/siv/siv.cpp b/src/lib/modes/aead/siv/siv.cpp
index 9e638b659..5f8c13f7f 100644
--- a/src/lib/modes/aead/siv/siv.cpp
+++ b/src/lib/modes/aead/siv/siv.cpp
@@ -18,6 +18,8 @@ SIV_Mode::SIV_Mode(BlockCipher* cipher) :
m_ctr(new CTR_BE(cipher->clone())),
m_cmac(new CMAC(cipher))
{
+ if(cipher->block_size() != 16)
+ throw Invalid_Argument("SIV requires a 128 bit block cipher");
}
void SIV_Mode::clear()