From 983a8ecb42e844f89466d0ae52bba591d4fc4275 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 28 Sep 2008 18:15:52 +0000 Subject: Modularize cipher modes --- include/eax.h | 72 ----------------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 include/eax.h (limited to 'include/eax.h') diff --git a/include/eax.h b/include/eax.h deleted file mode 100644 index 676e5334e..000000000 --- a/include/eax.h +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************* -* EAX Mode Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_EAX_H__ -#define BOTAN_EAX_H__ - -#include - -namespace Botan { - -/************************************************* -* EAX Base Class * -*************************************************/ -class BOTAN_DLL EAX_Base : public Keyed_Filter - { - public: - void set_key(const SymmetricKey&); - void set_iv(const InitializationVector&); - void set_header(const byte[], u32bit); - std::string name() const; - - bool valid_keylength(u32bit) const; - - ~EAX_Base() { delete cipher; delete mac; } - protected: - EAX_Base(const std::string&, u32bit); - void start_msg(); - void increment_counter(); - - const u32bit TAG_SIZE, BLOCK_SIZE; - BlockCipher* cipher; - MessageAuthenticationCode* mac; - SecureVector nonce_mac, header_mac, state, buffer; - u32bit position; - }; - -/************************************************* -* EAX Encryption * -*************************************************/ -class BOTAN_DLL EAX_Encryption : public EAX_Base - { - public: - EAX_Encryption(const std::string&, u32bit = 0); - EAX_Encryption(const std::string&, const SymmetricKey&, - const InitializationVector&, u32bit = 0); - private: - void write(const byte[], u32bit); - void end_msg(); - }; - -/************************************************* -* EAX Decryption * -*************************************************/ -class BOTAN_DLL EAX_Decryption : public EAX_Base - { - public: - EAX_Decryption(const std::string&, u32bit = 0); - EAX_Decryption(const std::string&, const SymmetricKey&, - const InitializationVector&, u32bit = 0); - private: - void write(const byte[], u32bit); - void do_write(const byte[], u32bit); - void end_msg(); - SecureVector queue; - u32bit queue_start, queue_end; - }; - -} - -#endif -- cgit v1.2.3