6 #ifndef CRYPTOPP_PANAMA_H 7 #define CRYPTOPP_PANAMA_H 14 # define CRYPTOPP_DISABLE_PANAMA_ASM 25 void Iterate(
size_t count,
const word32 *p=NULL, byte *output=NULL,
const byte *input=NULL, KeystreamOperation operation=WRITE_KEYSTREAM);
28 typedef word32 Stage[8];
29 CRYPTOPP_CONSTANT(STAGES = 32)
36 template <
class B = LittleEndian>
40 CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
44 static const char * StaticAlgorithmName() {
return B::ToEnum() == BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
48 void HashEndianCorrectedBlock(
const word32 *data) {this->Iterate(1, data);}
49 size_t HashMultipleBlocks(
const word32 *input,
size_t length);
50 word32* StateBuf() {
return NULL;}
55 template <
class T_Hash,
class T_Info = T_Hash>
59 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms)
61 CRYPTOPP_UNUSED(params);
63 m_key.Assign(key, length);
73 void Update(
const byte *input,
size_t length)
77 m_hash.Update(input, length);
84 m_hash.TruncatedFinal(digest, digestSize);
89 {
return m_hash.DigestSize();}
90 unsigned int BlockSize()
const 91 {
return m_hash.BlockSize();}
92 unsigned int OptimalBlockSize()
const 93 {
return m_hash.OptimalBlockSize();}
94 unsigned int OptimalDataAlignment()
const 95 {
return m_hash.OptimalDataAlignment();}
100 m_hash.Update(m_key, m_key.size());
111 template <
class B = LittleEndian>
116 PanamaMAC(
const byte *key,
unsigned int length)
117 {this->SetKey(key, length);}
125 static const char * StaticAlgorithmName() {
return B::ToEnum() == BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
135 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
136 void OperateKeystream(KeystreamOperation operation, byte *output,
const byte *input,
size_t iterationCount);
137 bool CipherIsRandomAccess()
const {
return false;}
138 void CipherResynchronize(byte *keystreamBuffer,
const byte *iv,
size_t length);
139 unsigned int GetAlignment()
const;
145 template <
class B = LittleEndian>
Inherited by keyed algorithms with fixed key length.
unsigned int DigestSize() const
Provides the digest size of the hash.
SecByteBlock is a SecBlock<byte> typedef.
Classes and functions for secure memory allocations.
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
MAC construction using a hermetic hash function.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
base class, do not use directly
Crypto++ library namespace.
Namespace containing weak and wounded algorithms.
Interface for retrieving values given their names.
Base class for identifying alogorithm.