From fc88ab5cc368cd1c2bb811a99a33c038886bfdb9 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 19 Mar 2023 16:23:24 +0100 Subject: [PATCH] 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. --- .github/workflows/ascon.yml | 2 +- Cargo.lock | 2 +- ascon/Cargo.toml | 4 ++-- ascon/README.md | 4 ++-- ascon/src/lib.rs | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ascon.yml b/.github/workflows/ascon.yml index 0322cc3..f4165f8 100644 --- a/.github/workflows/ascon.yml +++ b/.github/workflows/ascon.yml @@ -21,7 +21,7 @@ jobs: set-msrv: uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master with: - msrv: 1.60.0 + msrv: 1.56.0 build: needs: set-msrv diff --git a/Cargo.lock b/Cargo.lock index 4bf20dc..049fc8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,4 +4,4 @@ version = 3 [[package]] name = "ascon" -version = "0.3.0" +version = "0.3.1-pre" diff --git a/ascon/Cargo.toml b/ascon/Cargo.toml index 5547664..dbc6b18 100644 --- a/ascon/Cargo.toml +++ b/ascon/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ascon" -version = "0.3.0" +version = "0.3.1-pre" description = "Pure rust implementation of the Ascon permutation" authors = [ "Sebastian Ramacher ", @@ -13,7 +13,7 @@ keywords = ["Ascon", "crypto", "permutation"] categories = ["cryptography", "no-std"] readme = "README.md" edition = "2021" -rust-version = "1.60" +rust-version = "1.56" [features] no_unroll = [] # Do not unroll loops for binary size reduction diff --git a/ascon/README.md b/ascon/README.md index e1e8eca..78f391f 100644 --- a/ascon/README.md +++ b/ascon/README.md @@ -29,7 +29,7 @@ portfolio of the [CAESAR competition]. ## Minimum Supported Rust Version -This crate requires **Rust 1.60** at a minimum. +This crate requires **Rust 1.56** at a minimum. We may change the MSRV in the future, but it will be accompanied by a minor version bump. @@ -58,7 +58,7 @@ dual licensed as above, without any additional terms or conditions. [build-image]: https://github.com/RustCrypto/sponges/actions/workflows/ascon.yml/badge.svg [build-link]: https://github.com/RustCrypto/sponges/actions/workflows/ascon.yml [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/369879-sponges diff --git a/ascon/src/lib.rs b/ascon/src/lib.rs index 6eb9a3a..e2d5bda 100644 --- a/ascon/src/lib.rs +++ b/ascon/src/lib.rs @@ -404,7 +404,8 @@ mod tests { ); let bytes = state.as_bytes(); - let state2 = State::try_from(bytes.as_slice()); + // test TryFrom<&[u8]> + let state2 = State::try_from(&bytes[..]); assert_eq!(state2.expect("try_from bytes").x, state.x); let state2 = State::from(&bytes);