10 #ifndef CRYPTOPP_CHACHA_H 11 #define CRYPTOPP_CHACHA_H 21 template <
unsigned int R>
24 CRYPTOPP_CONSTEXPR
static const char *StaticAlgorithmName() {
25 return (R==8?
"ChaCha8":(R==12?
"ChaCha12":(R==20?
"ChaCha20":
"ChaCha")));
32 template <
unsigned int R>
38 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
39 void OperateKeystream(
KeystreamOperation operation, byte *output,
const byte *input,
size_t iterationCount);
40 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
41 bool CipherIsRandomAccess()
const {
return false;}
42 void SeekToIteration(lword iterationCount);
43 unsigned int GetAlignment()
const;
44 unsigned int GetOptimalBlockSize()
const;
81 #endif // CRYPTOPP_CHACHA_H ChaCha stream cipher information.
Base class for additive stream ciphers.
Classes and functions for secure memory allocations.
ChaCha stream cipher implementation.
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...
static const int ROUNDS
The number of rounds for the algorithm provided as a constant.
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.