tiny-keccak
An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve.
The Keccak-f[1600] permutation is fully unrolled; it's nearly as fast
as the Keccak team's optimized permutation.
Usage
In your Cargo.toml specify what features (hash functions, you are intending to use).
Available options are: cshake, fips202, k12, keccak, kmac, parallel_hash, sha3,
shake, sp800, tuple_hash.
[]
= { = "2.0", = ["sha3"] }
Example
use Sha3;
Benchmarks
Benchmarked with rust-crypto sha3 on:
MacBook Pro (Retina, 15-inch, Mid 2015)
2,5 GHz Intel Core i7
16 GB 1600 MHz DDR3
Intel Iris Pro 1536 MB
Benchmark code is available here
running 4 tests
test rust_crypto_sha3_256_input_32_bytes ... bench: 677 ns/iter (+/- 113) = 47 MB/s
test rust_crypto_sha3_256_input_4096_bytes ... bench: 17,619 ns/iter (+/- 4,174) = 232 MB/s
test tiny_keccak_sha3_256_input_32_bytes ... bench: 569 ns/iter (+/- 204) = 56 MB/s
test tiny_keccak_sha3_256_input_4096_bytes ... bench: 17,185 ns/iter (+/- 4,575) = 238 MB/s