6 #ifndef CRYPTOPP_PANAMA_H 7 #define CRYPTOPP_PANAMA_H 19 #define CRYPTOPP_DISABLE_PANAMA_ASM 1 29 std::string AlgorithmProvider()
const;
34 typedef word32 Stage[8];
35 CRYPTOPP_CONSTANT(STAGES = 32)
43 template <
class B = LittleEndian>
47 CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
52 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return B::ToEnum() ==
BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
56 void HashEndianCorrectedBlock(
const word32 *data) {this->Iterate(1, data);}
57 size_t HashMultipleBlocks(
const word32 *input,
size_t length);
58 word32* StateBuf() {
return NULLPTR;}
65 template <
class T_Hash,
class T_Info = T_Hash>
69 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms)
71 CRYPTOPP_UNUSED(params);
83 void Update(
const byte *input,
size_t length)
87 m_hash.Update(input, length);
90 void TruncatedFinal(byte *digest,
size_t digestSize)
94 m_hash.TruncatedFinal(digest, digestSize);
98 unsigned int DigestSize()
const 99 {
return m_hash.DigestSize();}
100 unsigned int BlockSize()
const 101 {
return m_hash.BlockSize();}
102 unsigned int OptimalBlockSize()
const 103 {
return m_hash.OptimalBlockSize();}
104 unsigned int OptimalDataAlignment()
const 105 {
return m_hash.OptimalDataAlignment();}
110 m_hash.Update(m_key, m_key.
size());
121 template <
class B = LittleEndian>
126 PanamaMAC(
const byte *key,
unsigned int length)
127 {this->SetKey(key, length);}
135 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return B::ToEnum() ==
BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
146 std::string AlgorithmProvider()
const;
147 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
148 void OperateKeystream(
KeystreamOperation operation, byte *output,
const byte *input,
size_t iterationCount);
149 bool CipherIsRandomAccess()
const {
return false;}
150 void CipherResynchronize(byte *keystreamBuffer,
const byte *iv,
size_t length);
151 unsigned int GetAlignment()
const;
159 template <
class B = LittleEndian>
Inherited by keyed algorithms with fixed key length.
Base class for additive stream ciphers.
Wirte the keystream to the output buffer, input is NULL.
Classes and functions for secure memory allocations.
void Assign(const T *ptr, size_type len)
Set contents and size from an array.
unsigned int DigestSize() const
Provides the digest size of the hash.
Panama message authentication code.
MAC construction using a hermetic hash function.
Classes for implementing stream ciphers.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
Panama stream cipher operation.
Panama stream cipher information.
KeystreamOperation
Keystream operation flags.
Crypto++ library namespace.
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
SymmetricCipher implementation.
Base class for additive stream ciphers with SymmetricCipher interface.
size_type size() const
Provides the count of elements in the SecBlock.
Namespace containing weak and wounded algorithms.
Interface for retrieving values given their names.