aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/ocb/ocb.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-11-07 14:55:18 +0000
committerlloyd <[email protected]>2014-11-07 14:55:18 +0000
commitce72ae0073b18f82efe558a3bf44564f0245d6db (patch)
treed5f3a6616ff5f0e934451a89dded69d790bf4cb0 /src/lib/modes/aead/ocb/ocb.h
parentfff58f919f5d142e5b3dd896c747943e92b3e646 (diff)
OCB cleanup and additional tests
Diffstat (limited to 'src/lib/modes/aead/ocb/ocb.h')
-rw-r--r--src/lib/modes/aead/ocb/ocb.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/modes/aead/ocb/ocb.h b/src/lib/modes/aead/ocb/ocb.h
index a7293ffcb..02ea0b0a1 100644
--- a/src/lib/modes/aead/ocb/ocb.h
+++ b/src/lib/modes/aead/ocb/ocb.h
@@ -1,6 +1,6 @@
/*
* OCB Mode
-* (C) 2013 Jack Lloyd
+* (C) 2013,2014 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -50,12 +50,13 @@ class BOTAN_DLL OCB_Mode : public AEAD_Mode
*/
OCB_Mode(BlockCipher* cipher, size_t tag_size);
- void key_schedule(const byte key[], size_t length) override;
+ size_t BS() const { return m_BS; }
// fixme make these private
std::unique_ptr<BlockCipher> m_cipher;
std::unique_ptr<L_computer> m_L;
+ size_t m_BS;
size_t m_block_index = 0;
secure_vector<byte> m_checksum;
@@ -64,6 +65,8 @@ class BOTAN_DLL OCB_Mode : public AEAD_Mode
private:
secure_vector<byte> start_raw(const byte nonce[], size_t nonce_len) override;
+ void key_schedule(const byte key[], size_t length) override;
+
secure_vector<byte> update_nonce(const byte nonce[], size_t nonce_len);
size_t m_tag_size = 0;