1 unstable release
0.1.0 | Nov 9, 2023 |
---|
#15 in #keeps
61 downloads per month
67KB
1.5K
SLoC
Keccak Prime
The hashing algorithm that keeps your PoW blockchain green.
To make use of CPU acceleration for AES, provide the following compilation flags:
RUSTFLAGS="-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"
lib.rs
:
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.
Dependencies
~1.5MB
~27K SLoC