Crypto++ 8.9
Free C++ class library of cryptographic schemes
|
Interface for the data processing part of block ciphers. More...
#include <cryptlib.h>
Public Types | |
enum | FlagsForAdvancedProcessBlocks { BT_InBlockIsCounter =1 , BT_DontIncrementInOutPointers =2 , BT_XorInput =4 , BT_ReverseDirection =8 , BT_AllowParallel =16 } |
Bit flags that control AdvancedProcessBlocks() behavior. More... | |
Public Member Functions | |
virtual void | ProcessAndXorBlock (const byte *inBlock, const byte *xorBlock, byte *outBlock) const =0 |
Encrypt or decrypt a block. | |
void | ProcessBlock (const byte *inBlock, byte *outBlock) const |
Encrypt or decrypt a block. | |
void | ProcessBlock (byte *inoutBlock) const |
Encrypt or decrypt a block in place. | |
virtual unsigned int | BlockSize () const =0 |
Provides the block size of the cipher. | |
virtual unsigned int | OptimalDataAlignment () const |
Provides input and output data alignment for optimal performance. | |
virtual bool | IsPermutation () const |
Determines if the transformation is a permutation. | |
virtual bool | IsForwardTransformation () const =0 |
Determines if the cipher is being operated in its forward direction. | |
virtual unsigned int | OptimalNumberOfParallelBlocks () const |
Determines the number of blocks that can be processed in parallel. | |
virtual size_t | AdvancedProcessBlocks (const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const |
Encrypt and xor multiple blocks using additional flags. | |
CipherDir | GetCipherDirection () const |
Provides the direction of the cipher. | |
Public Member Functions inherited from Algorithm | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. | |
virtual std::string | AlgorithmProvider () const |
Retrieve the provider of this algorithm. | |
Public Member Functions inherited from Clonable | |
virtual Clonable * | Clone () const |
Copies this object. | |
Interface for the data processing part of block ciphers.
Classes derived from BlockTransformation are block ciphers in ECB mode (for example the DES::Encryption class), which are stateless. These classes should not be used directly, but only in combination with a mode class (see CipherModeDocumentation in modes.h).
Definition at line 860 of file cryptlib.h.
Bit flags that control AdvancedProcessBlocks() behavior.
Definition at line 920 of file cryptlib.h.
|
inlinevirtual |
Definition at line 863 of file cryptlib.h.
|
pure virtual |
Encrypt or decrypt a block.
inBlock | the input message before processing |
outBlock | the output message after processing |
xorBlock | an optional XOR mask |
ProcessAndXorBlock encrypts or decrypts inBlock, xor with xorBlock, and write to outBlock.
The size of the block is determined by the block cipher and its documentation. Use BLOCKSIZE at compile time, or BlockSize() at runtime.
Implemented in SAFER::Enc, and SAFER::Dec.
Encrypt or decrypt a block.
inBlock | the input message before processing |
outBlock | the output message after processing |
ProcessBlock encrypts or decrypts inBlock and write to outBlock.
The size of the block is determined by the block cipher and its documentation. Use BLOCKSIZE at compile time, or BlockSize() at runtime.
Definition at line 884 of file cryptlib.h.
|
inline |
Encrypt or decrypt a block in place.
inoutBlock | the input message before processing |
ProcessBlock encrypts or decrypts inoutBlock in-place.
The size of the block is determined by the block cipher and its documentation. Use BLOCKSIZE at compile time, or BlockSize() at runtime.
Definition at line 893 of file cryptlib.h.
|
pure virtual |
Provides the block size of the cipher.
|
virtual |
Provides input and output data alignment for optimal performance.
Reimplemented in SAFER::Base.
|
inlinevirtual |
Determines if the transformation is a permutation.
Definition at line 907 of file cryptlib.h.
|
pure virtual |
Determines if the cipher is being operated in its forward direction.
|
inlinevirtual |
Determines the number of blocks that can be processed in parallel.
Bit-slicing is often used to improve throughput and minimize timing attacks.
Definition at line 917 of file cryptlib.h.
|
virtual |
Encrypt and xor multiple blocks using additional flags.
inBlocks | the input message before processing |
xorBlocks | an optional XOR mask |
outBlocks | the output message after processing |
length | the size of the blocks, in bytes |
flags | additional flags to control processing |
Encrypt and xor multiple blocks according to FlagsForAdvancedProcessBlocks flags.
|
inline |
Provides the direction of the cipher.
Definition at line 945 of file cryptlib.h.