Crate keccak_prime
source ·Expand description
Keccak derived functions specified in FIPS-202
, SP800-185
and KangarooTwelve
.
Example
let input_a = b"hello world";
let input_b = b"!";
let mut output = [0u8; 32];
hasher.update(input_a);
hasher.update(input_b);
hasher.finalize(&mut output);
Credits
coruus/keccak-tiny
for C implementation of keccak function@quininer
forno-std
support and rust implementationSP800-185
mimoo/GoKangarooTwelve
for GO implementation ofKangarooTwelve
@Vurich
for optimizations@oleganza
for adding support for half-duplex use
License
CC0
. Attribution kindly requested. Blame taken too,
but not liability.
Modules
- This is a simplified implementation of the Fortuna CSPRNG. The main difference from the original Fortuna is that we don’t use hashes for seeding; the hash is computed externally. Instead, we generate a key before the generation of pseudorandom data.
- Implements the Keccak-prime function.
- Sloth VDF implementation.
Structs
- Holds internal Keccak state.
- The
Keccak
hash functions defined inKeccak SHA3 submission
. - The
SHA3
hash functions defined inFIPS-202
. - The
SHAKE
extendable-output functions defined inFIPS-202
.
Traits
- A trait for hashing an arbitrary stream of bytes.
- Extendable-output function (
XOF
) is a function on bit strings in which the output can be extended to any desired length.
Functions
keccak-f[1600, 24]