Security Scol plugin
Public Member Functions | Protected Attributes | List of all members
XSalsa20_Policy Class Reference

XSalsa20 stream cipher operation. More...

#include <salsa.h>

Inheritance diagram for XSalsa20_Policy:
Salsa20_Policy AdditiveCipherConcretePolicy< word32, 16 > AdditiveCipherAbstractPolicy

Public Member Functions

void CipherSetKey (const NameValuePairs &params, const byte *key, size_t length)
 Key the cipher.
 
void CipherResynchronize (byte *keystreamBuffer, const byte *IV, size_t length)
 Resynchronize the cipher.
 
- Public Member Functions inherited from AdditiveCipherConcretePolicy< word32, 16 >
 CRYPTOPP_CONSTANT (BYTES_PER_ITERATION=sizeof(WordType) *W)
 Number of bytes for an iteration.
 
unsigned int GetAlignment () const
 Provides data alignment requirements.
 
unsigned int GetBytesPerIteration () const
 Provides number of bytes operated upon during an iteration.
 
unsigned int GetIterationsToBuffer () const
 Provides buffer size based on iterations.
 
bool CanOperateKeystream () const
 Flag indicating.
 
- Public Member Functions inherited from AdditiveCipherAbstractPolicy
virtual unsigned int GetOptimalBlockSize () const
 Provides number of ideal bytes to process.
 
virtual void WriteKeystream (byte *keystream, size_t iterationCount)
 Generate the keystream.
 

Protected Attributes

FixedSizeSecBlock< word32, 8 > m_key
 
- Protected Attributes inherited from Salsa20_Policy
FixedSizeAlignedSecBlock< word32, 16 > m_state
 
int m_rounds
 

Additional Inherited Members

- Public Types inherited from AdditiveCipherConcretePolicy< word32, 16 >
typedef word32 WordType
 Word type for the cipher.
 
- Protected Member Functions inherited from Salsa20_Policy
void OperateKeystream (KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)
 Operates the keystream.
 
bool CipherIsRandomAccess () const
 Flag indicating random access.
 
void SeekToIteration (lword iterationCount)
 Seeks to a random position in the stream.
 
std::string AlgorithmProvider () const
 Retrieve the provider of this algorithm.
 
 CRYPTOPP_CONSTANT (ROUNDS=20)
 

Detailed Description

XSalsa20 stream cipher operation.

Since
Crypto++ 5.4

Definition at line 82 of file salsa.h.

Member Function Documentation

◆ CipherResynchronize()

void XSalsa20_Policy::CipherResynchronize ( byte keystreamBuffer,
const byte iv,
size_t  length 
)
virtual

Resynchronize the cipher.

Parameters
keystreamBufferthe keystream buffer
iva byte array used to resynchronize the cipher
lengththe size of the IV array

Reimplemented from Salsa20_Policy.

Definition at line 725 of file salsa.cpp.

◆ CipherSetKey()

void XSalsa20_Policy::CipherSetKey ( const NameValuePairs params,
const byte key,
size_t  length 
)
virtual

Key the cipher.

Parameters
paramsset of NameValuePairs use to initialize this object
keya byte array used to key the cipher
lengththe size of the key array

Reimplemented from Salsa20_Policy.

Definition at line 708 of file salsa.cpp.

Member Data Documentation

◆ m_key

FixedSizeSecBlock<word32, 8> XSalsa20_Policy::m_key
protected

Definition at line 89 of file salsa.h.


The documentation for this class was generated from the following files: