aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/stream_mode.h
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-07-20 22:26:26 +0200
committerDaniel Neus <[email protected]>2016-11-08 22:16:09 +0100
commit06b44d8ed339b3a467f10a326fd209b0b9496060 (patch)
tree24c3bf3f20ba697a658d6d009d0cdb7be8a3e41f /src/lib/modes/stream_mode.h
parent523b2a4ca48fa5cf04ea371aabe7167ce2e5cd13 (diff)
Cipher_Mode and AEAD_Mode improvements
See PR #552 - Add Cipher_Mode::reset() which resets just the message specific state and allows encrypting again under the existing key - In Cipher_Mode::clear() (at some planes) use cipher->clear() instead of resetting the pointer which would make the cipher object unusable - EAX_Decryption::output_length() bugfix?! Now its possible to decrypt an empty ciphertext (just a tag) - Bugfix for GCM_Decryption::finish() - set tag length in GCM_Mode::name() - Cipher_Mode tests: add tests for reset()and process() - AEAD_Mode tests: add tests for reset(), clear(), update() and process()
Diffstat (limited to 'src/lib/modes/stream_mode.h')
-rw-r--r--src/lib/modes/stream_mode.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/modes/stream_mode.h b/src/lib/modes/stream_mode.h
index 3a0c8574c..83b0543c9 100644
--- a/src/lib/modes/stream_mode.h
+++ b/src/lib/modes/stream_mode.h
@@ -1,5 +1,6 @@
/*
* (C) 2015 Jack Lloyd
+* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
@@ -44,7 +45,13 @@ class BOTAN_DLL Stream_Cipher_Mode : public Cipher_Mode
std::string name() const override { return m_cipher->name(); }
- void clear() override { return m_cipher->clear(); }
+ void clear() override
+ {
+ m_cipher->clear();
+ reset();
+ }
+
+ void reset() override { /* no msg state */ return; }
private:
void start_msg(const byte nonce[], size_t nonce_len) override