106 Commits

Author SHA1 Message Date
Tony Arcieri
cf29ae32c6
keccak v0.2.0-rc.2 (#111) 2026-02-26 10:56:38 -07:00
Tony Arcieri
38d10d2194
keccak: extract Keccak1600 struct with CPU feature detection (#107)
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.
2026-02-17 12:33:46 -07:00
Tony Arcieri
9dc0b8d950
keccak: replace asm/simd features with --cfg keccak_backend (#106)
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
2026-02-13 16:04:57 -07:00
Tony Arcieri
a1be08a742
Replace no_unroll feature(s) with soft-compact cfg (#105)
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
2026-02-13 12:00:57 -07:00
Tony Arcieri
b27e9bff49
keccak: add CHANGELOG.md entry for v0.1.6 (#104)
Released in #103
2026-02-13 11:31:51 -07:00
Tony Arcieri
7ac1920198
keccak: ARMv8 asm! cleanups (#101)
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.
2026-02-13 07:29:27 -07:00
Tony Arcieri
239ff349af
Add Trusted Publishing Config (#102) 2026-02-12 19:20:35 -07:00
Tony Arcieri
0d9bf82ee5
Add workspace-level clippy config (#100)
Uses the same config from other repos (e.g. `traits`, `utils`)
2026-02-12 15:01:09 -07:00
Tony Arcieri
c3a9ef249e
keccak: bump cpufeatures to v0.3 (#99) 2026-02-12 12:20:53 -07:00
Tony Arcieri
d0c9b2a828
keccak v0.2.0-rc.1 (#98) 2026-01-22 11:10:05 -07:00
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
Tony Arcieri
2d857d196b
keccak: test on aarch64-apple-darwin (#96)
Uses the native `macos-latest` runner.

I'm curious if this reproduces a warning I'm seeing locally.
2026-01-22 10:52:27 -07:00
Artyom Pavlov
b7f87707ee
bash-f: tweak benchmarks (#94) 2025-10-24 01:59:24 +03:00
Artyom Pavlov
868527a13c
bash-f: minor tweaks (#93) 2025-10-24 01:26:08 +03:00
Alexandr Kitaev
4d778574a6
Add bash-f (STB 34.101.77-2020) (#92) 2025-10-24 00:49:57 +03:00
qj
f205d0efbb
Use doc_cfg in place of removed doc_auto_cfg feature (#91) 2025-10-05 23:13:30 +03:00
Tony Arcieri
95a176c25b
Cut new prereleases (#90)
Releases the following:
- `ascon` v0.5.0-rc.0
- `keccak` v0.2.0-rc.0
2025-09-02 20:15:00 -06:00
Tony Arcieri
2bc1c383a4
Upgrade to Rust 2024 edition; MSRV 1.85 (#89) 2025-09-02 20:09:23 -06:00
Артём Павлов [Artyom Pavlov]
13e501fa4e Update Cargo.lock 2025-01-25 18:38:04 +03:00
Artyom Pavlov
e47d6337ff
Update Cargo.lock (#83) 2024-11-22 09:46:14 +03:00
Artyom Pavlov
710788be9e
Bump MSRV to 1.81 (#84) 2024-11-22 09:43:18 +03:00
dependabot[bot]
5902ea6e37
build(deps): bump cpufeatures from 0.2.14 to 0.2.15 (#81) 2024-11-12 07:49:19 -07:00
Thomas Coratger
7a6ee9c1f1
keccak_p: improve efficiency of Theta phase (#80) 2024-09-23 08:28:11 +03:00
dependabot[bot]
7b7196894d
build(deps): bump cpufeatures from 0.2.12 to 0.2.14 (#79) 2024-09-09 06:09:25 -06:00
Tony Arcieri
c2b25b65ca README.md(s): use img.shields.io crate version badges 2024-09-04 19:48:50 -06:00
Luca Bruno
a30ba7775c
cargo: point repository metadata to clonable URLs (#77)
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.
2024-06-10 07:48:30 -06:00
Tony Arcieri
3c63bd4e6c
Cargo.lock: bump zeroize to v1.8.1 (#76)
This is possible now that we've bumped `ascon`'s MSRV to 1.60
2024-06-05 08:05:33 -06:00
Sebastian Ramacher
8ef2e47617
ascon: MSRV 1.60 (#75) 2024-06-01 12:37:24 -06:00
dependabot[bot]
b82fdb2121
build(deps): bump actions/cache from 3 to 4 (#72)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 06:42:42 -07:00
Tony Arcieri
b67665f9bb
keccak v0.2.0-pre.0 (#71) 2024-01-16 12:13:55 -07:00
Tony Arcieri
8b74c7fc1a ascon/Cargo.toml: rust -> Rust 2024-01-16 12:11:08 -07:00
Tony Arcieri
7675b171ad
keccak: 2021 edition upgrade; MSRV 1.60 (#70)
`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.
2024-01-12 14:45:05 -07:00
Tony Arcieri
40c50c1641
keccak v0.1.5 (#69) 2024-01-12 11:30:01 -07:00
Coda Hale
2dc13bf92e
keccak: enable asm backend for p1600 (#68) 2024-01-09 12:41:20 -07:00
Tony Arcieri
a3a4e01607
Revert "Update Cargo.lock" (#67)
This reverts commit 3a9a29ef77f4718b6a385d08779d098dded51ef7.

This update is higher than the current Ascon MSRV and broke the build
2023-12-09 14:46:16 -07:00
Артём Павлов [Artyom Pavlov]
3a9a29ef77 Update Cargo.lock 2023-11-18 15:32:47 +03:00
Tony Arcieri
9e4f6bc695
keccak: don't test simd feature in minimal-versions workflow (#66)
It requires `nightly`, whereas the tests are run under `stable`.

The `simd` feature itself is already tested in the `test-simd` job.
2023-11-18 15:31:51 +03:00
Artyom Pavlov
329d4cdcb1
Replace cross tests with MIRI (#63) 2023-09-12 17:19:27 +03:00
dependabot[bot]
48cc4acf38
build(deps): bump actions/checkout from 3 to 4 (#61)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:58:53 -06:00
Tony Arcieri
651a34ea2f
keccak: replace CI tests on MIPS with PPC32 (#62)
`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.
2023-09-11 08:39:33 -06:00
Artyom Pavlov
4730c6fbba
benches: remove criterion deps workaround (#60) 2023-08-19 19:24:47 +03:00
Artyom Pavlov
690624016e
Pin Clippy version and fix lints (#59) 2023-08-07 14:36:22 +00:00
Sebastian Ramacher
aa5da2013e
ascon v0.4.0 (#58) 2023-07-27 22:09:49 +02:00
Alexander Wagner
e767312a21
ascon: Add Drop & ZeroizeOnDrop for State (#57)
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.
2023-05-23 15:10:15 +02:00
Tony Arcieri
7cdccabc7a
keccak v0.1.4 (#56) 2023-05-04 11:12:22 -06:00
Alexander Wagner
6e512a3b1a
keccak: Add keccak_p fns for [200, 400, 800, 1600] (#55)
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.
2023-04-30 10:25:27 -06:00
Tony Arcieri
5eab159369 Add SECURITY.md 2023-04-23 20:02:13 -06:00
Tony Arcieri
9932b6b9ca
README.md: fix "Keccak" link 2023-04-07 07:54:39 -06:00
Tony Arcieri
c90f1be217
ascon: link to ascon-aead and ascon-hash in README.md (#54)
Helps with discovery of the other crates and their relationships
2023-04-03 15:49:13 -06:00
Dirk Stolle
4b0b454d4a
Replace unmaintained actions-rs/* actions in CI workflows (#53)
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`.
2023-03-24 08:53:47 -06:00