mirror of
https://github.com/logos-blockchain/sponges.git
synced 2026-07-30 02:23:31 +00:00
Extracts a struct to hold the state for Keccak-p1600/Keccak-f1600, along with a CPU feature detection `InitToken` which is queried at the time the state is initialized. The previous `p1600`/`f1600` functions with CPU feature detection support have been factored onto this struct, leaving the software implementation available unconditionally as part of the public API, and avoiding performing CPU feature detection on each invocation of the permutation. It looks like it should be possible to slot a struct like this into something like `Sha3HasherCore` in place of its current `state` array.
RustCrypto: Keccak Sponge Function
Pure Rust implementation of the Keccak Sponge Function including the keccak-f and keccak-p variants.
About
This crate implements the core Keccak sponge function, upon which many other cryptographic functions are built.
For the SHA-3 family including the SHAKE XOFs, see the sha3 crate, which
is built on this crate.
Minimum Supported Rust Version
Rust 1.85 or higher.
Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.
SemVer Policy
- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above
License
Licensed under either of:
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.