diff --git a/Cargo.lock b/Cargo.lock index 5dce6f671..1af1edccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,8 +321,7 @@ dependencies = [ [[package]] name = "hmac" version = "0.13.0-rc.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef451d73f36d8a3f93ad32c332ea01146c9650e1ec821a9b0e46c01277d544f8" +source = "git+https://github.com/RustCrypto/MACs#2c51e3b76e6f50c13d85577c3faac7df66e24306" dependencies = [ "digest", ] @@ -439,9 +438,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" dependencies = [ "critical-section", "portable-atomic", @@ -514,9 +513,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] diff --git a/Cargo.toml b/Cargo.toml index 79c85b5b2..68f11e216 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,3 +57,4 @@ unused_qualifications = "warn" crypto-common = { path = "crypto-common" } digest = { path = "digest" } signature = { path = "signature" } +hmac = { git = "https://github.com/RustCrypto/MACs" } diff --git a/digest/CHANGELOG.md b/digest/CHANGELOG.md index 314c7f187..83e512f59 100644 --- a/digest/CHANGELOG.md +++ b/digest/CHANGELOG.md @@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.11.1 (2026-02-25) +## 0.11.2 (UNRELEASED) +### Changed +- Do not implement `Clone` as part of `(Reset)MacTraits` in the `buffer_fixed!` macro ([#2341]) +- `EagerHash` trait to be a sub-trait of `Clone` ([#2341]) + +[#2341]: https://github.com/RustCrypto/traits/pull/2341 + +## 0.11.1 (2026-02-25) [YANKED] +Note: this version was yanked because v0.11.2 introduces minor breaking changes +affecting only pre-release versions of downstream crates. + ### Added - `SmallBlockSizeUser` helper trait. The trait is a sub-trait of `BlockSizeUser` with `BlockSize` bounded by `block_buffer::BlockSizes`. ([#2309]) diff --git a/digest/src/block_api.rs b/digest/src/block_api.rs index 7edf8fce6..c417dbe32 100644 --- a/digest/src/block_api.rs +++ b/digest/src/block_api.rs @@ -52,7 +52,7 @@ pub trait BufferKindUser: SmallBlockSizeUser { } /// Trait implemented by eager hashes which expose their block-level core. -pub trait EagerHash: SmallBlockSizeUser + Digest { +pub trait EagerHash: SmallBlockSizeUser + Digest + Clone { /// Block-level core type of the hash. type Core: HashMarker + UpdateCore @@ -65,7 +65,7 @@ pub trait EagerHash: SmallBlockSizeUser + Digest { impl EagerHash for T where - T: CoreProxy + SmallBlockSizeUser + Digest, + T: CoreProxy + SmallBlockSizeUser + Digest + Clone, ::Core: HashMarker + UpdateCore + FixedOutputCore diff --git a/digest/src/buffer_macros/fixed.rs b/digest/src/buffer_macros/fixed.rs index f17e68376..f238b0dd5 100644 --- a/digest/src/buffer_macros/fixed.rs +++ b/digest/src/buffer_macros/fixed.rs @@ -65,8 +65,7 @@ macro_rules! buffer_fixed { }; // Implements the set of traits common for MAC functions: - // `Debug`, `BlockSizeUser`, `OutputSizeUser`, `CoreProxy`, `Update`, `FixedOutput`, - // `Clone`, `MacMarker`. + // `Debug`, `BlockSizeUser`, `OutputSizeUser`, `CoreProxy`, `Update`, `FixedOutput`, `MacMarker` ( impl_inner: $name:ident $(< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+ >)? @@ -75,13 +74,13 @@ macro_rules! buffer_fixed { ) => { $crate::buffer_fixed!( impl_inner: $name$(< $( $lt $( : $clt $(+ $dlt )* )? ),+ >)?($core_ty); - BaseFixedTraits Clone MacMarker $($trait_name)*; + BaseFixedTraits MacMarker $($trait_name)*; ); }; // Implements the set of traits common for resettable MAC functions: // `Debug`, `BlockSizeUser`, `OutputSizeUser`, `CoreProxy`, `Update`, `FixedOutput`, - // `Clone`, `MacMarker`, `Reset`, `FixedOutputReset`. + // `MacMarker`, `Reset`, `FixedOutputReset`. ( impl_inner: $name:ident $(< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+ >)?