diff options
Diffstat (limited to 'src/lib/modes/aead/siv')
-rw-r--r-- | src/lib/modes/aead/siv/siv.cpp | 9 | ||||
-rw-r--r-- | src/lib/modes/aead/siv/siv.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/modes/aead/siv/siv.cpp b/src/lib/modes/aead/siv/siv.cpp index ce20f3ada..373a2627c 100644 --- a/src/lib/modes/aead/siv/siv.cpp +++ b/src/lib/modes/aead/siv/siv.cpp @@ -1,6 +1,7 @@ /* * SIV Mode Encryption * (C) 2013 Jack Lloyd +* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity * * Botan is released under the Simplified BSD License (see license.txt) */ @@ -23,7 +24,13 @@ SIV_Mode::SIV_Mode(BlockCipher* cipher) : void SIV_Mode::clear() { - m_ctr.reset(); + m_ctr->clear(); + m_cmac->clear(); + reset(); + } + +void SIV_Mode::reset() + { m_nonce.clear(); m_msg_buf.clear(); m_ad_macs.clear(); diff --git a/src/lib/modes/aead/siv/siv.h b/src/lib/modes/aead/siv/siv.h index ca3e7df37..71990ef96 100644 --- a/src/lib/modes/aead/siv/siv.h +++ b/src/lib/modes/aead/siv/siv.h @@ -1,6 +1,7 @@ /* * SIV Mode * (C) 2013 Jack Lloyd +* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity * * Botan is released under the Simplified BSD License (see license.txt) */ @@ -46,6 +47,8 @@ class BOTAN_DLL SIV_Mode : public AEAD_Mode void clear() override; + void reset() override; + size_t tag_size() const override { return 16; } protected: |