6 #ifndef CRYPTOPP_SALSA_H
7 #define CRYPTOPP_SALSA_H
15 #if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_INTEL_ASM) || (CRYPTOPP_GCC_VERSION >= 40800)
16 # define CRYPTOPP_DISABLE_SALSA_ASM
19 NAMESPACE_BEGIN(CryptoPP)
25 CRYPTOPP_CONSTEXPR
static const char *StaticAlgorithmName() {
return "Salsa20";}
33 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
35 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
36 bool CipherIsRandomAccess()
const {
return true;}
37 void SeekToIteration(lword iterationCount);
38 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SALSA_ASM)
40 unsigned int GetOptimalBlockSize()
const;
61 CRYPTOPP_CONSTEXPR
static const char *StaticAlgorithmName() {
return "XSalsa20";}
69 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
70 void CipherResynchronize(byte *keystreamBuffer,
const byte *
IV,
size_t length);
Inherited by keyed algorithms with fixed key length.
unsigned int GetAlignment() const
Provides data alignment requirements.
Base class for additive stream ciphers.
XSalsa20 stream cipher information.
Salsa20 stream cipher information.
Classes and functions for secure memory allocations.
XSalsa20 stream cipher operation.
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 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.
Salsa20 stream cipher operation.
Interface for retrieving values given their names.