Skip to content

Commit c1a51d4

Browse files
authored
digest: replace subtle with ctutils (#2301)
As discussed in #2275 and #2300, we are migrating from `subtle` to our new `ctutils` library: https://github.com/RustCrypto/utils/tree/master/ctutils
1 parent 5802c8f commit c1a51d4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.github/workflows/elliptic-curve.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ jobs:
102102
MIRIFLAGS: "-Zmiri-symbolic-alignment-check -Zmiri-strict-provenance"
103103
steps:
104104
- uses: actions/checkout@v6
105-
- uses: dtolnay/rust-toolchain@nightly
105+
- uses: dtolnay/rust-toolchain@stable
106+
with:
107+
toolchain: nightly-2026-02-11 # pinned due to rust-lang/miri#4855
106108
- run: rustup component add miri && cargo miri setup
107109
- run: cargo miri test --all-features

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

digest/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ common = { version = "0.2", package = "crypto-common" }
1717

1818
# optional dependencies
1919
block-buffer = { version = "0.11", optional = true }
20-
subtle = { version = "2.4", default-features = false, optional = true }
2120
blobby = { version = "0.4", optional = true }
2221
const-oid = { version = "0.10", optional = true }
22+
ctutils = { version = "0.4", optional = true }
2323
zeroize = { version = "1.7", optional = true, default-features = false }
2424

2525
[dev-dependencies]
@@ -28,7 +28,7 @@ sha2 = "0.11.0-rc.5"
2828
[features]
2929
default = ["block-api"]
3030
block-api = ["block-buffer"] # Enable block API traits
31-
mac = ["subtle"] # Enable MAC traits
31+
mac = ["dep:ctutils"] # Enable MAC traits
3232
rand_core = ["common/rand_core"] # Enable random key generation methods
3333
getrandom = ["common/getrandom", "rand_core"]
3434
oid = ["const-oid"]

digest/src/mac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use common::{Output, OutputSizeUser, Reset};
33

44
use common::typenum::Unsigned;
55
use core::fmt;
6-
use subtle::ConstantTimeEq;
6+
use ctutils::CtEq;
77

88
/// Marker trait for Message Authentication algorithms.
99
pub trait MacMarker {}

0 commit comments

Comments
 (0)