Crypto++
5.6.5
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
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
25 CRYPTOPP_CONSTEXPR
static const char *StaticAlgorithmName() {
return "Salsa20";}
38 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SALSA_ASM)
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);
virtual bool CipherIsRandomAccess() const =0
Flag indicating random access.
virtual void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length)
Resynchronize the cipher.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher.
SymmetricCipher implementation.
Base class for additive stream ciphers.
virtual void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length)=0
Key the cipher.
Classes and functions for secure memory allocations.
Interface for algorithms that take byte strings as keys.
Salsa20 stream cipher information.
Inherited by keyed algorithms with fixed key length.
KeystreamOperation
Keystream operation flags.
XSalsa20 stream cipher operation.
Salsa20 stream cipher operation.
XSalsa20 stream cipher information.
Crypto++ library namespace.
virtual void SeekToIteration(lword iterationCount)
Seeks to a random position in the stream.
unsigned int GetAlignment() const
Provides data alignment requirements.
virtual void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)=0
Operates the keystream.
virtual unsigned int GetOptimalBlockSize() const
Provides number of ideal bytes to process.
Interface for retrieving values given their names.
Classes for implementing stream ciphers.
Inherited by keyed algorithms with variable key length.