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
33 static std::string StaticAlgorithmName() {
return "Salsa20";}
41 Salsa20_Policy() : m_rounds(ROUNDS) {}
48#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
55 CRYPTOPP_CONSTANT(ROUNDS = 20);
70 typedef Encryption Decryption;
77 static std::string StaticAlgorithmName() {
return "XSalsa20";}
99 typedef Encryption Decryption;
Inherited by keyed algorithms with fixed key length.
Fixed size stack-based SecBlock with 16-byte alignment.
Fixed size stack-based SecBlock.
Interface for retrieving values given their names.
SymmetricCipher implementation.
Inherited by keyed algorithms with variable key length.
XSalsa20 stream cipher operation.
unsigned int word32
32-bit unsigned datatype
word64 lword
Large word type.
Crypto++ library namespace.
void Salsa20_Core(word32 *data, unsigned int rounds)
Salsa20 core transform.
Classes and functions for secure memory allocations.
Classes for implementing stream ciphers.
KeystreamOperation
Keystream operation flags.
virtual std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
virtual unsigned int GetOptimalBlockSize() const
Provides number of ideal bytes to process.
virtual void SeekToIteration(lword iterationCount)
Seeks to a random position in the stream.
virtual void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length)=0
Key the cipher.
virtual bool CipherIsRandomAccess() const =0
Flag indicating random access.
virtual void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length)
Resynchronize the cipher.
Base class for additive stream ciphers.
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.
Salsa20 stream cipher information.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher.
XSalsa20 stream cipher information.