Crypto++
8.8
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
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";}
48 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
55 CRYPTOPP_CONSTANT(ROUNDS = 20);
77 static std::string StaticAlgorithmName() {
return "XSalsa20";}
85 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
86 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.
unsigned int word32
32-bit unsigned datatype
Salsa20 stream cipher information.
Inherited by keyed algorithms with fixed key length.
KeystreamOperation
Keystream operation flags.
XSalsa20 stream cipher operation.
Salsa20 stream cipher operation.
word64 lword
Large word type.
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.
void Salsa20_Core(word32 *data, unsigned int rounds)
Salsa20 core transform.
virtual std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
Classes for implementing stream ciphers.
Inherited by keyed algorithms with variable key length.