Crypto++ 8.7
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. More... | |
void | ProcessBlock (const byte *inBlock, byte *outBlock) const |
Encrypt or decrypt a block. More... | |
void | ProcessBlock (byte *inoutBlock) const |
Encrypt or decrypt a block in place. More... | |
virtual unsigned int | BlockSize () const =0 |
Provides the block size of the cipher. More... | |
virtual unsigned int | OptimalDataAlignment () const |
Provides input and output data alignment for optimal performance. More... | |
virtual bool | IsPermutation () const |
Determines if the transformation is a permutation. More... | |
virtual bool | IsForwardTransformation () const =0 |
Determines if the cipher is being operated in its forward direction. More... | |
virtual unsigned int | OptimalNumberOfParallelBlocks () const |
Determines the number of blocks that can be processed in parallel. More... | |
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. More... | |
CipherDir | GetCipherDirection () const |
Provides the direction of the cipher. More... | |
Public Member Functions inherited from Algorithm | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. More... | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. More... | |
virtual std::string | AlgorithmProvider () const |
Retrieve the provider of this algorithm. More... | |
Public Member Functions inherited from Clonable | |
virtual Clonable * | Clone () const |
Copies this object. More... | |
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 855 of file cryptlib.h.
Bit flags that control AdvancedProcessBlocks() behavior.
Definition at line 915 of file cryptlib.h.
|
inlinevirtual |
Definition at line 858 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 879 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 888 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 902 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 912 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 940 of file cryptlib.h.