29 #ifndef CRYPTOPP_CHACHA_H 30 #define CRYPTOPP_CHACHA_H 64 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
66 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
67 bool CipherIsRandomAccess()
const {
return true;}
68 void SeekToIteration(lword iterationCount);
70 unsigned int GetOptimalBlockSize()
const;
72 std::string AlgorithmName()
const;
73 std::string AlgorithmProvider()
const;
75 CRYPTOPP_CONSTANT(ROUNDS = 20)
77 unsigned int m_rounds;
121 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
123 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
124 bool CipherIsRandomAccess()
const {
return true;}
125 void SeekToIteration(lword iterationCount);
127 unsigned int GetOptimalBlockSize()
const;
129 std::string AlgorithmName()
const;
130 std::string AlgorithmProvider()
const;
133 unsigned int m_counter;
135 CRYPTOPP_CONSTANT(KEY = 16)
136 CRYPTOPP_CONSTANT(CTR = 24)
187 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
189 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
190 bool CipherIsRandomAccess()
const {
return false;}
191 void SeekToIteration(lword iterationCount);
193 unsigned int GetOptimalBlockSize()
const;
195 std::string AlgorithmName()
const;
196 std::string AlgorithmProvider()
const;
199 unsigned int m_counter, m_rounds;
200 CRYPTOPP_CONSTANT(ROUNDS = 20)
201 CRYPTOPP_CONSTANT(KEY = 16)
223 #endif // CRYPTOPP_CHACHA_H static const char * StaticAlgorithmName()
The algorithm name.
ChaCha-TLS stream cipher implementation.
ChaCha stream cipher information.
static const char * StaticAlgorithmName()
The algorithm name.
Inherited by keyed algorithms with fixed key length.
Base class for additive stream ciphers.
Encryption Decryption
ChaCha Decryption.
SymmetricCipherFinal< ConcretePolicyHolder< ChaCha_Policy, AdditiveCipherTemplate<> >, ChaCha_Info > Encryption
ChaCha Encryption.
unsigned int GetAlignment() const
Provides data alignment requirements.
SymmetricCipherFinal< ConcretePolicyHolder< XChaCha20_Policy, AdditiveCipherTemplate<> >, XChaCha20_Info > Encryption
XChaCha Encryption.
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.
Encryption Decryption
ChaCha-TLS Decryption.
Inherited by algorithms with fixed number of rounds.
Encryption Decryption
XChaCha Decryption.
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.
XChaCha stream cipher information.
XChaCha stream cipher implementation.
KeystreamOperation
Keystream operation flags.
Crypto++ library namespace.
SymmetricCipher implementation.
ChaCha-TLS stream cipher information.
static const char * StaticAlgorithmName()
The algorithm name.
ChaCha-TLS stream cipher.
Interface for retrieving values given their names.
SymmetricCipherFinal< ConcretePolicyHolder< ChaChaTLS_Policy, AdditiveCipherTemplate<> >, ChaChaTLS_Info > Encryption
ChaCha-TLS Encryption.