34 Commits

Author SHA1 Message Date
Artyom Pavlov
1efeff7d02
keccak: refactor to a closure-based API (#113)
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.
2026-03-06 16:07:46 +03: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
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
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
Alexandr Kitaev
4d778574a6
Add bash-f (STB 34.101.77-2020) (#92) 2025-10-24 00:49:57 +03:00
Tony Arcieri
2bc1c383a4
Upgrade to Rust 2024 edition; MSRV 1.85 (#89) 2025-09-02 20:09:23 -06:00
Artyom Pavlov
710788be9e
Bump MSRV to 1.81 (#84) 2024-11-22 09:43:18 +03: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
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
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
690624016e
Pin Clippy version and fix lints (#59) 2023-08-07 14:36:22 +00: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
Sebastian Ramacher
fc88ab5cc3
ascon: drop MSRV to 1.56 (#51)
* 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.
2023-03-19 16:23:24 +01:00
Sebastian Ramacher
3e38152a4a
ascon: replace implementation with ascon-core (#49)
Originally from https://github.com/sebastinas/ascon-aead/tree/main/ascon-core
2023-03-12 09:25:14 -06:00
Tony Arcieri
c8b07a46c8
ascon: use aead crate for AEAD API; MSRV 1.60 (#44)
Impls the standard AEAD API from the `aead` crate.

Eventually we can split this API out into a separate crate, e.g.
`ascon-aead`, but for now this just gets things working initially.

Uses weak/namespaced features which requires MSRV 1.60.
2023-02-25 20:48:50 -07:00
Tony Arcieri
8eb14719c0
ascon: extract Ascon permutation type; MSRV 1.59 (#39)
Adds a struct which wraps the permutation state, using const generics as
well as `feature(const_generics_defaults)` to express the `A`/`B`
parameters for `Ascon(a,b)`.
2023-02-25 17:08:19 -07:00
Tony Arcieri
e4c0b56c7c
ascon: add no_std support (#36)
The permutation does not have any `std`/`alloc` dependency.

The current AEAD interface requires `alloc` (though we should migrate it
to use the `aead` crate anyway).
2023-02-11 12:28:02 -07:00
Tony Arcieri
dac6767968
ascon: import crate sources (#30)
Imports the source code of the `ascon` crate originally from:

https://github.com/quininer/ascon

Code is imported as of this commit:

    commit 997e51ff0cad48510ad31934f9c361d25bf5f938
    Author: quininer kel <quininer@live.com>
    Date:   Mon Feb 20 09:52:28 2017 +0800

        refactor: remove no_std

- Formatted code using rustfmt 1.5.1-stable (d5a82bbd 2023-02-07)
- Fixed clippy nits from clippy 0.1.67 (d5a82bbd 2023-02-07)

Dual licensed as Apache 2.0 + MIT

Permission given here:

https://github.com/RustCrypto/sponges/pull/30#discussion_r1103554334

Co-authored-by: quininer kel <quininer@live.com>
2023-02-11 10:34:01 -07:00
Remco Bloemen
b2d1e84abf
keccak: add aarch64 asm intrinsics implementation keccak_f1600 (#23) 2022-11-01 10:08:45 -06:00
Dirk Stolle
b68b313ee2
Update actions used in GitHub Actions workflows to newest version (#19) 2022-10-05 18:12:39 -06:00
Alexander Wagner
f31b4b6eee
Use portable_simd instead of deprecate packed_simd (#16) 2022-05-24 17:07:32 -06:00
Tony Arcieri
e29a53e1d9
keccak: fix build (#13)
`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.
2022-05-24 15:32:08 -06:00
Alexander Wagner
2736330d93
Add f1600x{2, 4, 8} (#8) 2022-05-12 08:49:34 -06:00
Alexander Wagner
0af08cbb1e
Add cargo-cache from RustCrypto/actions (#10) 2022-02-21 16:10:35 +00:00
Alexander Wagner
f9988e9e02
Add minimal-versions from RustCrypto/actions (#11) 2022-02-21 15:57:26 +00:00
Alexander Wagner
b7031fba6a
Use common CI patterns (#9)
* .github: Use cross-install action

* .github: Use set-msrv workflow
2022-02-15 07:04:05 -07:00
Alexander Wagner
71c7948b23
Revive CI with GH Workflows (#6) 2022-01-26 03:26:50 +00:00