Multi-pass GOST hash generator. More...
Public Member Functions | |
void | init (void) noexcept |
Initialize the GOST hasher. | |
void | process (const uint32_t pBlock[8]) noexcept |
Process a single 8 32-bit integer block of data. | |
void | process (const uint8_t pBlock[32]) noexcept |
Process a 32 byte block of data. | |
void | process (const void *pInput, uintptr_t uLength) noexcept |
Process an arbitrary number of input bytes. | |
void | finalize (void) noexcept |
Finalize the hashing. | |
Public Attributes | |
GOST_t | m_Hash |
Current 256 bit value. | |
uint64_t | m_uByteCount |
Number of bytes processed (64 bit value) | |
uint64_t | m_uTotalCount |
Number of bits processed. | |
uint32_t | m_uNativeHash [8] |
Hash in native endian. | |
uint32_t | m_uSum [8] |
Running data sum. | |
uint8_t | m_CacheBuffer [32] |
Input buffer for processing. | |
Static Public Attributes | |
static const uint32_t | g_TestParmsSBox [8][16] |
Test parameters S-Box, as copied from Wikipedia. | |
static const uint32_t | g_SBoxTable [4][256] |
Precalculated SBoxTable using g_TestParmsSBox input. | |
Multi-pass GOST hash generator.
Full documentation on this hash format can be found here https://en.wikipedia.org/wiki/GOST_(hash_function)
This structure is needed to perform a multi-pass GOST hash and contains cached data and a running checksum.
|
noexcept |
Finalize the hashing.
When multi-pass hashing is performed, this call is necessary to finalize the hash so that the generated checksum can be applied into the hash
|
noexcept |
Initialize the GOST hasher.
Call this function before any hashing is performed
|
noexcept |
Process a single 8 32-bit integer block of data.
GOST data is processed in 8 32-bit chunks. This function will process 32 bytes on input and update the hash and checksum
pBlock | Pointer to a buffer of 8 32 bit values in native endian to hash |
|
noexcept |
Process a 32 byte block of data.
GOST data is processed in 8 32-bit chunks. This function will convert 32 bytes of data arranged as non-aligned array of 8 32 bit little endian integers and pass them to the actual function to do the data processing
pBlock | Pointer to a buffer of 32 byte values to hash |
|
noexcept |
Process an arbitrary number of input bytes.
Process input data into the hash. If data chunks are not a multiple of 64 bytes, the excess will be cached and a future call will continue the hashing where it left off.
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
static |
Precalculated SBoxTable using g_TestParmsSBox input.
Full documentation on this hash format can be found here https://en.wikipedia.org/wiki/GOST_(hash_function)
|
static |
Test parameters S-Box, as copied from Wikipedia.
GOST test parameters for an S-Box.
Full documentation on this hash format can be found here https://en.wikipedia.org/wiki/GOST_(hash_function)
uint8_t Burger::GOSTHasher_t::m_CacheBuffer[32] |
Input buffer for processing.
GOST_t Burger::GOSTHasher_t::m_Hash |
Current 256 bit value.
uint64_t Burger::GOSTHasher_t::m_uByteCount |
Number of bytes processed (64 bit value)
uint32_t Burger::GOSTHasher_t::m_uNativeHash[8] |
Hash in native endian.
uint32_t Burger::GOSTHasher_t::m_uSum[8] |
Running data sum.
uint64_t Burger::GOSTHasher_t::m_uTotalCount |
Number of bits processed.