8 NAMESPACE_BEGIN(CryptoPP)
16 {
return GetMAC().GetCipher().AlgorithmName() + std::string(
"/EAX");}
18 {
return GetMAC().MinKeyLength();}
20 {
return GetMAC().MaxKeyLength();}
22 {
return GetMAC().DefaultKeyLength();}
24 {
return GetMAC().GetValidKeyLength(n);}
26 {
return GetMAC().IsValidKeyLength(n);}
28 {
return GetMAC().OptimalDataAlignment();}
31 unsigned int IVSize()
const
32 {
return GetMAC().TagSize();}
38 {
return GetMAC().TagSize();}
46 bool AuthenticationIsOnPlaintext()
const
48 unsigned int AuthenticationBlockSize()
const
50 void SetKeyWithoutResync(
const byte *userKey,
size_t keylength,
const NameValuePairs ¶ms);
51 void Resync(
const byte *iv,
size_t len);
52 size_t AuthenticateBlocks(
const byte *data,
size_t len);
53 void AuthenticateLastHeaderBlock();
54 void AuthenticateLastFooterBlock(byte *mac,
size_t macSize);
56 const CMAC_Base & GetMAC()
const {
return const_cast<EAX_Base *
>(
this)->AccessMAC();}
63 template <
class T_BlockCipher,
bool T_IsEncryption>
67 static std::string StaticAlgorithmName()
68 {
return T_BlockCipher::StaticAlgorithmName() + std::string(
"/EAX");}
70 {
return T_IsEncryption;}
77 #ifdef EAX // EAX is defined to 11 on GCC 3.4.3, OpenSolaris 8.11
82 template <
class T_BlockCipher>
size_t MinKeyLength() const
returns smallest valid key length in bytes */
unsigned int DigestSize() const
size of the hash/digest/MAC returned by Final()
Each class derived from this one defines two types, Encryption and Decryption, both of which implemen...
size_t MaxKeyLength() const
returns largest valid key length in bytes */
size_t GetValidKeyLength(size_t n) const
returns the smallest valid key length in bytes that is >= min(n, GetMaxKeyLength()) ...
interface for one direction (encryption or decryption) of a stream cipher or cipher mode ...
lword MaxMessageLength() const
the maximum length of encrypted data
unsigned int OptimalDataAlignment() const
returns how input should be aligned for optimal performance
IV_Requirement IVRequirement() const
returns the minimal requirement for secure IVs
lword MaxHeaderLength() const
the maximum length of AAD that can be input before the encrypted data
size_t DefaultKeyLength() const
returns default (recommended) key length in bytes */
unsigned int MinIVLength() const
returns minimal length of IVs accepted by this object
unsigned int MaxIVLength() const
returns maximal length of IVs accepted by this object
std::string AlgorithmName() const
returns name of this algorithm, not universally implemented yet
bool IsForwardTransformation() const
returns whether this is an encryption object
bool IsValidKeyLength(size_t n) const
returns whether n is a valid key length
interface for retrieving values given their names