-
Notifications
You must be signed in to change notification settings - Fork 9
Hash functions
Generator hash
server as a base class for SHA-3 candidates functions and other hash functions.
For more information on SHA-3 candidate hash functions and project background, see the official SHA-3 competition webpage. Hash functions used in CryptoStreams should be enough documented at hash functions list.
An exemplary configuration for SHA-3 stream in EACirc:
"stream" : {
"type" : "hash",
"algorithm" : "Keccak",
"input_size" : 32,
"source" : {
"type" : "counter"
},
"round" : 3,
"hash_size" : 32,
},
-
type
:hash
selects class of hash functions. -
algorithm
specifies the hash function to use; see table of hash functions. -
input_size
defines the length of the hash function's input. It is in bytes, as operation on bits is not available right now. -
source
contains JSON subtree with source of data Stream. Recommended arecounter
or strict avalanche criterionsac
. -
round
limits the number of rounds for the selected algorithm. -
hash_size
is the length of the output hash in bytes for the algorithm (for supported lengths see table of hash functions).
All SHA-3 candidate algorithms must support 224, 256, 384, and 512-bit message digests, and must support a maximum message length of at least 264 bits. Other hash functions have different sizes, for function-specific information, refer to hash functions list.
The project functionality is separated into several files:
-
hash_stream
The main project file, implementsstream
interface. Contains methodnext()
for outputing a test vector. -
hash_factory
This file contains links all the hash functions and contains factory that initializes the selected function for the computation. -
hash_interface
The interface provides unified access to all hash functions. - Directories
sha3
andhash
These folders containhash_functions
folders with sub-folders for concrete implementation.
Getting started
Building notes
Running notes
Recommended scenarios
Configuration file structure
Developer notes
Framework components
Submodules
Third party libraries
Coding guide
Testing
Known bugs
User notes
List of streams
Block ciphers
Stream ciphers
Hash functions
PRNGs
WIP CAESAR
Useful links