Skip to content

Commit 132a6b1

Browse files
authored
chore(deps): bump digest git pin (#971)
1 parent 6caf9af commit 132a6b1

File tree

8 files changed

+34
-24
lines changed

8 files changed

+34
-24
lines changed

Cargo.lock

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ slh-dsa = { path = "./slh-dsa" }
3131
# https://github.com/RustCrypto/traits/pull/1774
3232
# https://github.com/RustCrypto/traits/pull/1822
3333
# https://github.com/RustCrypto/traits/pull/1845
34+
digest = { git = "https://github.com/RustCrypto/traits.git" }
3435
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }
3536
signature = { git = "https://github.com/RustCrypto/traits.git" }
3637

3738
crypto-primes = { git = "https://github.com/entropyxyz/crypto-primes.git" }
39+
40+
hmac = { git = "https://github.com/RustCrypto/MACs.git" }
41+
42+
sha1 = { git = "https://github.com/RustCrypto/hashes.git" }
43+
sha2 = { git = "https://github.com/RustCrypto/hashes.git" }
44+
sha3 = { git = "https://github.com/RustCrypto/hashes.git" }

dsa/src/generate/secret_number.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{Components, signing_key::SigningKey};
66
use alloc::vec;
77
use core::cmp::min;
88
use crypto_bigint::{BoxedUint, NonZero, RandomBits, Resize};
9-
use digest::{Digest, FixedOutputReset, core_api::BlockSizeUser};
9+
use digest::{Digest, FixedOutputReset, block_api::BlockSizeUser};
1010
use signature::rand_core::TryCryptoRng;
1111
use zeroize::Zeroizing;
1212

dsa/src/signing_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crypto_bigint::{
1111
BoxedUint, NonZero, Resize,
1212
modular::{BoxedMontyForm, BoxedMontyParams},
1313
};
14-
use digest::{Digest, FixedOutputReset, core_api::BlockSizeUser};
14+
use digest::{Digest, FixedOutputReset, block_api::BlockSizeUser};
1515
use pkcs8::{
1616
AlgorithmIdentifierRef, EncodePrivateKey, PrivateKeyInfoRef, SecretDocument,
1717
der::{

dsa/tests/deterministic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![cfg(feature = "hazmat")]
22
use crypto_bigint::{BoxedUint, NonZero, Odd};
3-
use digest::{Digest, FixedOutputReset, core_api::BlockSizeUser};
3+
use digest::{Digest, FixedOutputReset, block_api::BlockSizeUser};
44
use dsa::{Components, Signature, SigningKey, VerifyingKey};
55
use sha1::Sha1;
66
use sha2::{Sha224, Sha256, Sha384, Sha512};

ecdsa/src/hazmat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use {
3232
elliptic_curve::FieldBytesSize,
3333
signature::{
3434
PrehashSignature,
35-
digest::{Digest, FixedOutput, FixedOutputReset, core_api::BlockSizeUser},
35+
digest::{Digest, FixedOutput, FixedOutputReset, block_api::BlockSizeUser},
3636
},
3737
};
3838

rfc6979/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ edition = "2024"
1616
rust-version = "1.85"
1717

1818
[dependencies]
19-
hmac = { version = "=0.13.0-pre.5", default-features = false, features = ["reset"] }
19+
hmac = { version = "=0.13.0-pre.5", default-features = false }
2020
subtle = { version = "2", default-features = false }
2121

2222
[dev-dependencies]

rfc6979/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ mod ct;
4242
pub use hmac::digest::array::typenum::consts;
4343

4444
use hmac::{
45-
SimpleHmac,
45+
SimpleHmacReset,
4646
digest::{
4747
Digest, FixedOutput, FixedOutputReset, KeyInit, Mac,
4848
array::{Array, ArraySize},
49-
core_api::BlockSizeUser,
49+
block_api::BlockSizeUser,
5050
},
5151
};
5252

@@ -124,7 +124,7 @@ where
124124
D: Digest + BlockSizeUser + FixedOutputReset,
125125
{
126126
/// HMAC key `K` (see RFC 6979 Section 3.2.c)
127-
k: SimpleHmac<D>,
127+
k: SimpleHmacReset<D>,
128128

129129
/// Chaining value `V` (see RFC 6979 Section 3.2.c)
130130
v: Array<u8, D::OutputSize>,
@@ -136,7 +136,7 @@ where
136136
{
137137
/// Initialize `HMAC_DRBG`
138138
pub fn new(entropy_input: &[u8], nonce: &[u8], personalization_string: &[u8]) -> Self {
139-
let mut k = SimpleHmac::new(&Default::default());
139+
let mut k = SimpleHmacReset::new(&Default::default());
140140
let mut v = Array::default();
141141

142142
for b in &mut v {
@@ -149,7 +149,7 @@ where
149149
k.update(entropy_input);
150150
k.update(nonce);
151151
k.update(personalization_string);
152-
k = SimpleHmac::new_from_slice(&k.finalize().into_bytes()).expect("HMAC error");
152+
k = SimpleHmacReset::new_from_slice(&k.finalize().into_bytes()).expect("HMAC error");
153153

154154
// Steps 3.2.e,g: v = HMAC_k(v)
155155
k.update(&v);
@@ -178,8 +178,8 @@ where
178178

179179
self.k.update(&self.v);
180180
self.k.update(&[0x00]);
181-
self.k =
182-
SimpleHmac::new_from_slice(&self.k.finalize_reset().into_bytes()).expect("HMAC error");
181+
self.k = SimpleHmacReset::new_from_slice(&self.k.finalize_reset().into_bytes())
182+
.expect("HMAC error");
183183
self.k.update(&self.v);
184184
self.v = self.k.finalize_reset().into_bytes();
185185
}

0 commit comments

Comments
 (0)