Skip to content

Commit 8fd8874

Browse files
authored
Bump rand_core to 0.10.0-rc.2 (#600)
1 parent 40e1750 commit 8fd8874

19 files changed

+107
-65
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ rust-version = "1.85"
1414

1515
[dependencies]
1616
const-oid = { version = "0.10", default-features = false }
17-
crypto-bigint = { version = "0.7.0-rc.8", default-features = false, features = ["zeroize", "alloc"] }
17+
crypto-bigint = { version = "0.7.0-rc.10", default-features = false, features = ["zeroize", "alloc"] }
1818
crypto-primes = { version = "0.7.0-pre.2", default-features = false }
1919
digest = { version = "0.11.0-rc.1", default-features = false, features = ["alloc", "oid"] }
20-
rand_core = { version = "0.9", default-features = false }
21-
signature = { version = "3.0.0-rc.4", default-features = false, features = ["alloc", "digest", "rand_core"] }
20+
rand_core = { version = "0.10.0-rc.2", default-features = false }
21+
signature = { version = "3.0.0-rc.5", default-features = false, features = ["alloc", "digest", "rand_core"] }
2222
subtle = { version = "2.6.1", default-features = false }
2323
zeroize = { version = "1.8", features = ["alloc"] }
2424

@@ -30,16 +30,17 @@ sha1 = { version = "0.11.0-rc.2", optional = true, default-features = false, fea
3030
spki = { version = "0.8.0-rc.4", optional = true, default-features = false, features = ["alloc"] }
3131
sha2 = { version = "0.11.0-rc.2", optional = true, default-features = false, features = ["oid"] }
3232
serde = { version = "1.0.184", optional = true, default-features = false, features = ["derive"] }
33+
rand = { version = "0.10.0-rc.1", optional = true, default-features = false }
3334

3435
[dev-dependencies]
3536
base64ct = { version = "1", features = ["alloc"] }
3637
hex-literal = "1"
3738
proptest = "1"
3839
serde_test = "1.0.89"
3940
rand_xorshift = "0.4"
40-
rand_chacha = "0.9"
41-
rand = "0.9"
42-
rand_core = { version = "0.9.1", default-features = false }
41+
chacha20 = { version = "0.10.0-rc.3", default-features = false, features = ["rng"] }
42+
rand = "0.10.0-rc.1"
43+
rand_core = { version = "0.10.0-rc.2", default-features = false }
4344
sha1 = { version = "0.11.0-rc.2", default-features = false, features = ["oid"] }
4445
sha2 = { version = "0.11.0-rc.2", default-features = false, features = ["oid"] }
4546
sha3 = { version = "0.11.0-rc.2", default-features = false, features = ["oid"] }
@@ -55,10 +56,10 @@ name = "key"
5556
default = ["std", "encoding"]
5657
encoding = ["dep:pkcs1", "dep:pkcs8", "dep:spki"]
5758
hazmat = []
58-
os_rng = ["rand_core/os_rng", "crypto-bigint/rand_core"]
59+
os_rng = ["crypto-bigint/rand_core", "rand/os_rng"]
5960
serde = ["encoding", "dep:serde", "dep:serdect", "crypto-bigint/serde"]
6061
pkcs5 = ["pkcs8/encryption"]
61-
std = ["pkcs1?/std", "pkcs8?/std", "rand_core/std", "crypto-bigint/rand"]
62+
std = ["pkcs1?/std", "pkcs8?/std", "crypto-bigint/rand"]
6263

6364
[package.metadata.docs.rs]
6465
features = ["std", "serde", "hazmat", "sha2"]
@@ -69,3 +70,6 @@ opt-level = 2
6970

7071
[profile.bench]
7172
debug = true
73+
74+
[patch.crates-io]
75+
crypto-primes = { git = "https://github.com/baloo/crypto-primes.git", branch = "baloo/rand_core/0.10.0-rc.2" }

benches/key.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
extern crate test;
44

55
use base64ct::{Base64, Encoding};
6+
use chacha20::ChaCha8Rng;
67
use crypto_bigint::BoxedUint;
78
use hex_literal::hex;
8-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
9+
use rand_core::SeedableRng;
910
use rsa::{Pkcs1v15Encrypt, Pkcs1v15Sign, RsaPrivateKey};
1011
use sha2::{Digest, Sha256};
1112
use test::Bencher;

src/algorithms/generate.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ fn generate_prime_with_rng<R: CryptoRng + ?Sized>(rng: &mut R, bit_length: u32)
134134
#[cfg(test)]
135135
mod tests {
136136
use super::*;
137-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
137+
use chacha20::ChaCha8Rng;
138+
use rand_core::SeedableRng;
138139

139140
const EXP: u64 = 65537;
140141

src/algorithms/pkcs1v15.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ where
187187
#[cfg(test)]
188188
mod tests {
189189
use super::*;
190-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
190+
use chacha20::ChaCha8Rng;
191+
use rand_core::SeedableRng;
191192

192193
#[test]
193194
fn test_non_zero_bytes() {

src/key.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,9 @@ mod tests {
754754
use crate::algorithms::rsa::{rsa_decrypt_and_check, rsa_encrypt};
755755
use crate::traits::{PrivateKeyParts, PublicKeyParts};
756756

757+
use chacha20::ChaCha8Rng;
757758
use hex_literal::hex;
758-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
759+
use rand_core::SeedableRng;
759760

760761
#[cfg(feature = "encoding")]
761762
use pkcs8::DecodePrivateKey;
@@ -875,7 +876,8 @@ mod tests {
875876
#[test]
876877
#[cfg(all(feature = "hazmat", feature = "serde"))]
877878
fn test_serde() {
878-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
879+
use chacha20::ChaCha8Rng;
880+
use rand_core::SeedableRng;
879881
use serde_test::{assert_tokens, Configure, Token};
880882

881883
let mut rng = ChaCha8Rng::from_seed([42; 32]);

src/oaep.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,10 @@ mod tests {
326326
use crate::traits::PublicKeyParts;
327327
use crate::traits::{Decryptor, RandomizedDecryptor, RandomizedEncryptor};
328328

329+
use chacha20::ChaCha8Rng;
329330
use crypto_bigint::BoxedUint;
330331
use digest::{Digest, FixedOutputReset};
331-
use rand_chacha::{
332-
rand_core::{RngCore, SeedableRng},
333-
ChaCha8Rng,
334-
};
332+
use rand_core::{RngCore, SeedableRng};
335333
use sha1::Sha1;
336334
use sha2::{Sha224, Sha256, Sha384, Sha512};
337335
use sha3::{Sha3_256, Sha3_384, Sha3_512};

src/oaep/decrypting_key.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ mod tests {
101101
#[cfg(all(feature = "hazmat", feature = "serde"))]
102102
fn test_serde() {
103103
use super::*;
104-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
104+
use chacha20::ChaCha8Rng;
105+
use rand_core::SeedableRng;
105106
use serde_test::{assert_tokens, Configure, Token};
106107
use sha2::Sha256;
107108

src/oaep/encrypting_key.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ mod tests {
7676
#[cfg(all(feature = "hazmat", feature = "serde"))]
7777
fn test_serde() {
7878
use super::*;
79-
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};
79+
use chacha20::ChaCha8Rng;
80+
use rand_core::SeedableRng;
8081
use serde_test::{assert_tokens, Configure, Token};
8182

8283
let mut rng = ChaCha8Rng::from_seed([42; 32]);

src/pkcs1v15.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,9 @@ mod tests {
253253
SignatureEncoding, Signer, Verifier,
254254
};
255255
use base64ct::{Base64, Encoding};
256+
use chacha20::ChaCha8Rng;
256257
use hex_literal::hex;
257-
use rand_chacha::{
258-
rand_core::{RngCore, SeedableRng},
259-
ChaCha8Rng,
260-
};
258+
use rand_core::{RngCore, SeedableRng};
261259
use rstest::rstest;
262260
use sha1::{Digest, Sha1};
263261
use sha2::Sha256;

0 commit comments

Comments
 (0)