|Duplex (const Transformation *aF, const PaddingRule *aPad, unsigned int aRate)|
|void||duplexing (const UINT8 *input, unsigned int inputLengthInBits, UINT8 *output, unsigned int desiredOutputLengthInBits)|
|unsigned int||getCapacity ()|
|unsigned int||getMaximumInputLength ()|
|unsigned int||getMaximumOutputLength ()|
|virtual string||getDescription () const|
|const Transformation *||f|
|const PaddingRule *||pad|
|auto_ptr< UINT8 >||state|
|ostream &||operator<< (ostream &a, const Duplex &duplex)|
Class implementing the duplex construction.
The constructor. The transformation, padding rule and rate are given to the constructor, while the capacity is computed from the function width and the requested rate. The duplex construction is initialized.
|aF||A pointer to the transformation used in the sponge construction.|
|aPad||A pointer to the padding rule used in the sponge construction.|
|aRate||The desired value of the rate (in bits), not necessarily a multiple of 8.|
Internal method to compute ρ_max, the maximum input length. This value is such that an input message fits in one block after padding.
|void Duplex::duplexing||(||const UINT8 *||input,|
Method that performs a duplexing call. The input data is given as a sequence of bytes. Within each byte, the bits are understood to be ordered from the least significant bit to the most significant bit. The output data are given using the same structure.
|input||The input data. When inputLengthInBits is not a multiple of 8, the last bits of data must be in the least significant bits of the last byte.|
|inputLengthInBits||The length in bits of the data provided in input. This value does not need to be a multiple of 8.|
|output||The buffer where to store the output data.|
|desiredOutputLengthInBits||The length in bits of the output.|
|unsigned int Duplex::getCapacity||(||)|
Method that returns the capacity of the sponge function.
|string Duplex::getDescription||(||)|| const
Method that returns a string with a description of itself.
|unsigned int Duplex::getMaximumInputLength||(||)|
Method that returns the maximum input length in bits of the duplexing() method.
|unsigned int Duplex::getMaximumOutputLength||(||)|
Method that returns the maximum output length in bits of the duplexing() method.
|ostream& operator<<||(||ostream &||a,|
|const Duplex &||duplex|
Method that prints a brief description of the sponge function.
|unsigned int Duplex::capacity
The capacity of the duplex construction.
The transformation (or permutation) used by the sponge construction. The memory allocated by f is assumed to belong to the caller; this class does not free the allocated memory.
The padding rule used by the sponge construction. The memory allocated by pad is assumed to belong to the caller; this class does not free the allocated memory.
|unsigned int Duplex::rate
The rate of the duplex construction.
|unsigned int Duplex::rho_max
The maximum input length of the duplex construction.