14 #ifndef CRYPTOPP_CHACHA_H
15 #define CRYPTOPP_CHACHA_H
20 NAMESPACE_BEGIN(CryptoPP)
25 template <
unsigned int R>
28 CRYPTOPP_CONSTEXPR
static const char *StaticAlgorithmName() {
29 return (R==8?
"ChaCha8":(R==12?
"ChaCha12":(R==20?
"ChaCha20":
"ChaCha")));
36 template <
unsigned int R>
42 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
44 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
45 bool CipherIsRandomAccess()
const {
return false;}
46 void SeekToIteration(lword iterationCount);
48 unsigned int GetOptimalBlockSize()
const;
91 #endif // CRYPTOPP_CHACHA_H
ChaCha stream cipher information.
unsigned int GetAlignment() const
Provides data alignment requirements.
Base class for additive stream ciphers.
Classes and functions for secure memory allocations.
ChaCha stream cipher implementation.
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.
Inherited by algorithms with fixed number of rounds.
Inherited by keyed algorithms with variable key length.
const char * IV()
ConstByteArrayParameter, also accepts const byte * for backwards compatibility.
Classes for implementing stream ciphers.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
KeystreamOperation
Keystream operation flags.
SymmetricCipher implementation.
Base class for additive stream ciphers with SymmetricCipher interface.
Interface for retrieving values given their names.