Struct TrueKeccak
WV: turned this in a class for lazy inlining. More...
#include <libkeccak.h>
Public Types
| Type | Name |
|---|---|
| typedef uint64_t | UINT64 |
| typedef uint8_t | UINT8 |
| typedef UINT64 | tKeccakLane |
Public Functions
| Type | Name |
|---|---|
| void | FIPS202_SHA3_224 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output) |
| void | FIPS202_SHA3_256 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output) |
| void | FIPS202_SHA3_384 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output) |
| void | FIPS202_SHA3_512 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output) |
| void | FIPS202_SHAKE128 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output, int outputByteLen) |
| void | FIPS202_SHAKE256 (const uint8_t * input, unsigned int inputByteLen, uint8_t * output, int outputByteLen) |
| void | Keccak (unsigned int rate, unsigned int capacity, const uint8_t * input, unsigned long long int inputByteLen, uint8_t delimitedSuffix, uint8_t * output, unsigned long long int outputByteLen) |
| void | KeccakF1600_StatePermute (void * state) |
| int | LFSR86540 (UINT8 * LFSR) |
Public Static Functions
| Type | Name |
|---|---|
| UINT64 | load64 (const UINT8 * x) |
| void | store64 (UINT8 * x, UINT64 u) |
| void | xor64 (UINT8 * x, UINT64 u) |
Detailed Description
Function to compute the Keccak[r, c] sponge function over a given input.
Parameters:
rateThe value of the rate r.capacityThe value of the capacity c.inputPointer to the input message.inputByteLenThe number of input bytes provided in the input message.delimitedSuffixBits that will be automatically appended to the end of the input message, as in domain separation. This is a byte containing from 0 to 7 bits These n bits must be in the least significant bit positions and must be delimited with a bit 1 at position n (counting from 0=LSB to 7=MSB) and followed by bits 0 from position n+1 to position 7. Some examples:- If no bits are to be appended, then delimitedSuffix must be 0x01.
- If the 2-bit sequence 0,1 is to be appended (as for SHA3-*), delimitedSuffix must be 0x06.
- If the 4-bit sequence 1,1,1,1 is to be appended (as for SHAKE*), delimitedSuffix must be 0x1F.
-
If the 7-bit sequence 1,1,0,1,0,0,0 is to be absorbed, delimitedSuffix must be 0x8B.
-
outputPointer to the buffer where to store the output. outputByteLenThe number of output bytes desired.
Precondition:
One must have r+c=1600 and the rate a multiple of 8 bits in this implementation.
Public Types Documentation
typedef UINT64
typedef UINT8
typedef tKeccakLane
Public Functions Documentation
function FIPS202_SHA3_224
inline void TrueKeccak::FIPS202_SHA3_224 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output
)
Function to compute SHA3-224 on the input message. The output length is fixed to 28 bytes.
function FIPS202_SHA3_256
inline void TrueKeccak::FIPS202_SHA3_256 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output
)
Function to compute SHA3-256 on the input message. The output length is fixed to 32 bytes.
function FIPS202_SHA3_384
inline void TrueKeccak::FIPS202_SHA3_384 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output
)
Function to compute SHA3-384 on the input message. The output length is fixed to 48 bytes.
function FIPS202_SHA3_512
inline void TrueKeccak::FIPS202_SHA3_512 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output
)
Function to compute SHA3-512 on the input message. The output length is fixed to 64 bytes.
function FIPS202_SHAKE128
inline void TrueKeccak::FIPS202_SHAKE128 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output,
int outputByteLen
)
Function to compute SHAKE128 on the input message with any output length.
function FIPS202_SHAKE256
inline void TrueKeccak::FIPS202_SHAKE256 (
const uint8_t * input,
unsigned int inputByteLen,
uint8_t * output,
int outputByteLen
)
Function to compute SHAKE256 on the input message with any output length.
function Keccak
inline void TrueKeccak::Keccak (
unsigned int rate,
unsigned int capacity,
const uint8_t * input,
unsigned long long int inputByteLen,
uint8_t delimitedSuffix,
uint8_t * output,
unsigned long long int outputByteLen
)
function KeccakF1600_StatePermute
Function that computes the Keccak-f[1600] permutation on the given state.
function LFSR86540
Function that computes the linear feedback shift register (LFSR) used to define the round constants (see [Keccak Reference, Section 1.2]).
Public Static Functions Documentation
function load64
Function to load a 64-bit value using the little-endian (LE) convention. On a LE platform, this could be greatly simplified using a cast.
function store64
Function to store a 64-bit value using the little-endian (LE) convention. On a LE platform, this could be greatly simplified using a cast.
function xor64
Function to XOR into a 64-bit value using the little-endian (LE) convention. On a LE platform, this could be greatly simplified using a cast.
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/util/hash/libkeccak.h