Tony Arcieri 4519b3bcb9
keccak: test asm feature in CI (#97)
Also fixes a warning for the ARMv8 `asm!` backend:

error[E0133]: use of inline assembly is unsafe and requires unsafe block
   --> keccak/src/armv8.rs:8:5
    |
8   | /     core::arch::asm!("
9   | |         // Read state
10  | |         ld1.1d {{ v0- v3}}, [x0], #32
11  | |         ld1.1d {{ v4- v7}}, [x0], #32
...   |
119 | |         options(nostack)
120 | |     );
    | |_____^ use of inline assembly
    |
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
    = note: inline assembly is entirely unchecked and can cause undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
   --> keccak/src/armv8.rs:7:1
    |
7   | pub unsafe fn p1600_armv8_sha3_asm(state: &mut [u64; 25], round_count: usize) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

For more information about this error, try `rustc --explain E0133`.
2026-01-22 11:05:24 -07:00
..
2026-01-22 11:05:24 -07:00
2025-09-02 20:15:00 -06:00
2024-01-12 11:30:01 -07:00

RustCrypto: Keccak Sponge Function

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Pure Rust implementation of the Keccak Sponge Function including the keccak-f and keccak-p variants.

Documentation

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.