#keccak #hash #hashing #hasher #green #keeps #prime

bin+lib keccak_prime

The hashing algorithm that keeps your blockchain green

1 unstable release

0.1.0 Nov 9, 2023

#15 in #keeps

Download history 13/week @ 2024-03-10 47/week @ 2024-03-31 18/week @ 2024-04-07 2/week @ 2024-04-14 98/week @ 2024-04-21 25/week @ 2024-04-28 7/week @ 2024-05-05 43/week @ 2024-05-12 5/week @ 2024-05-19 16/week @ 2024-06-02 38/week @ 2024-06-09 7/week @ 2024-06-16

61 downloads per month

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