14 #ifndef CRYPTOPP_CHACHA_H 15 #define CRYPTOPP_CHACHA_H 22 template <
unsigned int R>
29 return (R==8?
"ChaCha8":(R==12?
"ChaCha12":(R==20?
"ChaCha20":
"ChaCha")));
36 template <
unsigned int R>
44 void CipherResynchronize(
byte *keystreamBuffer,
const byte *IV,
size_t length);
46 void SeekToIteration(
lword iterationCount);
48 unsigned int GetOptimalBlockSize()
const;
91 #endif // CRYPTOPP_CHACHA_H ChaCha stream cipher information.
#define CRYPTOPP_STATIC_CONSTEXPR
unsigned int GetAlignment() const
Provides data alignment requirements.
Base class for additive stream ciphers.
#define NAMESPACE_BEGIN(x)
bool CipherIsRandomAccess() const
Flag indicating random access.
SymmetricCipherFinal< ConcretePolicyHolder< ChaCha_Policy< 20 >, AdditiveCipherTemplate<> >, ChaCha_Info< 20 > > Encryption
SymmetricCipherFinal< ConcretePolicyHolder< ChaCha_Policy< 12 >, AdditiveCipherTemplate<> >, ChaCha_Info< 12 > > Encryption
Classes and functions for secure memory allocations.
A PRNG class for ChaCha20.
ChaCha stream cipher implementation.
FixedSizeAlignedSecBlock< word32, 16 > m_state
virtual void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)=0
Operates the keystream.
Interface for algorithms that take byte strings as keys.
#define CRYPTOPP_CONSTANT(x)
Inherited by algorithms with fixed number of rounds.
Inherited by keyed algorithms with variable key length.
#define CRYPTOPP_NO_VTABLE
Classes for implementing stream ciphers.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
KeystreamOperation
Keystream operation flags.
SymmetricCipher implementation.
Base class for additive stream ciphers with SymmetricCipher interface.
SymmetricCipherFinal< ConcretePolicyHolder< ChaCha_Policy< 8 >, AdditiveCipherTemplate<> >, ChaCha_Info< 8 > > Encryption
Interface for retrieving values given their names.