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
27void Salsa20_Core(
word32* data,
unsigned int rounds);
33 static std::string StaticAlgorithmName() {
return "Salsa20";}
41 Salsa20_Policy() : m_rounds(ROUNDS) {}
42 void CipherSetKey(
const NameValuePairs ¶ms,
const byte *key,
size_t length);
43 void OperateKeystream(
KeystreamOperation operation,
byte *output,
const byte *input,
size_t iterationCount);
44 void CipherResynchronize(
byte *keystreamBuffer,
const byte *IV,
size_t length);
45 bool CipherIsRandomAccess()
const {
return true;}
46 void SeekToIteration(
lword iterationCount);
48#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
49 unsigned int GetAlignment()
const;
50 unsigned int GetOptimalBlockSize()
const;
53 std::string AlgorithmProvider()
const;
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.
void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length)
Key the cipher.
void CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length)
Resynchronize the cipher.
unsigned int word32
32-bit unsigned datatype
word64 lword
Large word type.
Crypto++ library namespace.
Classes and functions for secure memory allocations.
Classes for implementing stream ciphers.
KeystreamOperation
Keystream operation flags.
Base class for additive stream ciphers.
Salsa20 stream cipher information.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher.
XSalsa20 stream cipher information.