From 206b414454272baa0b3a33c1bdc7b2e871857ca1 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Wed, 11 Feb 2026 09:03:18 -0700 Subject: [PATCH] Bump `crypto-bigint` dependency to v0.7.0-rc.26 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/key.rs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1585a838..5c97f4a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,9 +160,9 @@ checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" [[package]] name = "cpubits" -version = "0.1.0-rc.3" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a8c0210fa48ba3ea04ac1e9c6e72ae66009db3b1f1745635d4ff2e58eaadd0" +checksum = "5ef0c543070d296ea414df2dd7625d1b24866ce206709d8a4a424f28377f5861" [[package]] name = "cpufeatures" @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.7.0-rc.25" +version = "0.7.0-rc.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba9eeeb213f7fd29353032f71f7c173e5f6d95d85151cb3a47197b0ea7e8be7" +checksum = "8e8d50190c5aeb459e0c974f7f00c3fe2e770ef18d1abe32adb87ad8d9108f89" dependencies = [ "cpubits", "ctutils", diff --git a/Cargo.toml b/Cargo.toml index 6b758843..b95ec037 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = ["marvin_toolkit/", "thirdparty/"] [dependencies] const-oid = { version = "0.10", default-features = false } -crypto-bigint = { version = "0.7.0-rc.25", default-features = false, features = ["zeroize", "alloc"] } +crypto-bigint = { version = "0.7.0-rc.26", default-features = false, features = ["zeroize", "alloc"] } crypto-primes = { version = "0.7.0-pre.8", default-features = false } digest = { version = "0.11.0-rc.11", default-features = false, features = ["alloc", "oid"] } rand_core = { version = "0.10", default-features = false } diff --git a/src/key.rs b/src/key.rs index 3de6065b..1ab20b59 100644 --- a/src/key.rs +++ b/src/key.rs @@ -379,7 +379,7 @@ impl RsaPrivateKey { // Check that the product of primes matches the modulus. // This also ensures that `bit_precision` of each prime is <= that of the modulus, // and `bit_precision` of their product is >= that of the modulus. - if &primes.iter().fold(BoxedUint::one(), |acc, p| acc * p) != n_c.as_ref() { + if primes.iter().fold(BoxedUint::one(), |acc, p| acc * p) != n_c.as_ref() { return Err(Error::InvalidModulus); } } @@ -555,12 +555,12 @@ impl RsaPrivateKey { .ok_or(Error::InvalidPrime)?; let q_params = BoxedMontyParams::new(q_odd); - let x = NonZero::new(p.wrapping_sub(&BoxedUint::one())) + let x = NonZero::new(p.wrapping_sub(BoxedUint::one())) .into_option() .ok_or(Error::InvalidPrime)?; let dp = d.rem_vartime(&x); - let x = NonZero::new(q.wrapping_sub(&BoxedUint::one())) + let x = NonZero::new(q.wrapping_sub(BoxedUint::one())) .into_option() .ok_or(Error::InvalidPrime)?; let dq = d.rem_vartime(&x); @@ -769,7 +769,7 @@ fn validate_private_key_parts(key: &RsaPrivateKey) -> Result<()> { let de = key.d.mul(&key.pubkey_components.e); for prime in &key.primes { - let x = NonZero::new(prime.wrapping_sub(&BoxedUint::one())).unwrap(); + let x = NonZero::new(prime.wrapping_sub(BoxedUint::one())).unwrap(); let congruence = de.rem_vartime(&x); if !bool::from(congruence.is_one()) { return Err(Error::InvalidExponent);