6 #ifndef CRYPTOPP_SALSA_H 7 #define CRYPTOPP_SALSA_H 14 #if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_MIXED_ASM) 15 # define CRYPTOPP_DISABLE_SALSA_ASM 1 32 static std::string StaticAlgorithmName() {
return "Salsa20";}
40 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
42 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
43 bool CipherIsRandomAccess()
const {
return true;}
44 void SeekToIteration(lword iterationCount);
46 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) 48 unsigned int GetOptimalBlockSize()
const;
51 std::string AlgorithmProvider()
const;
53 CRYPTOPP_CONSTANT(ROUNDS = 20)
70 static std::string StaticAlgorithmName() {
return "XSalsa20";}
77 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
78 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
Inherited by keyed algorithms with fixed key length.
Base class for additive stream ciphers.
XSalsa20 stream cipher information.
unsigned int GetAlignment() const
Provides data alignment requirements.
Salsa20 stream cipher information.
Classes and functions for secure memory allocations.
XSalsa20 stream cipher operation.
void Salsa20_Core(word32 *data, unsigned int rounds)
Salsa20 core transform.
virtual void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)=0
Operates the keystream.
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.
Salsa20 stream cipher operation.
Interface for retrieving values given their names.