From 8d68648fa07c00c39cfc0765ad3c856da1b0f327 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Sat, 10 Jun 2023 09:57:31 -0600 Subject: [PATCH] k12: 2021 edition upgrade; MSRV 1.56 --- .github/workflows/k12.yml | 4 ++-- Cargo.lock | 19 ------------------- Cargo.toml | 2 +- k12/Cargo.toml | 15 ++++++++++----- k12/README.md | 4 ++-- 5 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/k12.yml b/.github/workflows/k12.yml index cabd7c640..a1ea61e14 100644 --- a/.github/workflows/k12.yml +++ b/.github/workflows/k12.yml @@ -21,7 +21,7 @@ jobs: set-msrv: uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master with: - msrv: 1.41.0 + msrv: 1.56.0 build: needs: set-msrv @@ -32,7 +32,7 @@ jobs: - ${{needs.set-msrv.outputs.msrv}} - stable target: - # - thumbv7em-none-eabi # TODO: no_std w/o liballoc + - thumbv7em-none-eabi - wasm32-unknown-unknown steps: - uses: actions/checkout@v3 diff --git a/Cargo.lock b/Cargo.lock index d7038a235..124ba657e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,15 +129,6 @@ dependencies = [ "proc-macro-hack", ] -[[package]] -name = "k12" -version = "0.2.1" -dependencies = [ - "digest", - "hex-literal", - "sha3 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "keccak" version = "0.1.4" @@ -251,16 +242,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - [[package]] name = "shabal" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index 85c713c97..7ee1c07fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ members = [ "fsb", "gost94", "groestl", - "k12", "md2", "md4", "md5", @@ -24,6 +23,7 @@ members = [ exclude = [ "ascon-hash", "belt-hash", + "k12", "skein", ] diff --git a/k12/Cargo.toml b/k12/Cargo.toml index 05e835040..248a02a93 100644 --- a/k12/Cargo.toml +++ b/k12/Cargo.toml @@ -1,24 +1,29 @@ [package] name = "k12" -version = "0.2.1" +version = "0.3.0-pre" description = "Pure Rust implementation of the KangarooTwelve hash function" -authors = ["Diggory Hardy "] +authors = ["RustCrypto Developers", "Diggory Hardy "] license = "Apache-2.0 OR MIT" readme = "README.md" -edition = "2018" +edition = "2021" documentation = "https://docs.rs/k12" repository = "https://github.com/RustCrypto/hashes" keywords = ["crypto", "hash", "digest"] categories = ["cryptography", "no-std"] +rust-version = "1.56" [dependencies] digest = { version = "0.10.7", default-features = false, features = ["core-api"] } -sha3 = "0.10.8" +sha3 = { version = "0.10.8", default-features = false } [dev-dependencies] digest = { version = "0.10.7", features = ["alloc", "dev"] } -hex-literal = "0.2.2" +hex-literal = "0.3" [features] default = ["std"] std = ["digest/std"] + +# TODO: remove when crate will be part of the root workspace +[profile.dev] +opt-level = 2 diff --git a/k12/README.md b/k12/README.md index 844711ff4..2c2c93996 100644 --- a/k12/README.md +++ b/k12/README.md @@ -13,7 +13,7 @@ function (XOF). ## Minimum Supported Rust Version -Rust **1.41** or higher. +Rust **1.56** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -45,7 +45,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/k12/badge.svg [docs-link]: https://docs.rs/k12/ [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.56+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes [build-image]: https://github.com/RustCrypto/hashes/workflows/k12/badge.svg?branch=master