Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 35 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ exclude = ["marvin_toolkit/", "thirdparty/"]

[dependencies]
const-oid = { version = "0.10", default-features = false }
crypto-bigint = { version = "0.7.0-rc.16", default-features = false, features = ["zeroize", "alloc"] }
crypto-primes = { version = "0.7.0-pre.6", default-features = false }
crypto-bigint = { version = "0.7.0-rc.20", default-features = false, features = ["zeroize", "alloc"] }
crypto-primes = { version = "0.7.0-pre.7", default-features = false }
digest = { version = "0.11.0-rc.4", default-features = false, features = ["alloc", "oid"] }
rand_core = { version = "0.10.0-rc-2", default-features = false }
rand_core = { version = "0.10.0-rc-5", default-features = false }
signature = { version = "3.0.0-rc.5", default-features = false, features = ["alloc", "digest", "rand_core"] }
zeroize = { version = "1.8", features = ["alloc"] }

# optional dependencies
crypto-common = { version = "0.2.0-rc.8", optional = true, features = ["getrandom"] }
pkcs1 = { version = "0.8.0-rc.3", optional = true, default-features = false, features = ["alloc", "pem"] }
pkcs8 = { version = "0.11.0-rc.8", optional = true, default-features = false, features = ["alloc", "pem"] }
pkcs8 = { version = "0.11.0-rc.9", optional = true, default-features = false, features = ["alloc", "pem"] }
serdect = { version = "0.4", optional = true }
sha1 = { version = "0.11.0-rc.3", optional = true, default-features = false, features = ["oid"] }
sha2 = { version = "0.11.0-rc.3", optional = true, default-features = false, features = ["oid"] }
Expand All @@ -37,8 +37,8 @@ base64ct = { version = "1", features = ["alloc"] }
hex-literal = "1"
proptest = "1"
serde_test = "1.0.89"
rand = { version = "0.10.0-rc.5", features = ["chacha"] }
rand_core = { version = "0.10.0-rc-3", default-features = false }
rand = { version = "0.10.0-rc.7", features = ["chacha"] }
rand_core = { version = "0.10.0-rc-5", default-features = false }
sha1 = { version = "0.11.0-rc.3", default-features = false, features = ["oid"] }
sha2 = { version = "0.11.0-rc.3", default-features = false, features = ["oid"] }
sha3 = { version = "0.11.0-rc.3", default-features = false, features = ["oid"] }
Expand Down Expand Up @@ -67,6 +67,3 @@ opt-level = 2

[profile.bench]
debug = true

[patch.crates-io]
rand = { git = "https://github.com/rust-random/rand" }
2 changes: 1 addition & 1 deletion src/algorithms/oaep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use alloc::boxed::Box;
use alloc::vec::Vec;

use crypto_bigint::{Choice, CtEq, CtOption, CtSelect};
use crypto_bigint::{Choice, CtAssign, CtEq, CtOption};
use digest::{Digest, FixedOutputReset};
use rand_core::TryCryptoRng;
use zeroize::Zeroizing;
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/pkcs1v15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use alloc::vec::Vec;
use const_oid::AssociatedOid;
use crypto_bigint::{Choice, CtEq, CtSelect};
use crypto_bigint::{Choice, CtAssign, CtEq, CtSelect};
use digest::Digest;
use rand_core::TryCryptoRng;
use zeroize::Zeroizing;
Expand Down
14 changes: 8 additions & 6 deletions src/dummy_rng.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
use rand_core::{CryptoRng, RngCore};
use core::convert::Infallible;
use rand_core::{TryCryptoRng, TryRngCore};

/// This is a dummy RNG for cases when we need a concrete RNG type
/// which does not get used.
#[derive(Copy, Clone)]
pub(crate) struct DummyRng;

impl RngCore for DummyRng {
fn next_u32(&mut self) -> u32 {
impl TryRngCore for DummyRng {
type Error = Infallible;
fn try_next_u32(&mut self) -> Result<u32, Self::Error> {
unimplemented!();
}

fn next_u64(&mut self) -> u64 {
fn try_next_u64(&mut self) -> Result<u64, Self::Error> {
unimplemented!();
}

fn fill_bytes(&mut self, _: &mut [u8]) {
fn try_fill_bytes(&mut self, _: &mut [u8]) -> Result<(), Self::Error> {
unimplemented!();
}
}

impl CryptoRng for DummyRng {}
impl TryCryptoRng for DummyRng {}