78 Commits

Author SHA1 Message Date
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
Sebastian Ramacher
c48f3310d9
ascon v0.3.1 (#52) 2023-03-19 16:40:52 +01: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
633777a1c9
ascon v0.3.0 (#50) 2023-03-17 15:45:49 +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
dependabot[bot]
d8f8fbca7d
build(deps): bump subtle from 2.4.1 to 2.5.0 (#46)
Bumps [subtle](https://github.com/dalek-cryptography/subtle) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/dalek-cryptography/subtle/releases)
- [Changelog](https://github.com/dalek-cryptography/subtle/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/subtle/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: subtle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-11 14:36:52 -07:00
Artyom Pavlov
dc103866d4
ascon: use chunks_exact_mut for encoding permutation output (#48) 2023-03-01 10:37:39 +00:00
Tony Arcieri
17519f46c6
ascon: use chunks_exact for decoding permutation input (#47) 2023-02-28 14:09:08 -07:00
Tony Arcieri
a3906aab48
ascon v0.2.0 (#45) 2023-02-25 21:12:23 -07: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
11cb7366da
ascon: add Nonce type alias (#43)
Adds a type alias for Ascon nonces, set to `[u8; 16]`.

From the Ascon paper section 2.4:

https://link.springer.com/article/10.1007/s00145-021-09398-9

> The 320-bit initial state of Ascon is formed by the secret key K of
> k bits and nonce N of 128 bits
2023-02-25 19:23:59 -07:00
Tony Arcieri
37bc658306
ascon: Key type alias; cache key in Ascon state (#42)
- Adds a type alias for Ascon keys (16-byte)
- Stores key internally in `struct Ascon` so it doesn't need to be
  passed separately to `Ascon::finalize`.
2023-02-25 19:00:09 -07:00
Tony Arcieri
8773f6a963
CI: exclude keccak from toplevel workspace (#41)
The build is failing because `keccak` has a very old MSRV of 1.41, which
after merging #40 (which bumped the `ascon` edition to 2021) broke the
build because it can't handle the `edition` key.

As a workaround, this excludes `keccak` from the toplevel workspace so
it doesn't try to read the `ascon` edition key.

Separately, we should probably bump the `keccak` edition to 2021 as well
and release `keccak` v0.2.0, but that is left for future work.
2023-02-25 17:59:40 -07:00
Tony Arcieri
2a71bae6b2
ascon: 2021 edition (#40)
Since #39 bumped MSRV to 1.59, we can go ahead and do a 2021 edition
upgrade, including README.md in the toplevel rustdoc.
2023-02-25 17:36:18 -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
d50fca63d2
ascon: eliminate util module (#38)
Factors the `u8` <-> `u64` conversions to be inline
2023-02-25 16:36:54 -07:00
Tony Arcieri
6de759ac15
ascon: remove byteorder dependency (#37)
We can use the support in `core` instead
2023-02-25 15:49:52 -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
ace9dd7723
ascon: expose permutation (#35)
Provides raw access to the Ascon permutation, allowing it to be used for
more things than just AEAD.
2023-02-11 12:12:58 -07:00
Tony Arcieri
2e113f5f96
ascon: 2018 edition upgrade, lints, docs (#34)
- Bumps the crate's edition to 2018, which is MSRV-compatible
- Adds a more expansive set of lints
- Adds the `missing_docs` lint, and adds docs where missing
2023-02-11 11:54:59 -07:00
Tony Arcieri
5831f8bd51
keccak: 2018 edition upgrade, lints, docs (#32)
- Bumps the crate's edition to 2018, which is MSRV-compatible.
- Adds a more expansive set of lints
- Adds the `missing_docs` lint, and adds docs where missing
- Fixes tests on ARMv8
2023-02-11 11:40:15 -07:00
Tony Arcieri
88c73ff02b
README.md: add ascon (#33) 2023-02-11 11:35:18 -07:00
Tony Arcieri
75b1918ee9
ascon: new README.md (#31)
Follows our standard README.md template
2023-02-11 11:05:08 -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
Tony Arcieri
2d2be3511a
keccak: delete original CC0 license
The previously CC0-licensed public domain code has been relicensed as Apache 2.0 + MIT

Closes #29
2022-12-10 12:50:13 -07:00
Tony Arcieri
6c98ff8396
keccak v0.1.3 (#28) 2022-11-14 12:30:19 -07:00
Tony Arcieri
d82151aa0d
keccak: remove f1600_armv8_sha3_asm re-export (#27)
As discussed in #24
2022-11-14 11:06:04 -07:00
Tony Arcieri
6bd1a6d0ab
keccak: rename f1600_armv8_sha3_asm (#26)
Include the target architecture and feature in the name of the function.
2022-11-13 20:56:27 -07:00
Tony Arcieri
4e36eefaa0
keccak: rename aarch64_sha3 module to armv8 (#25)
This is more consistent with the other crates we have which implement
ARMv8 intrinsics, such as the `aes` and `polyal` crates.
2022-11-13 15:32:07 -07:00