7 #ifndef CRYPTOPP_VMAC_H 8 #define CRYPTOPP_VMAC_H 16 #if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)) || CRYPTOPP_BOOL_X32 17 # define CRYPTOPP_DISABLE_VMAC_ASM 28 std::string
AlgorithmName()
const {
return std::string(
"VMAC(") + GetCipher().AlgorithmName() +
")-" +
IntToString(DigestSize()*8);}
29 unsigned int IVSize()
const {
return GetCipher().BlockSize();}
31 void Resynchronize(
const byte *nonce,
int length=-1);
33 unsigned int DigestSize()
const {
return m_is128 ? 16 : 8;};
34 void UncheckedSetKey(
const byte *userKey,
unsigned int keylength,
const NameValuePairs ¶ms);
35 void TruncatedFinal(
byte *mac,
size_t size);
36 unsigned int BlockSize()
const {
return m_L1KeyLength;}
38 unsigned int OptimalDataAlignment()
const;
42 virtual int DefaultDigestSize()
const =0;
44 void HashEndianCorrectedBlock(
const word64 *
data);
45 size_t HashMultipleBlocks(
const word64 *input,
size_t length);
48 word64*
DataBuf() {
return (word64 *)(
void*)m_data();}
50 void VHASH_Update_SSE2(
const word64 *data,
size_t blocksRemainingInWord64,
int tagPart);
51 template <
bool T_128BitTag>
52 void VHASH_Update_Template(
const word64 *data,
size_t blockRemainingInWord128);
53 void VHASH_Update(
const word64 *data,
size_t blocksRemainingInWord128);
63 bool m_is128, m_padCached, m_isFirstBlock;
64 unsigned int m_L1KeyLength;
78 template <class T_BlockCipher,
int T_DigestBitSize = 128>
std::string AlgorithmName() const
Provides the name of this algorithm.
VMAC message authentication code.
Interface for message authentication codes.
#define CRYPTOPP_BLOCKS_END(i)
ByteOrder
Provides the byte ordering.
unsigned int DigestSize() const
Provides the digest size of the hash.
VMAC message authentication code base class.
Provides a base implementation of SimpleKeyingInterface.
#define NAMESPACE_BEGIN(x)
Abstract base classes that provide a uniform interface to this library.
unsigned int BlockSize() const
Provides the block size of the compression function.
BlockCipher & AccessCipher()
ByteOrder GetByteOrder() const
Interface for random number generators.
const BlockCipher & GetCipher() const
#define CRYPTOPP_BLOCK_2(n, t, s)
byte order is little-endian
Interface for one direction (encryption or decryption) of a block cipher.
#define CRYPTOPP_BLOCK_1(n, t, s)
T_BlockCipher::Encryption m_cipher
#define CRYPTOPP_BLOCK_4(n, t, s)
Classes and functions for implementing secret key algorithms.
Interface for algorithms that take byte strings as keys.
unsigned long long word64
Provides key lengths based on another class's key length.
#define CRYPTOPP_BLOCK_6(n, t, s)
unsigned int MinIVLength() const
Provides the minimum size of an IV.
unsigned int IVSize() const
Returns length of the IV accepted by this object.
#define CRYPTOPP_BLOCK_3(n, t, s)
uint8_t const size_t const size
Iterated hash base class.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
int DefaultDigestSize() const
static std::string StaticAlgorithmName()
#define CRYPTOPP_BLOCK_5(n, t, s)
Interface for retrieving values given their names.