#keccak #hash #hashing #hasher #keeps #green #algorithm

bin+lib keccak_prime

The hashing algorithm that keeps your blockchain green

1 unstable release

0.1.0 Nov 9, 2023

#16 in #keeps

MIT license

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

License

CC0. Attribution kindly requested. Blame taken too, but not liability.

Dependencies

~1.5MB
~27K SLoC