This would allow to extend configuration knobs for the software backend
in future and would be more consisted with potential similar knobs for
other backends.
The new API provides a better way for exposing support for parallel
processing in implemented backends and resolves the issue with branching
on each application of a Keccak permutation.
Replaces these non-additive "features" with a 1-of-n backend selection
enabled by using `cfg` instead.
- `asm` => `--cfg keccak_backend="armv8_asm"`
- `simd` => `--cfg keccak_backend="simd"`
Closes#85
The following crates now have a new `cfg` for backend selection:
- `ascon`: `--cfg ascon_backend="soft-compact"`
- `keccak`: `--cfg keccak_backend="soft-compact"`
This replaces the previous crate features, as suggested in #85
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`.
`keccak` was previously excluded from the toplevel workspace due to its
MSRV of 1.41 and incompatibilities with packages used by `ascon`.
This bumps the edition, changes the version to `0.2.0-pre` to denote it
contains breaking changes (though this is not intended to be a
`0.2.0-pre` release), and bumps MSRV.
With the MSRV bumped, `keccak` can and has been re-added to the toplevel
workspace.
`mips-unknown-linux-gnu` is now a Tier 3 target: rust-lang/rust#115218.
This means we can't use it for cross tests anymore since std is no
longer built for it.
This commit replaces it with `powerpc-unknown-linux-gnu`, a big endian
Tier 2 target.
Basically all of the `actions-rs/*` actions are unmaintained. See
<https://github.com/actions-rs/toolchain/issues/216> for more
information. Due to their age they generate several warnings in
CI runs.
To get rid of those warnings the occurrences of
`actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`,
and the occurrences of `actions-rs/cargo` are replaced by direct
invocations of `cargo`.
`packed_simd_2` no longer builds on nightly:
https://github.com/rust-lang/packed_simd/issues/343
This commit pins the nightly version for now, and disables the
`minimal-versions` check since it's not customizable and requires the
latest nightly.