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.
This commit is contained in:
Tony Arcieri 2024-01-12 21:45:05 +00:00 committed by GitHub
parent 40c50c1641
commit 7675b171ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 33 deletions

View File

@ -21,7 +21,7 @@ jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.41.0
msrv: 1.60.0
build:
needs: set-msrv

22
Cargo.lock generated
View File

@ -9,6 +9,28 @@ dependencies = [
"zeroize",
]
[[package]]
name = "cpufeatures"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
[[package]]
name = "keccak"
version = "0.2.0-pre"
dependencies = [
"cpufeatures",
]
[[package]]
name = "libc"
version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
[[package]]
name = "zeroize"
version = "1.6.0"

View File

@ -1,6 +1,6 @@
[workspace]
exclude = ["keccak"] # TODO(tarcieri): add back to `members` when MSRV >= 1.56
resolver = "2"
members = [
"ascon",
#"keccak",
"keccak",
]

25
keccak/Cargo.lock generated
View File

@ -1,25 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "cpufeatures"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
dependencies = [
"libc",
]
[[package]]
name = "keccak"
version = "0.1.5"
dependencies = [
"cpufeatures",
]
[[package]]
name = "libc"
version = "0.2.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"

View File

@ -1,6 +1,6 @@
[package]
name = "keccak"
version = "0.1.5"
version = "0.2.0-pre"
description = """
Pure Rust implementation of the Keccak sponge function including the keccak-f
and keccak-p variants
@ -12,7 +12,8 @@ repository = "https://github.com/RustCrypto/sponges/tree/master/keccak"
keywords = ["crypto", "sponge", "keccak", "keccak-f", "keccak-p"]
categories = ["cryptography", "no-std"]
readme = "README.md"
edition = "2018"
edition = "2021"
rust-version = "1.60"
[features]
asm = [] # Use optimized assembly when available (currently only ARMv8)

View File

@ -22,7 +22,7 @@ is built on this crate.
## Minimum Supported Rust Version
Rust **1.41** or higher by default, or **1.59** with the `asm` feature enabled.
Rust **1.60** or higher.
Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.
@ -56,7 +56,7 @@ dual licensed as above, without any additional terms or conditions.
[build-image]: https://github.com/RustCrypto/sponges/actions/workflows/keccak.yml/badge.svg
[build-link]: https://github.com/RustCrypto/sponges/actions/workflows/keccak.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/369879-sponges

View File

@ -54,7 +54,6 @@
)]
use core::{
convert::TryInto,
fmt::Debug,
mem::size_of,
ops::{BitAnd, BitAndAssign, BitXor, BitXorAssign, Not},