summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-12-03 14:39:38 +0100
committerNora Widdecke <nora@sequoia-pgp.org>2021-12-13 19:01:14 +0100
commit22390768f9812ae5d46214fcb8621dbad526cd87 (patch)
tree25676b060282280319b27bc643401a1074d5785b /openpgp/src/crypto/backend
parent321b0cc381f3c44f81cfc4a9cf502be169262d14 (diff)
openpgp: Ensure rand:0.7 for rust-crypto.
- ed25519-dalek requires rand:0.7 types, so make sure they are used, and not the ones form rand:0.8.
Diffstat (limited to 'openpgp/src/crypto/backend')
-rw-r--r--openpgp/src/crypto/backend/rust.rs4
-rw-r--r--openpgp/src/crypto/backend/rust/asymmetric.rs2
-rw-r--r--openpgp/src/crypto/backend/rust/ecdh.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/crypto/backend/rust.rs b/openpgp/src/crypto/backend/rust.rs
index cf08f26d..1bc6bf05 100644
--- a/openpgp/src/crypto/backend/rust.rs
+++ b/openpgp/src/crypto/backend/rust.rs
@@ -16,8 +16,8 @@ pub mod symmetric;
/// The output may be used as session keys or to derive long-term
/// cryptographic keys from.
pub fn random<B: AsMut<[u8]>>(mut buf: B) {
- use rand::rngs::OsRng;
- use rand::RngCore;
+ use rand07::rngs::OsRng;
+ use rand07::RngCore;
OsRng.fill_bytes(buf.as_mut())
}
diff --git a/openpgp/src/crypto/backend/rust/asymmetric.rs b/openpgp/src/crypto/backend/rust/asymmetric.rs
index 43a53dbc..5ca2cce8 100644
--- a/openpgp/src/crypto/backend/rust/asymmetric.rs
+++ b/openpgp/src/crypto/backend/rust/asymmetric.rs
@@ -8,7 +8,7 @@ use std::convert::TryFrom;
use std::time::SystemTime;
use num_bigint_dig::{traits::ModInverse, BigUint};
-use rand::rngs::OsRng;
+use rand07::rngs::OsRng;
use rsa::{PaddingScheme, RSAPublicKey, RSAPrivateKey, PublicKey, PublicKeyParts, Hash};
use crate::{Error, Result};
diff --git a/openpgp/src/crypto/backend/rust/ecdh.rs b/openpgp/src/crypto/backend/rust/ecdh.rs
index ac306ff7..8531013d 100644
--- a/openpgp/src/crypto/backend/rust/ecdh.rs
+++ b/openpgp/src/crypto/backend/rust/ecdh.rs
@@ -2,7 +2,7 @@
use std::convert::TryInto;
-use rand::rngs::OsRng;
+use rand07::rngs::OsRng;
use crate::{Error, Result};
use crate::crypto::SessionKey;