25 Commits

Author SHA1 Message Date
Sebastian Ramacher
8ef2e47617
ascon: MSRV 1.60 (#75) 2024-06-01 12:37:24 -06:00
Tony Arcieri
8b74c7fc1a ascon/Cargo.toml: rust -> Rust 2024-01-16 12:11:08 -07: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
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
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
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
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
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