From d81b8df8e9342ea12ea2a6c90b8ea7074a202b04 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 17:39:11 -0800 Subject: [PATCH 1/5] Upgrade all crates to the edition 2024 and bump MSRV to 1.85 --- .github/workflows/belt-mac.yml | 4 ++-- .github/workflows/cbc-mac.yml | 4 ++-- .github/workflows/cmac.yml | 4 ++-- .github/workflows/hmac.yml | 4 ++-- .github/workflows/pmac.yml | 4 ++-- .github/workflows/retail-mac.yml | 4 ++-- .github/workflows/workspace.yml | 2 +- README.md | 20 +++++++------------- belt-mac/Cargo.toml | 4 ++-- cbc-mac/Cargo.toml | 4 ++-- cmac/Cargo.toml | 4 ++-- hmac/Cargo.toml | 4 ++-- pmac/Cargo.toml | 4 ++-- retail-mac/Cargo.toml | 4 ++-- 14 files changed, 32 insertions(+), 38 deletions(-) diff --git a/.github/workflows/belt-mac.yml b/.github/workflows/belt-mac.yml index 056ba8e..9f02252 100644 --- a/.github/workflows/belt-mac.yml +++ b/.github/workflows/belt-mac.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -49,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cbc-mac.yml b/.github/workflows/cbc-mac.yml index 3b46aa8..876cf30 100644 --- a/.github/workflows/cbc-mac.yml +++ b/.github/workflows/cbc-mac.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -50,7 +50,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cmac.yml b/.github/workflows/cmac.yml index 1e7bd6f..2e26307 100644 --- a/.github/workflows/cmac.yml +++ b/.github/workflows/cmac.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -49,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/hmac.yml b/.github/workflows/hmac.yml index a34ccf5..00de829 100644 --- a/.github/workflows/hmac.yml +++ b/.github/workflows/hmac.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -48,7 +48,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pmac.yml b/.github/workflows/pmac.yml index c3a889b..7c584b8 100644 --- a/.github/workflows/pmac.yml +++ b/.github/workflows/pmac.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -49,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/retail-mac.yml b/.github/workflows/retail-mac.yml index 17f8ec0..3094bb3 100644 --- a/.github/workflows/retail-mac.yml +++ b/.github/workflows/retail-mac.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -49,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index c823f4d..6b2d7f8 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -17,7 +17,7 @@ jobs: - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.81.0 + toolchain: 1.85.0 components: clippy - run: cargo clippy --all -- -D warnings diff --git a/README.md b/README.md index 8e5576b..31a6a0e 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,12 @@ Collection of [Message Authentication Code][1] (MAC) algorithms written in pure | Algorithm | Crate | Crates.io | Documentation | MSRV | |--------------|----------------|:---------:|:-------------:|:----:| -| [BelT MAC] | [`belt-mac`] | [![crates.io](https://img.shields.io/crates/v/belt-mac.svg)](https://crates.io/crates/belt-mac) | [![Documentation](https://docs.rs/belt-mac/badge.svg)](https://docs.rs/belt-mac) | ![MSRV 1.57][msrv-1.57] | -| [CBC-MAC] | [`cbc-mac`] | [![crates.io](https://img.shields.io/crates/v/cbc-mac.svg)](https://crates.io/crates/cbc-mac) | [![Documentation](https://docs.rs/cbc-mac/badge.svg)](https://docs.rs/cbc-mac) | ![MSRV 1.81][msrv-1.56] | -| [CMAC] | [`cmac`] | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | ![MSRV 1.81][msrv-1.56] | -| [HMAC] | [`hmac`] | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | ![MSRV 1.41][msrv-1.41] | -| [PMAC] | [`pmac`] | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | ![MSRV 1.81][msrv-1.56] | -| [Retail MAC] | [`retail-mac`] | [![crates.io](https://img.shields.io/crates/v/retail-mac.svg)](https://crates.io/crates/retail-mac) | [![Documentation](https://docs.rs/retail-mac/badge.svg)](https://docs.rs/retail-mac) | ![MSRV 1.81][msrv-1.56] | - -### Minimum Supported Rust Version (MSRV) Policy - -MSRV bumps are considered breaking changes and will be performed only with minor version bump. +| [BelT MAC] | [`belt-mac`] | [![crates.io](https://img.shields.io/crates/v/belt-mac.svg)](https://crates.io/crates/belt-mac) | [![Documentation](https://docs.rs/belt-mac/badge.svg)](https://docs.rs/belt-mac) | ![MSRV 1.85][msrv-1.85] | +| [CBC-MAC] | [`cbc-mac`] | [![crates.io](https://img.shields.io/crates/v/cbc-mac.svg)](https://crates.io/crates/cbc-mac) | [![Documentation](https://docs.rs/cbc-mac/badge.svg)](https://docs.rs/cbc-mac) | ![MSRV 1.85][msrv-1.85] | +| [CMAC] | [`cmac`] | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | ![MSRV 1.85][msrv-1.85] | +| [HMAC] | [`hmac`] | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | ![MSRV 1.85][msrv-1.85] | +| [PMAC] | [`pmac`] | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | ![MSRV 1.85][msrv-1.85] | +| [Retail MAC] | [`retail-mac`] | [![crates.io](https://img.shields.io/crates/v/retail-mac.svg)](https://crates.io/crates/retail-mac) | [![Documentation](https://docs.rs/retail-mac/badge.svg)](https://docs.rs/retail-mac) | ![MSRV 1.85][msrv-1.85] | ## License @@ -41,9 +37,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg [deps-image]: https://deps.rs/repo/github/RustCrypto/MACs/status.svg [deps-link]: https://deps.rs/repo/github/RustCrypto/MACs -[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg -[msrv-1.81]: https://img.shields.io/badge/rustc-1.56.0+-blue.svg -[msrv-1.57]: https://img.shields.io/badge/rustc-1.57.0+-blue.svg +[msrv-1.85]: https://img.shields.io/badge/rustc-1.85.0+-blue.svg [//]: # (crates) diff --git a/belt-mac/Cargo.toml b/belt-mac/Cargo.toml index e52ac40..cee8682 100644 --- a/belt-mac/Cargo.toml +++ b/belt-mac/Cargo.toml @@ -4,8 +4,8 @@ version = "0.2.0-pre" description = "MAC specified by the BelT standard" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" documentation = "https://docs.rs/belt-mac" repository = "https://github.com/RustCrypto/MACs" diff --git a/cbc-mac/Cargo.toml b/cbc-mac/Cargo.toml index ccf920b..dc6d336 100644 --- a/cbc-mac/Cargo.toml +++ b/cbc-mac/Cargo.toml @@ -4,8 +4,8 @@ version = "0.2.0-pre.2" description = "Implementation of Cipher Block Chaining Message Authentication Code (CBC-MAC)" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" documentation = "https://docs.rs/cbc-mac" repository = "https://github.com/RustCrypto/MACs" diff --git a/cmac/Cargo.toml b/cmac/Cargo.toml index cf9112a..dde63a9 100644 --- a/cmac/Cargo.toml +++ b/cmac/Cargo.toml @@ -4,8 +4,8 @@ version = "0.8.0-pre.2" description = "Generic implementation of Cipher-based Message Authentication Code" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" documentation = "https://docs.rs/cmac" repository = "https://github.com/RustCrypto/MACs" diff --git a/hmac/Cargo.toml b/hmac/Cargo.toml index a16473b..45eaad2 100644 --- a/hmac/Cargo.toml +++ b/hmac/Cargo.toml @@ -4,13 +4,13 @@ version = "0.13.0-pre.4" description = "Generic implementation of Hash-based Message Authentication Code (HMAC)" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" readme = "README.md" documentation = "https://docs.rs/hmac" repository = "https://github.com/RustCrypto/MACs" keywords = ["crypto", "mac", "hmac", "digest"] categories = ["cryptography", "no-std"] -rust-version = "1.81" +rust-version = "1.85" [dependencies] digest = { version = "=0.11.0-pre.9", features = ["mac"] } diff --git a/pmac/Cargo.toml b/pmac/Cargo.toml index c5b6bcf..5e91558 100644 --- a/pmac/Cargo.toml +++ b/pmac/Cargo.toml @@ -4,8 +4,8 @@ version = "0.8.0-pre.2" description = "Generic implementation of Parallelizable Message Authentication Code" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" documentation = "https://docs.rs/pmac" repository = "https://github.com/RustCrypto/MACs" diff --git a/retail-mac/Cargo.toml b/retail-mac/Cargo.toml index 6648ddf..1991932 100644 --- a/retail-mac/Cargo.toml +++ b/retail-mac/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0-pre.0" description = "Implementation of Retail Message Authentication Code (Retail MAC)" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" documentation = "https://docs.rs/retail-mac" repository = "https://github.com/RustCrypto/MACs" From b67dec3063d286f11c1c4c3bd8a8f8d97b48a4c4 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 17:40:57 -0800 Subject: [PATCH 2/5] reformat workspace according to edition 2024 --- belt-mac/src/lib.rs | 4 ++-- cbc-mac/src/lib.rs | 4 ++-- cmac/src/lib.rs | 4 ++-- hmac/src/lib.rs | 2 +- hmac/src/optim.rs | 4 ++-- hmac/src/simple.rs | 4 ++-- pmac/src/lib.rs | 4 ++-- retail-mac/src/lib.rs | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/belt-mac/src/lib.rs b/belt-mac/src/lib.rs index 90f909b..ae8a426 100644 --- a/belt-mac/src/lib.rs +++ b/belt-mac/src/lib.rs @@ -14,9 +14,10 @@ use belt_block::BeltBlock; use cipher::{BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt}; use core::fmt; use digest::{ + MacMarker, Output, OutputSizeUser, Reset, array::{ - typenum::{IsLess, Le, NonZero, U256}, Array, ArraySize, + typenum::{IsLess, Le, NonZero, U256}, }, block_buffer::Lazy, core_api::{ @@ -24,7 +25,6 @@ use digest::{ UpdateCore, }, crypto_common::{BlockSizes, InnerInit, InnerUser}, - MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] diff --git a/cbc-mac/src/lib.rs b/cbc-mac/src/lib.rs index 9fc5b12..15705bd 100644 --- a/cbc-mac/src/lib.rs +++ b/cbc-mac/src/lib.rs @@ -38,9 +38,10 @@ pub use digest::{self, KeyInit, Mac}; use cipher::{BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt}; use core::fmt; use digest::{ + MacMarker, Output, OutputSizeUser, Reset, array::{ - typenum::{IsLess, Le, NonZero, U256}, Array, ArraySize, + typenum::{IsLess, Le, NonZero, U256}, }, block_buffer::Eager, core_api::{ @@ -48,7 +49,6 @@ use digest::{ UpdateCore, }, crypto_common::{BlockSizes, InnerInit, InnerUser}, - MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] diff --git a/cmac/src/lib.rs b/cmac/src/lib.rs index 8edc126..a8ba4ec 100644 --- a/cmac/src/lib.rs +++ b/cmac/src/lib.rs @@ -54,9 +54,10 @@ use cipher::{BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt}; use core::fmt; use dbl::Dbl; use digest::{ + MacMarker, Output, OutputSizeUser, Reset, array::{ - typenum::{IsLess, Le, NonZero, U256}, Array, ArraySize, + typenum::{IsLess, Le, NonZero, U256}, }, block_buffer::Lazy, core_api::{ @@ -64,7 +65,6 @@ use digest::{ UpdateCore, }, crypto_common::{BlockSizes, InnerInit, InnerUser}, - MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] diff --git a/hmac/src/lib.rs b/hmac/src/lib.rs index 885c42b..37efc49 100644 --- a/hmac/src/lib.rs +++ b/hmac/src/lib.rs @@ -96,8 +96,8 @@ extern crate std; pub use digest::{self, KeyInit, Mac}; use digest::{ - core_api::{Block, BlockSizeUser}, Digest, + core_api::{Block, BlockSizeUser}, }; mod optim; diff --git a/hmac/src/optim.rs b/hmac/src/optim.rs index 655f1f1..9d78731 100644 --- a/hmac/src/optim.rs +++ b/hmac/src/optim.rs @@ -1,13 +1,13 @@ -use super::{get_der_key, IPAD, OPAD}; +use super::{IPAD, OPAD, get_der_key}; use core::{fmt, slice}; use digest::{ + HashMarker, InvalidLength, KeyInit, MacMarker, Output, block_buffer::Eager, core_api::{ AlgorithmName, Block, BlockSizeUser, Buffer, BufferKindUser, CoreWrapper, FixedOutputCore, OutputSizeUser, UpdateCore, }, crypto_common::{Key, KeySizeUser}, - HashMarker, InvalidLength, KeyInit, MacMarker, Output, }; /// Generic HMAC instance. diff --git a/hmac/src/simple.rs b/hmac/src/simple.rs index a2478a3..dc39be6 100644 --- a/hmac/src/simple.rs +++ b/hmac/src/simple.rs @@ -1,8 +1,8 @@ -use super::{get_der_key, IPAD, OPAD}; +use super::{IPAD, OPAD, get_der_key}; use core::fmt; use digest::{ - crypto_common::{Block, BlockSizeUser, InvalidLength, Key, KeySizeUser}, Digest, FixedOutput, KeyInit, MacMarker, Output, OutputSizeUser, Update, + crypto_common::{Block, BlockSizeUser, InvalidLength, Key, KeySizeUser}, }; #[cfg(feature = "reset")] use digest::{FixedOutputReset, Reset}; diff --git a/pmac/src/lib.rs b/pmac/src/lib.rs index 050a746..936e70e 100644 --- a/pmac/src/lib.rs +++ b/pmac/src/lib.rs @@ -57,9 +57,10 @@ use cipher::{BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt, P use core::fmt; use dbl::Dbl; use digest::{ + MacMarker, Output, OutputSizeUser, Reset, array::{ - typenum::{IsLess, Le, NonZero, Unsigned, U256}, Array, ArraySize, + typenum::{IsLess, Le, NonZero, U256, Unsigned}, }, block_buffer::Lazy, core_api::{ @@ -67,7 +68,6 @@ use digest::{ UpdateCore, }, crypto_common::{BlockSizes, InnerInit, InnerUser}, - MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] diff --git a/retail-mac/src/lib.rs b/retail-mac/src/lib.rs index 5f9689b..8c19121 100644 --- a/retail-mac/src/lib.rs +++ b/retail-mac/src/lib.rs @@ -48,9 +48,10 @@ use cipher::{ }; use core::fmt; use digest::{ + MacMarker, Output, OutputSizeUser, Reset, array::{ - typenum::{IsLess, Le, NonZero, U2, U256}, Array, ArraySize, + typenum::{IsLess, Le, NonZero, U2, U256}, }, block_buffer::Eager, core_api::{ @@ -58,7 +59,6 @@ use digest::{ UpdateCore, }, crypto_common::BlockSizes, - MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] From e2a55a3b4c1788c4c922110b1936fbf4fd4a6c07 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 17:48:25 -0800 Subject: [PATCH 3/5] chore(deps): bump `cipher` from `0.5.0-pre.7` to `0.5.0-pre.8` --- Cargo.lock | 90 +++++++++++++------------------------------ Cargo.toml | 14 +++++++ belt-mac/Cargo.toml | 6 +-- cbc-mac/Cargo.toml | 6 +-- cmac/Cargo.toml | 6 +-- hmac/Cargo.toml | 4 +- pmac/Cargo.toml | 6 +-- retail-mac/Cargo.toml | 6 +-- 8 files changed, 58 insertions(+), 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc34dd4..810abd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,12 +1,11 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aes" version = "0.9.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7856582c758ade85d71daf27ec6bcea6c1c73913692b07b8dffea2dc03531c9" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo%2Fedition-2024#cc3c0c08f89d33935ea047faf0f501e50e0f89b0" dependencies = [ "cfg-if", "cipher", @@ -16,8 +15,7 @@ dependencies = [ [[package]] name = "belt-block" version = "0.2.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df0a14d60362d7b6041d3fe85dfd787ced16c4928f93d72152142c67d01d0bc" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo%2Fedition-2024#cc3c0c08f89d33935ea047faf0f501e50e0f89b0" dependencies = [ "cipher", ] @@ -34,15 +32,15 @@ dependencies = [ [[package]] name = "blobby" -version = "0.3.1" +version = "0.4.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847495c209977a90e8aad588b959d0ca9f5dc228096d29a6bd3defd53f35eaec" +checksum = "4a859067dcb257cb2ae028cb821399b55140b76fb8b2a360e052fe109019db43" [[package]] name = "block-buffer" -version = "0.11.0-rc.3" +version = "0.11.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd016a0ddc7cb13661bf5576073ce07330a693f8608a1320b4e20561cc12cdc" +checksum = "a229bfd78e4827c91b9b95784f69492c1b77c1ab75a45a8a037b139215086f94" dependencies = [ "hybrid-array", ] @@ -66,9 +64,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cipher" -version = "0.5.0-pre.7" +version = "0.5.0-pre.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1425e6ce000f05a73096556cabcfb6a10a3ffe3bb4d75416ca8f00819c0b6a" +checksum = "276974d2acb7cf592603150941fc1ff6442acdeb1dc653ac2825928f4703c131" dependencies = [ "crypto-common", "inout", @@ -100,20 +98,18 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.0-rc.1" +version = "0.2.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b8ce8218c97789f16356e7896b3714f26c2ee1079b79c0b7ae7064bb9089fa" +checksum = "170d71b5b14dec99db7739f6fc7d6ec2db80b78c3acb77db48392ccc3d8a9ea0" dependencies = [ - "getrandom", "hybrid-array", - "rand_core", ] [[package]] name = "dbl" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b317b5dd7fb52c79e017554049304992f65260689c5ddb55438ad52ba007f98d" +checksum = "cb24c766034b76390c67f3d9c44e63019febeb4cc39e4ba40b5fc79e20c898e1" dependencies = [ "hybrid-array", ] @@ -121,17 +117,16 @@ dependencies = [ [[package]] name = "des" version = "0.9.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76239c731adb4b5204cfeec47bd06ec1071d9477a0d32bbb83dc7d8c599efe63" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo%2Fedition-2024#cc3c0c08f89d33935ea047faf0f501e50e0f89b0" dependencies = [ "cipher", ] [[package]] name = "digest" -version = "0.11.0-pre.9" +version = "0.11.0-pre.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2e3d6615d99707295a9673e889bf363a04b2a466bd320c65a72536f7577379" +checksum = "6c478574b20020306f98d61c8ca3322d762e1ff08117422ac6106438605ea516" dependencies = [ "blobby", "block-buffer", @@ -139,17 +134,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "hex-literal" version = "0.4.1" @@ -170,18 +154,19 @@ dependencies = [ [[package]] name = "hybrid-array" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d35805454dc9f8662a98d6d61886ffe26bd465f5960e0e55345c70d5c0d2a9" +checksum = "4dab50e193aebe510fe0e40230145820e02f48dae0cf339ea4204e6e708ff7bd" dependencies = [ "typenum", + "zeroize", ] [[package]] name = "inout" -version = "0.2.0-rc.3" +version = "0.2.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de49db00f5add6dad75a57946b75de0f26287a6fc95f4f277d48419200422beb" +checksum = "ac5e145e8ade9f74c0a5efc60ccb4e714b0144f7e2220b7ca64254feee71c57f" dependencies = [ "hybrid-array", ] @@ -189,8 +174,7 @@ dependencies = [ [[package]] name = "kuznyechik" version = "0.9.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd136ca56393426d0aeca01643adef06b1f30d667fdebf31f7cf11724cbd9051" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo%2Fedition-2024#cc3c0c08f89d33935ea047faf0f501e50e0f89b0" dependencies = [ "cfg-if", "cipher", @@ -205,8 +189,7 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "magma" version = "0.10.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fd466f879a2c01f141f168c4e045a26dca5a60aef79efa8bb96e9c701bb8ea" +source = "git+https://github.com/baloo/block-ciphers.git?branch=baloo%2Fedition-2024#cc3c0c08f89d33935ea047faf0f501e50e0f89b0" dependencies = [ "cipher", ] @@ -214,8 +197,7 @@ dependencies = [ [[package]] name = "md-5" version = "0.11.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117b97b6b9ae1ec9a396b357698efa3ecff4fc1f40e0ec59ae7c1270b460ac1d" +source = "git+https://github.com/RustCrypto/hashes.git#0d0369ff7dab69e98acfb8a08f4724dbda285e04" dependencies = [ "cfg-if", "digest", @@ -231,15 +213,6 @@ dependencies = [ "digest", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - [[package]] name = "retail-mac" version = "0.1.0-pre.0" @@ -254,8 +227,7 @@ dependencies = [ [[package]] name = "sha1" version = "0.11.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9540978cef7a8498211c1b1c14e5ce920fe5bd524ea84f4a3d72d4602515ae93" +source = "git+https://github.com/RustCrypto/hashes.git#0d0369ff7dab69e98acfb8a08f4724dbda285e04" dependencies = [ "cfg-if", "cpufeatures", @@ -265,8 +237,7 @@ dependencies = [ [[package]] name = "sha2" version = "0.11.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "540c0893cce56cdbcfebcec191ec8e0f470dd1889b6e7a0b503e310a94a168f5" +source = "git+https://github.com/RustCrypto/hashes.git#0d0369ff7dab69e98acfb8a08f4724dbda285e04" dependencies = [ "cfg-if", "cpufeatures", @@ -276,8 +247,7 @@ dependencies = [ [[package]] name = "streebog" version = "0.11.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb353b35a577917dbcc59b8bef4084ba206b36851577816d5ffe3dac9b0ad54" +source = "git+https://github.com/RustCrypto/hashes.git#0d0369ff7dab69e98acfb8a08f4724dbda285e04" dependencies = [ "digest", ] @@ -294,12 +264,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "zeroize" version = "1.8.1" diff --git a/Cargo.toml b/Cargo.toml index 4e023fa..e06bdb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,17 @@ members = ["belt-mac", "cbc-mac", "cmac", "hmac", "pmac", "retail-mac"] [profile.dev] opt-level = 2 + +[patch.crates-io] +# https://github.com/RustCrypto/hashes/pull/652 +md-5 = { git = "https://github.com/RustCrypto/hashes.git" } +sha1 = { git = "https://github.com/RustCrypto/hashes.git" } +sha2 = { git = "https://github.com/RustCrypto/hashes.git" } +streebog = { git = "https://github.com/RustCrypto/hashes.git" } + +# https://github.com/RustCrypto/block-ciphers/pull/472 +aes = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/edition-2024" } +des = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/edition-2024" } +belt-block = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/edition-2024" } +kuznyechik = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/edition-2024" } +magma = { git = "https://github.com/baloo/block-ciphers.git", branch = "baloo/edition-2024" } diff --git a/belt-mac/Cargo.toml b/belt-mac/Cargo.toml index cee8682..3fe6c19 100644 --- a/belt-mac/Cargo.toml +++ b/belt-mac/Cargo.toml @@ -14,11 +14,11 @@ categories = ["cryptography", "no-std"] [dependencies] belt-block = "0.2.0-pre.2" -cipher = "=0.5.0-pre.7" -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +cipher = "=0.5.0-pre.8" +digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } hex-literal = "0.4" [features] diff --git a/cbc-mac/Cargo.toml b/cbc-mac/Cargo.toml index dc6d336..d9508ea 100644 --- a/cbc-mac/Cargo.toml +++ b/cbc-mac/Cargo.toml @@ -12,11 +12,11 @@ repository = "https://github.com/RustCrypto/MACs" keywords = ["crypto", "mac", "daa"] [dependencies] -cipher = "=0.5.0-pre.7" -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +cipher = "=0.5.0-pre.8" +digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } hex-literal = "0.4" aes = "0.9.0-pre.2" diff --git a/cmac/Cargo.toml b/cmac/Cargo.toml index dde63a9..6f56e86 100644 --- a/cmac/Cargo.toml +++ b/cmac/Cargo.toml @@ -14,12 +14,12 @@ categories = ["cryptography", "no-std"] exclude = ["tests/cavp_large.rs", "tests/data/cavp_aes128_large.blb"] [dependencies] -cipher = "=0.5.0-pre.7" -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +cipher = "=0.5.0-pre.8" +digest = { version = "=0.11.0-pre.10", features = ["mac"] } dbl = "0.4.0-rc.0" [dev-dependencies] -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } hex-literal = "0.4" aes = "0.9.0-pre.2" diff --git a/hmac/Cargo.toml b/hmac/Cargo.toml index 45eaad2..a23f3ad 100644 --- a/hmac/Cargo.toml +++ b/hmac/Cargo.toml @@ -13,10 +13,10 @@ categories = ["cryptography", "no-std"] rust-version = "1.85" [dependencies] -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } md-5 = { version = "=0.11.0-pre.4", default-features = false } sha1 = { version = "=0.11.0-pre.4", default-features = false } sha2 = { version = "=0.11.0-pre.4", default-features = false } diff --git a/pmac/Cargo.toml b/pmac/Cargo.toml index 5e91558..132dba1 100644 --- a/pmac/Cargo.toml +++ b/pmac/Cargo.toml @@ -13,13 +13,13 @@ keywords = ["crypto", "mac", "pmac"] categories = ["cryptography", "no-std"] [dependencies] -cipher = "=0.5.0-pre.7" -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +cipher = "=0.5.0-pre.8" +digest = { version = "=0.11.0-pre.10", features = ["mac"] } dbl = "0.4.0-rc.0" [dev-dependencies] aes = "0.9.0-pre.2" -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } [features] std = ["digest/std"] diff --git a/retail-mac/Cargo.toml b/retail-mac/Cargo.toml index 1991932..6a4d4cc 100644 --- a/retail-mac/Cargo.toml +++ b/retail-mac/Cargo.toml @@ -12,11 +12,11 @@ repository = "https://github.com/RustCrypto/MACs" keywords = ["crypto", "mac"] [dependencies] -cipher = "=0.5.0-pre.7" -digest = { version = "=0.11.0-pre.9", features = ["mac"] } +cipher = "=0.5.0-pre.8" +digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] -digest = { version = "=0.11.0-pre.9", features = ["dev"] } +digest = { version = "=0.11.0-pre.10", features = ["dev"] } hex-literal = "0.4" aes = "0.9.0-pre.2" From 923099431237c6f37c2557ed95faa88d6b784057 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 20:33:46 -0800 Subject: [PATCH 4/5] hmac: disable minimal-versions because of pre-releases --- .github/workflows/hmac.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/hmac.yml b/.github/workflows/hmac.yml index 00de829..45cd752 100644 --- a/.github/workflows/hmac.yml +++ b/.github/workflows/hmac.yml @@ -39,6 +39,7 @@ jobs: - run: cargo build --no-default-features --release --target ${{ matrix.target }} minimal-versions: + if: false # TODO: temp disabled due to unpublished prerelease dependencies uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master with: working-directory: ${{ github.workflow }} From da6f46f47c566828dca617cae0a4e5ba201a98fe Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 22:35:05 -0800 Subject: [PATCH 5/5] chore(deps): bump `hex-literal` from `0.4.1` to `1.0.0` --- Cargo.lock | 4 ++-- belt-mac/Cargo.toml | 2 +- cbc-mac/Cargo.toml | 2 +- cmac/Cargo.toml | 2 +- hmac/Cargo.toml | 2 +- retail-mac/Cargo.toml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 810abd1..bf7fb65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "hex-literal" -version = "0.4.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" [[package]] name = "hmac" diff --git a/belt-mac/Cargo.toml b/belt-mac/Cargo.toml index 3fe6c19..40d20cd 100644 --- a/belt-mac/Cargo.toml +++ b/belt-mac/Cargo.toml @@ -19,7 +19,7 @@ digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] digest = { version = "=0.11.0-pre.10", features = ["dev"] } -hex-literal = "0.4" +hex-literal = "1" [features] std = ["digest/std"] diff --git a/cbc-mac/Cargo.toml b/cbc-mac/Cargo.toml index d9508ea..9a9ebbe 100644 --- a/cbc-mac/Cargo.toml +++ b/cbc-mac/Cargo.toml @@ -17,7 +17,7 @@ digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] digest = { version = "=0.11.0-pre.10", features = ["dev"] } -hex-literal = "0.4" +hex-literal = "1" aes = "0.9.0-pre.2" des = "0.9.0-pre.2" diff --git a/cmac/Cargo.toml b/cmac/Cargo.toml index 6f56e86..e50ce7f 100644 --- a/cmac/Cargo.toml +++ b/cmac/Cargo.toml @@ -20,7 +20,7 @@ dbl = "0.4.0-rc.0" [dev-dependencies] digest = { version = "=0.11.0-pre.10", features = ["dev"] } -hex-literal = "0.4" +hex-literal = "1" aes = "0.9.0-pre.2" des = "0.9.0-pre.2" diff --git a/hmac/Cargo.toml b/hmac/Cargo.toml index a23f3ad..58cff1d 100644 --- a/hmac/Cargo.toml +++ b/hmac/Cargo.toml @@ -21,7 +21,7 @@ md-5 = { version = "=0.11.0-pre.4", default-features = false } sha1 = { version = "=0.11.0-pre.4", default-features = false } sha2 = { version = "=0.11.0-pre.4", default-features = false } streebog = { version = "=0.11.0-pre.4", default-features = false } -hex-literal = "0.4" +hex-literal = "1" [features] std = ["digest/std"] diff --git a/retail-mac/Cargo.toml b/retail-mac/Cargo.toml index 6a4d4cc..02ed7ba 100644 --- a/retail-mac/Cargo.toml +++ b/retail-mac/Cargo.toml @@ -17,7 +17,7 @@ digest = { version = "=0.11.0-pre.10", features = ["mac"] } [dev-dependencies] digest = { version = "=0.11.0-pre.10", features = ["dev"] } -hex-literal = "0.4" +hex-literal = "1" aes = "0.9.0-pre.2" des = "0.9.0-pre.2"