13 #ifndef CRYPTOPP_CHACHA_H 14 #define CRYPTOPP_CHACHA_H 23 template <
unsigned int R>
26 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
27 return (R==8?
"ChaCha8":(R==12?
"ChaCha12":(R==20?
"ChaCha20":
"ChaCha")));
33 template <
unsigned int R>
39 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
41 void CipherResynchronize(
byte *keystreamBuffer,
const byte *
IV,
size_t length);
42 bool CipherIsRandomAccess()
const {
return false;}
43 void SeekToIteration(lword iterationCount);
45 unsigned int GetOptimalBlockSize()
const;
85 #endif // CRYPTOPP_CHACHA_H ChaCha stream cipher information.
Base class for additive stream ciphers.
unsigned int GetAlignment() const
Provides data alignment requirements.
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.
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.
Crypto++ library namespace.
SymmetricCipher implementation.
Base class for additive stream ciphers with SymmetricCipher interface.
Interface for retrieving values given their names.