We pass in `state.as_mut_ptr()` as `x0`, which was previously marked as
`in`. However, it's modified in the `asm!`, e.g.:
sub x0, x0, #192
Note: it's also post-incremented by `ld1.1d` as state is loaded.
Since it's modified, it needs to be `inout`. This marks it as such,
using the `=> _` syntax to discard the result, then it's reset, then
modified as state is written).
Similar mutations were occurring with `x1` and `x8` as well, which have
been modified accordingly.
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`.
This tweaks the `repository` fields in Cargo metadata in order to use the correct (i.e. git clonable) URL.
The existing GitHub webUI URLs for each package have been retained and moved to `homepage` fields.
`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.
Not zeroizing the state allows to recover any squeezed output. This is
because the `ascon` permutations can be inversed. Hence, access to the
complete state allows to perform this operation.
Due to the generics approach of the keccak_p routine, the performance
degrades significantly. To encounter this the commonly used functions
are now defined by macros.
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`.
* ascon: make tests compatible with Rust 1.56
* ascon: drop MSRV to 1.56
MSRV was raised for `ascon` in c8b07a46c86b240d3ce9c5e75a4f23117a874e19.
After the merge of `ascon-core`, 1.56 provides all required features.