chore(deps): bump rand_core to 0.10.0-rc-5 (#1161)

This commit is contained in:
Arthur Gautier
2026-01-20 10:29:27 -08:00
committed by GitHub
parent 187bcbe4e3
commit 4b8dee598e
9 changed files with 79 additions and 56 deletions
Generated
+46 -33
View File
@@ -108,14 +108,14 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "chacha20"
version = "0.10.0-rc.6"
version = "0.10.0-rc.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f895fb33c1ad22da4bc79d37c0bddff8aee2ba4575705345eb73b8ffbc386074"
checksum = "26f659b53b7f4e776e0cb370508f21d62a22349009195b1089de5f9b24afba2f"
dependencies = [
"cfg-if",
"cipher",
"cpufeatures",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
]
[[package]]
@@ -147,9 +147,9 @@ dependencies = [
[[package]]
name = "cipher"
version = "0.5.0-rc.2"
version = "0.5.0-rc.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "155e4a260750fa4f7754649f049748aacc31db238a358d85fd721002f230f92f"
checksum = "118a99a35f72e30b718e8eb5ea6ba24652d08415260a4a32b838f76aa4e3284a"
dependencies = [
"block-buffer",
"crypto-common",
@@ -187,6 +187,12 @@ version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1339d398d44e506d9b72c1af2f6f51a41c9c64f9a0738eb9aedede47ed1f683"
[[package]]
name = "cmov"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df1888fb431ee159b513b5c2f249e03f1c9d788f7bd842927619dbeb88764039"
[[package]]
name = "const-oid"
version = "0.10.1"
@@ -268,15 +274,15 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
[[package]]
name = "crypto-bigint"
version = "0.7.0-rc.16"
version = "0.7.0-rc.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbd828c64d6fecf364ec127641e5ce0f8d6e3264a6c466b4a4bdcbec5b038b9e"
checksum = "aa5ca68818c89f3a3b5bcf44bd0166cf0fc33375760b254684bd129896305bda"
dependencies = [
"ctutils",
"ctutils 0.4.0",
"getrandom 0.4.0-rc.0",
"hybrid-array",
"num-traits",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"serdect",
"subtle",
"zeroize",
@@ -284,24 +290,23 @@ dependencies = [
[[package]]
name = "crypto-common"
version = "0.2.0-rc.9"
version = "0.2.0-rc.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41b8986f836d4aeb30ccf4c9d3bd562fd716074cfd7fc4a2948359fbd21ed809"
checksum = "0f4fc0003068acd7e9cb6659fd956dc4d671f102a06cc115990b9e7bb5745c25"
dependencies = [
"getrandom 0.4.0-rc.0",
"hybrid-array",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
]
[[package]]
name = "crypto-primes"
version = "0.7.0-pre.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79c98a281f9441200b24e3151407a629bfbe720399186e50516da939195e482"
source = "git+https://github.com/baloo/crypto-primes.git?branch=baloo%2Fpush-zlqkpkvxqksw#bf0cecba8b014121ac0a4b1dcf3254b28bd02bb9"
dependencies = [
"crypto-bigint",
"libm",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
]
[[package]]
@@ -319,7 +324,16 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "130ffe18bdf7a4926e57ed19d404995244e6c8d6a97abf4eddde1f892bf1ce0c"
dependencies = [
"cmov",
"cmov 0.4.5",
]
[[package]]
name = "ctutils"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1005a6d4446f5120ef475ad3d2af2b30c49c2c9c6904258e3bb30219bebed5e4"
dependencies = [
"cmov 0.5.1",
"subtle",
]
@@ -373,7 +387,7 @@ dependencies = [
"hex-literal",
"pkcs8",
"proptest",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"rfc6979",
"sha1",
"sha2",
@@ -445,7 +459,7 @@ dependencies = [
"once_cell",
"pem-rfc7468",
"pkcs8",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"rustcrypto-ff",
"rustcrypto-group",
"sec1",
@@ -497,7 +511,7 @@ dependencies = [
"cfg-if",
"libc",
"r-efi",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"wasip2",
]
@@ -549,9 +563,9 @@ dependencies = [
[[package]]
name = "inout"
version = "0.2.1"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7357b6e7aa75618c7864ebd0634b115a7218b0615f4cb1df33ac3eca23943d4"
checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7"
dependencies = [
"hybrid-array",
]
@@ -623,7 +637,7 @@ dependencies = [
"hex",
"hex-literal",
"hybrid-array",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"sha2",
"signature",
"static_assertions",
@@ -656,7 +670,7 @@ dependencies = [
"num-traits",
"pkcs8",
"proptest",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"serde",
"serde_json",
"sha3",
@@ -829,12 +843,11 @@ dependencies = [
[[package]]
name = "rand"
version = "0.10.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bccc05ac8fad6ee391f3cc6725171817eed960345e2fb42ad229d486c1ca2d98"
source = "git+https://github.com/rust-random/rand.git?branch=push-nzsxxkozrnpy#6830af063fc700d4d5460dc00ba024c24913de72"
dependencies = [
"chacha20",
"getrandom 0.4.0-rc.0",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
]
[[package]]
@@ -858,9 +871,9 @@ dependencies = [
[[package]]
name = "rand_core"
version = "0.10.0-rc-3"
version = "0.10.0-rc-5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f66ee92bc15280519ef199a274fe0cafff4245d31bc39aaa31c011ad56cb1f05"
checksum = "05a06e03bd1f2ae861ab9e7498b6c64ed3dadb9ce175c0464a2522a5f23c0045"
[[package]]
name = "rand_xorshift"
@@ -936,7 +949,7 @@ version = "0.14.0-pre.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9cd37111549306f79b09aa2618e15b1e8241b7178c286821e3dd71579db4db"
dependencies = [
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"subtle",
]
@@ -946,7 +959,7 @@ version = "0.14.0-pre.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e394cd734b5f97dfc3484fa42aad7acd912961c2bcd96c99aa05b3d6cab7cafd"
dependencies = [
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"rustcrypto-ff",
"subtle",
]
@@ -1004,7 +1017,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2568531a8ace88b848310caa98fb2115b151ef924d54aa523e659c21b9d32d71"
dependencies = [
"base16ct",
"ctutils",
"ctutils 0.3.0",
"der",
"hybrid-array",
"serdect",
@@ -1114,7 +1127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "597a96996ccff7dfa16f052bd995b4cecc72af22c35138738dc029f0ead6608d"
dependencies = [
"digest",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
]
[[package]]
@@ -1136,7 +1149,7 @@ dependencies = [
"pkcs8",
"proptest",
"rand 0.10.0-rc.6",
"rand_core 0.10.0-rc-3",
"rand_core 0.10.0-rc-5",
"serde",
"serde_json",
"sha2",
+3
View File
@@ -25,3 +25,6 @@ lms-signature = { path = "./lms" }
ml-dsa = { path = "./ml-dsa" }
rfc6979 = { path = "./rfc6979" }
slh-dsa = { path = "./slh-dsa" }
crypto-primes = { git = "https://github.com/baloo/crypto-primes.git", branch = "baloo/push-zlqkpkvxqksw" }
rand = { git = "https://github.com/rust-random/rand.git", branch = "push-nzsxxkozrnpy" }
+2 -2
View File
@@ -29,7 +29,7 @@ zeroize = { version = "1", default-features = false, features = ["alloc"] }
pkcs8 = { version = "0.11.0-rc.8", optional = true, default-features = false, features = ["alloc"] }
[dev-dependencies]
chacha20 = { version = "0.10.0-rc.6", features = ["rng"] }
chacha20 = { version = "0.10.0-rc.7", features = ["rng"] }
hex = "0.4"
hex-literal = "1"
pkcs8 = { version = "0.11.0-rc.8", default-features = false, features = ["pem"] }
@@ -37,7 +37,7 @@ proptest = "1"
getrandom = { version = "0.4.0-rc.0", features = ["sys_rng"] }
sha1 = "0.11.0-rc.2"
der = { version = "0.8.0-rc.10", features = ["derive"] }
rand_core = "0.10.0-rc-3"
rand_core = "0.10.0-rc-5"
[features]
default = ["pkcs8"]
+1 -1
View File
@@ -17,7 +17,7 @@ hybrid-array = { version = "0.4", features = ["extra-sizes", "zeroize"] }
getrandom = { version = "0.4.0-rc.0", features = ["sys_rng"] }
sha2 = "0.11.0-rc.3"
static_assertions = "1.1"
rand_core = "0.10.0-rc-3"
rand_core = "0.10.0-rc-5"
signature = { version = "3.0.0-rc.6", features = ["alloc", "digest", "rand_core"] }
typenum = { version = "1.17", features = ["const-generics"] }
zeroize = "1.8"
+12 -8
View File
@@ -27,10 +27,11 @@ pub mod tests {
private::SigningKey,
},
};
use core::convert::Infallible;
use digest::{Digest, OutputSizeUser};
use hex_literal::hex;
use hybrid_array::{Array, ArraySize};
use rand_core::{CryptoRng, RngCore, TryRngCore};
use rand_core::{TryCryptoRng, TryRngCore};
use signature::{RandomizedSignerMut, Verifier};
use std::{matches, ops::Add};
use typenum::{Sum, U2};
@@ -128,28 +129,31 @@ pub mod tests {
/// Constant RNG for testing purposes only.
pub struct ConstantRng<'a>(pub &'a [u8]);
impl RngCore for ConstantRng<'_> {
fn next_u32(&mut self) -> u32 {
impl TryRngCore for ConstantRng<'_> {
type Error = Infallible;
fn try_next_u32(&mut self) -> Result<u32, Self::Error> {
let (head, tail) = self.0.split_at(4);
self.0 = tail;
u32::from_be_bytes(head.try_into().unwrap())
Ok(u32::from_be_bytes(head.try_into().unwrap()))
}
fn next_u64(&mut self) -> u64 {
fn try_next_u64(&mut self) -> Result<u64, Self::Error> {
let (head, tail) = self.0.split_at(8);
self.0 = tail;
u64::from_be_bytes(head.try_into().unwrap())
Ok(u64::from_be_bytes(head.try_into().unwrap()))
}
fn fill_bytes(&mut self, dest: &mut [u8]) {
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Self::Error> {
let (hd, tl) = self.0.split_at(dest.len());
dest.copy_from_slice(hd);
self.0 = tl;
Ok(())
}
}
/// WARNING: This is not a secure cryptographic RNG. It is only used for testing.
impl CryptoRng for ConstantRng<'_> {}
impl TryCryptoRng for ConstantRng<'_> {}
#[test]
/// Test Case 2, Appendix F. LMS level 2. https://datatracker.ietf.org/doc/html/rfc8554#appendix-F
+1 -1
View File
@@ -40,7 +40,7 @@ signature = { version = "3.0.0-rc.6", default-features = false, features = ["dig
# optional dependencies
const-oid = { version = "0.10", features = ["db"], optional = true }
pkcs8 = { version = "0.11.0-rc.8", default-features = false, optional = true }
rand_core = { version = "0.10.0-rc-3", optional = true }
rand_core = { version = "0.10.0-rc-5", optional = true }
zeroize = { version = "1.8.1", optional = true, default-features = false }
[dev-dependencies]
+1 -1
View File
@@ -21,7 +21,7 @@ digest = "0.11.0-rc.5"
hmac = "0.13.0-rc.3"
hybrid-array = { version = "0.4", features = ["extra-sizes"] }
pkcs8 = { version = "0.11.0-rc.8", default-features = false }
rand_core = { version = "0.10.0-rc-3" }
rand_core = "0.10.0-rc-5"
sha2 = { version = "0.11.0-rc.3", default-features = false }
sha3 = { version = "0.11.0-rc.3", default-features = false }
signature = { version = "3.0.0-rc.6", features = ["rand_core"] }
+1 -1
View File
@@ -14,7 +14,7 @@
//! to be resistant to quantum computers.
//!
//! While the API exposed by SLH-DSA is the same as conventional signature schemes, it is important
//! to note that the signatures produced by the algorithm are much larger than classical schemes like EdDSA,
//! to note that the signatures produced by the algorithm are much larger than classical schemes like `EdDSA`,
//! ranging from over 7KB for the smallest parameter set to nearly 50KB at the largest
//!
//! This crate currently allocates signatures and intermediate values on the stack, which may cause problems for
+12 -9
View File
@@ -8,9 +8,9 @@ use std::{array::from_fn, fmt::Write};
use aes::Aes256;
use cipher::{KeyIvInit, StreamCipher};
use core::{error, fmt};
use core::{convert::Infallible, error, fmt};
use ctr::Ctr128BE;
use rand_core::{CryptoRng, RngCore, TryCryptoRng, TryRngCore};
use rand_core::{RngCore, TryCryptoRng, TryRngCore};
use sha2::Digest;
use signature::Keypair;
use signature::SignatureEncoding;
@@ -38,26 +38,29 @@ impl KatRng {
}
}
impl RngCore for KatRng {
fn fill_bytes(&mut self, dest: &mut [u8]) {
impl TryRngCore for KatRng {
type Error = Infallible;
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Self::Error> {
dest.fill(0);
self.0.apply_keystream(dest);
// Discard up to end of block if not a multiple of 16
let pad = (16 - (dest.len() % 16)) % 16;
self.0.apply_keystream(&mut [0; 16][..pad]);
self.update(None);
Ok(())
}
fn next_u32(&mut self) -> u32 {
fn try_next_u32(&mut self) -> Result<u32, Self::Error> {
rand_core::utils::next_word_via_fill(self)
}
fn next_u64(&mut self) -> u64 {
fn try_next_u64(&mut self) -> Result<u64, Self::Error> {
rand_core::utils::next_word_via_fill(self)
}
}
impl CryptoRng for KatRng {}
impl TryCryptoRng for KatRng {}
// Mock RNG that just returns a pre-determined bytestring
struct ConstRng(Vec<u8>);
@@ -131,9 +134,9 @@ where
let mut seed = vec![0; (P::VkLen::USIZE * 3) / 2];
rng.fill_bytes(&mut seed);
let mut seed_rng = ConstRng(seed);
let seed_rng = ConstRng(seed);
let sk = SigningKey::<P>::new(&mut seed_rng.unwrap_mut());
let sk = SigningKey::<P>::new(&mut seed_rng.unwrap_err());
let pk = sk.verifying_key();
writeln!(resp, "pk = {}", hex::encode_upper(pk.to_bytes())).unwrap();