From 2ac849da36ade48ae1d8cd7e1546549615785ae3 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 15 May 2018 01:45:29 +0000 Subject: rust: Make Rng::new() methods public. --- src/rust/rand/rng.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rust') diff --git a/src/rust/rand/rng.rs b/src/rust/rand/rng.rs index cfd96c9617..d5fae8a32e 100644 --- a/src/rust/rand/rng.rs +++ b/src/rust/rand/rng.rs @@ -43,7 +43,7 @@ mod internal { impl TorRng { // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c #[allow(dead_code)] - fn new() -> Self { + pub fn new() -> Self { if !c_tor_crypto_seed_rng() { tor_log_msg!(LogSeverity::Warn, LogDomain::General, "TorRng::from_seed()", @@ -90,7 +90,7 @@ mod internal { impl TorStrongestRng { // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c #[allow(dead_code)] - fn new() -> Self { + pub fn new() -> Self { if !c_tor_crypto_seed_rng() { tor_log_msg!(LogSeverity::Warn, LogDomain::General, "TorStrongestRng::from_seed()", -- cgit v1.2.3-54-g00ecf From 9988882c6399b9b54d50f22617f3358bec4cb89b Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 15 May 2018 02:02:02 +0000 Subject: rust: Move rand crate into crypto parent crate. --- src/rust/Cargo.lock | 17 ++---- src/rust/Cargo.toml | 1 - src/rust/crypto/Cargo.toml | 15 +++-- src/rust/crypto/rand/mod.rs | 16 +++++ src/rust/crypto/rand/rng.rs | 140 ++++++++++++++++++++++++++++++++++++++++++++ src/rust/include.am | 5 +- src/rust/rand/Cargo.toml | 27 --------- src/rust/rand/lib.rs | 16 ----- src/rust/rand/rng.rs | 140 -------------------------------------------- 9 files changed, 173 insertions(+), 204 deletions(-) create mode 100644 src/rust/crypto/rand/mod.rs create mode 100644 src/rust/crypto/rand/rng.rs delete mode 100644 src/rust/rand/Cargo.toml delete mode 100644 src/rust/rand/lib.rs delete mode 100644 src/rust/rand/rng.rs (limited to 'src/rust') diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index ddbc0ac2b7..769e2c39c5 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -5,7 +5,11 @@ dependencies = [ "digest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "external 0.0.1", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "smartlist 0.0.1", + "tor_allocate 0.0.1", + "tor_log 0.1.0", ] [[package]] @@ -49,19 +53,6 @@ dependencies = [ "tor_util 0.0.1", ] -[[package]] -name = "rand" -version = "0.0.1" -dependencies = [ - "external 0.0.1", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tor_allocate 0.0.1", - "tor_log 0.1.0", - "tor_util 0.0.1", -] - [[package]] name = "rand" version = "0.5.0-pre.1" diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 1aaab0c4f8..c3e44d2a79 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -3,7 +3,6 @@ members = [ "crypto", "external", "protover", - "rand", "smartlist", "tor_allocate", "tor_log", diff --git a/src/rust/crypto/Cargo.toml b/src/rust/crypto/Cargo.toml index e6a8bffa27..8b489dfb47 100644 --- a/src/rust/crypto/Cargo.toml +++ b/src/rust/crypto/Cargo.toml @@ -13,9 +13,16 @@ crate_type = ["rlib", "staticlib"] [dependencies] libc = "=0.2.39" digest = "=0.7.2" +rand_core = "=0.1.0" -[dependencies.external] -path = "../external" +external = { path = "../external" } +smartlist = { path = "../smartlist" } +tor_allocate = { path = "../tor_allocate" } +tor_log = { path = "../tor_log" } + +[dev-dependencies] +rand = { version = "=0.5.0-pre.1", default-features = false } + +[features] +testing = ["tor_log/testing"] -[dependencies.smartlist] -path = "../smartlist" diff --git a/src/rust/crypto/rand/mod.rs b/src/rust/crypto/rand/mod.rs new file mode 100644 index 0000000000..6b3058ad58 --- /dev/null +++ b/src/rust/crypto/rand/mod.rs @@ -0,0 +1,16 @@ +// Copyright (c) 2018, The Tor Project, Inc. +// Copyright (c) 2018, isis agora lovecruft +// See LICENSE for licensing information + +// External dependencies +#[cfg(test)] +extern crate rand; +extern crate rand_core; + +// Internal dependencies +extern crate external; +#[cfg(not(test))] +#[macro_use] +extern crate tor_log; + +pub mod rng; diff --git a/src/rust/crypto/rand/rng.rs b/src/rust/crypto/rand/rng.rs new file mode 100644 index 0000000000..d5fae8a32e --- /dev/null +++ b/src/rust/crypto/rand/rng.rs @@ -0,0 +1,140 @@ +// Copyright (c) 2018, The Tor Project, Inc. +// Copyright (c) 2018, isis agora lovecruft +// See LICENSE for licensing information + +//! Wrappers for Tor's random number generators to provide implementations of +//! `rand_core` traits. + +// This is the real implementation, in use in production, which calls into our C +// wrappers in /src/common/crypto_rand.c, which call into OpenSSL, system +// libraries, and make syscalls. +#[cfg(not(test))] +mod internal { + use std::u64; + + use rand_core::CryptoRng; + use rand_core::Error; + use rand_core::RngCore; + use rand_core::impls::next_u32_via_fill; + use rand_core::impls::next_u64_via_fill; + + use external::c_tor_crypto_rand; + use external::c_tor_crypto_strongest_rand; + use external::c_tor_crypto_seed_rng; + + use tor_log::LogDomain; + use tor_log::LogSeverity; + + /// Largest strong entropy request permitted. + // + // C_RUST_COUPLED: `MAX_STRONGEST_RAND_SIZE` /src/common/crypto_rand.c + const MAX_STRONGEST_RAND_SIZE: usize = 256; + + /// A wrapper around OpenSSL's RNG. + pub struct TorRng { + // This private, zero-length field forces the struct to be treated the + // same as its opaque C couterpart. + _unused: [u8; 0], + } + + /// Mark `TorRng` as being suitable for cryptographic purposes. + impl CryptoRng for TorRng {} + + impl TorRng { + // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c + #[allow(dead_code)] + pub fn new() -> Self { + if !c_tor_crypto_seed_rng() { + tor_log_msg!(LogSeverity::Warn, LogDomain::General, + "TorRng::from_seed()", + "The RNG could not be seeded!"); + } + // XXX also log success at info level —isis + TorRng{ _unused: [0u8; 0] } + } + } + + impl RngCore for TorRng { + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn next_u32(&mut self) -> u32 { + next_u32_via_fill(self) + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn next_u64(&mut self) -> u64 { + next_u64_via_fill(self) + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn fill_bytes(&mut self, dest: &mut [u8]) { + c_tor_crypto_rand(dest); + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> { + Ok(self.fill_bytes(dest)) + } + } + + /// A CSPRNG which hashes together randomness from OpenSSL's RNG and entropy + /// obtained from the operating system. + pub struct TorStrongestRng { + // This private, zero-length field forces the struct to be treated the + // same as its opaque C couterpart. + _unused: [u8; 0], + } + + /// Mark `TorRng` as being suitable for cryptographic purposes. + impl CryptoRng for TorStrongestRng {} + + impl TorStrongestRng { + // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c + #[allow(dead_code)] + pub fn new() -> Self { + if !c_tor_crypto_seed_rng() { + tor_log_msg!(LogSeverity::Warn, LogDomain::General, + "TorStrongestRng::from_seed()", + "The RNG could not be seeded!"); + } + // XXX also log success at info level —isis + TorStrongestRng{ _unused: [0u8; 0] } + } + } + + impl RngCore for TorStrongestRng { + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn next_u32(&mut self) -> u32 { + next_u32_via_fill(self) + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn next_u64(&mut self) -> u64 { + next_u64_via_fill(self) + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn fill_bytes(&mut self, dest: &mut [u8]) { + debug_assert!(dest.len() <= MAX_STRONGEST_RAND_SIZE); + + c_tor_crypto_strongest_rand(dest); + } + + // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c + fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> { + Ok(self.fill_bytes(dest)) + } + } +} + +// For testing, we expose a pure-Rust implementation. +#[cfg(test)] +mod internal { + // It doesn't matter if we pretend ChaCha is a CSPRNG in tests. + pub use rand::ChaChaRng as TorRng; + pub use rand::ChaChaRng as TorStrongestRng; +} + +// Finally, expose the public functionality of whichever appropriate internal +// module. +pub use self::internal::*; + diff --git a/src/rust/include.am b/src/rust/include.am index ba652bda0c..5fd9741e01 100644 --- a/src/rust/include.am +++ b/src/rust/include.am @@ -8,6 +8,8 @@ EXTRA_DIST +=\ src/rust/crypto/lib.rs \ src/rust/crypto/digests/mod.rs \ src/rust/crypto/digests/sha2.rs \ + src/rust/crypto/rand/mod.rs \ + src/rust/crypto/rand/rng.rs \ src/rust/external/Cargo.toml \ src/rust/external/crypto_digest.rs \ src/rust/external/crypto_rand.rs \ @@ -20,9 +22,6 @@ EXTRA_DIST +=\ src/rust/protover/lib.rs \ src/rust/protover/protover.rs \ src/rust/protover/tests/protover.rs \ - src/rust/rand/Cargo.toml \ - src/rust/rand/lib.rs \ - src/rust/rand/rng.rs \ src/rust/smartlist/Cargo.toml \ src/rust/smartlist/lib.rs \ src/rust/smartlist/smartlist.rs \ diff --git a/src/rust/rand/Cargo.toml b/src/rust/rand/Cargo.toml deleted file mode 100644 index b5bbf5c1b6..0000000000 --- a/src/rust/rand/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -# TODO: Note that this package should be merged into the "crypto" crate after #24659 is merged. - -[package] -authors = ["The Tor Project"] -version = "0.0.1" -name = "rand" -publish = false - -[features] -testing = ["tor_log/testing"] - -[dependencies] -libc = "=0.2.39" -rand_core = "=0.1.0" - -external = { path = "../external" } -tor_allocate = { path = "../tor_allocate" } -tor_log = { path = "../tor_log" } -tor_util = { path = "../tor_util" } - -[dev-dependencies] -rand = { version = "=0.5.0-pre.1", default-features = false } - -[lib] -name = "rand" -path = "lib.rs" -crate_type = ["rlib", "staticlib"] diff --git a/src/rust/rand/lib.rs b/src/rust/rand/lib.rs deleted file mode 100644 index 6b3058ad58..0000000000 --- a/src/rust/rand/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, The Tor Project, Inc. -// Copyright (c) 2018, isis agora lovecruft -// See LICENSE for licensing information - -// External dependencies -#[cfg(test)] -extern crate rand; -extern crate rand_core; - -// Internal dependencies -extern crate external; -#[cfg(not(test))] -#[macro_use] -extern crate tor_log; - -pub mod rng; diff --git a/src/rust/rand/rng.rs b/src/rust/rand/rng.rs deleted file mode 100644 index d5fae8a32e..0000000000 --- a/src/rust/rand/rng.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2018, The Tor Project, Inc. -// Copyright (c) 2018, isis agora lovecruft -// See LICENSE for licensing information - -//! Wrappers for Tor's random number generators to provide implementations of -//! `rand_core` traits. - -// This is the real implementation, in use in production, which calls into our C -// wrappers in /src/common/crypto_rand.c, which call into OpenSSL, system -// libraries, and make syscalls. -#[cfg(not(test))] -mod internal { - use std::u64; - - use rand_core::CryptoRng; - use rand_core::Error; - use rand_core::RngCore; - use rand_core::impls::next_u32_via_fill; - use rand_core::impls::next_u64_via_fill; - - use external::c_tor_crypto_rand; - use external::c_tor_crypto_strongest_rand; - use external::c_tor_crypto_seed_rng; - - use tor_log::LogDomain; - use tor_log::LogSeverity; - - /// Largest strong entropy request permitted. - // - // C_RUST_COUPLED: `MAX_STRONGEST_RAND_SIZE` /src/common/crypto_rand.c - const MAX_STRONGEST_RAND_SIZE: usize = 256; - - /// A wrapper around OpenSSL's RNG. - pub struct TorRng { - // This private, zero-length field forces the struct to be treated the - // same as its opaque C couterpart. - _unused: [u8; 0], - } - - /// Mark `TorRng` as being suitable for cryptographic purposes. - impl CryptoRng for TorRng {} - - impl TorRng { - // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c - #[allow(dead_code)] - pub fn new() -> Self { - if !c_tor_crypto_seed_rng() { - tor_log_msg!(LogSeverity::Warn, LogDomain::General, - "TorRng::from_seed()", - "The RNG could not be seeded!"); - } - // XXX also log success at info level —isis - TorRng{ _unused: [0u8; 0] } - } - } - - impl RngCore for TorRng { - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn next_u32(&mut self) -> u32 { - next_u32_via_fill(self) - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn next_u64(&mut self) -> u64 { - next_u64_via_fill(self) - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn fill_bytes(&mut self, dest: &mut [u8]) { - c_tor_crypto_rand(dest); - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> { - Ok(self.fill_bytes(dest)) - } - } - - /// A CSPRNG which hashes together randomness from OpenSSL's RNG and entropy - /// obtained from the operating system. - pub struct TorStrongestRng { - // This private, zero-length field forces the struct to be treated the - // same as its opaque C couterpart. - _unused: [u8; 0], - } - - /// Mark `TorRng` as being suitable for cryptographic purposes. - impl CryptoRng for TorStrongestRng {} - - impl TorStrongestRng { - // C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c - #[allow(dead_code)] - pub fn new() -> Self { - if !c_tor_crypto_seed_rng() { - tor_log_msg!(LogSeverity::Warn, LogDomain::General, - "TorStrongestRng::from_seed()", - "The RNG could not be seeded!"); - } - // XXX also log success at info level —isis - TorStrongestRng{ _unused: [0u8; 0] } - } - } - - impl RngCore for TorStrongestRng { - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn next_u32(&mut self) -> u32 { - next_u32_via_fill(self) - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn next_u64(&mut self) -> u64 { - next_u64_via_fill(self) - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn fill_bytes(&mut self, dest: &mut [u8]) { - debug_assert!(dest.len() <= MAX_STRONGEST_RAND_SIZE); - - c_tor_crypto_strongest_rand(dest); - } - - // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c - fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> { - Ok(self.fill_bytes(dest)) - } - } -} - -// For testing, we expose a pure-Rust implementation. -#[cfg(test)] -mod internal { - // It doesn't matter if we pretend ChaCha is a CSPRNG in tests. - pub use rand::ChaChaRng as TorRng; - pub use rand::ChaChaRng as TorStrongestRng; -} - -// Finally, expose the public functionality of whichever appropriate internal -// module. -pub use self::internal::*; - -- cgit v1.2.3-54-g00ecf From 760cf8e28f7319e924366a97be8882e2b04db49a Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 15 May 2018 19:31:29 +0000 Subject: rust: Update rand dev-dependency to 0.5.0-pre.2. --- src/rust/Cargo.lock | 14 ++++++++++---- src/rust/crypto/Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/rust') diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index 769e2c39c5..a16ffc4ef3 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -5,7 +5,7 @@ dependencies = [ "digest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "external 0.0.1", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "smartlist 0.0.1", "tor_allocate 0.0.1", @@ -55,10 +55,10 @@ dependencies = [ [[package]] name = "rand" -version = "0.5.0-pre.1" +version = "0.5.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -66,6 +66,11 @@ name = "rand_core" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_core" +version = "0.2.0-pre.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "smartlist" version = "0.0.1" @@ -114,6 +119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum digest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "00a49051fef47a72c9623101b19bd71924a45cca838826caae3eaa4d00772603" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" -"checksum rand 0.5.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7d7a7728c20bfd9fcc6e713e748e787c3d00e5ffd139b3ad1b5be92c5dfbaad5" +"checksum rand 0.5.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3795e4701d9628a63a84d0289e66279883b40df165fca7caed7b87122447032a" "checksum rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0224284424a4b818387b58d59336c288f99b48f69681aa60cc681fe038bbca5d" +"checksum rand_core 0.2.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7255ffbdb188d5be1a69b6f9f3cf187de4207430b9e79ed5b76458a6b20de9a" "checksum typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a99dc6780ef33c78780b826cf9d2a78840b72cae9474de4bcaf9051e60ebbd" diff --git a/src/rust/crypto/Cargo.toml b/src/rust/crypto/Cargo.toml index 8b489dfb47..508c288aa4 100644 --- a/src/rust/crypto/Cargo.toml +++ b/src/rust/crypto/Cargo.toml @@ -21,7 +21,7 @@ tor_allocate = { path = "../tor_allocate" } tor_log = { path = "../tor_log" } [dev-dependencies] -rand = { version = "=0.5.0-pre.1", default-features = false } +rand = { version = "=0.5.0-pre.2", default-features = false } [features] testing = ["tor_log/testing"] -- cgit v1.2.3-54-g00ecf From 4d349c6a6124b8d94dc787f0076c15b896272363 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 15 May 2018 19:33:20 +0000 Subject: rust: Update rand_core dependency to 0.2.0-pre.0. --- src/rust/Cargo.lock | 8 +------- src/rust/crypto/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/rust') diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index a16ffc4ef3..1d2a7359aa 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -6,7 +6,7 @@ dependencies = [ "external 0.0.1", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)", "smartlist 0.0.1", "tor_allocate 0.0.1", "tor_log 0.1.0", @@ -61,11 +61,6 @@ dependencies = [ "rand_core 0.2.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "rand_core" version = "0.2.0-pre.0" @@ -120,6 +115,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" "checksum rand 0.5.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3795e4701d9628a63a84d0289e66279883b40df165fca7caed7b87122447032a" -"checksum rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0224284424a4b818387b58d59336c288f99b48f69681aa60cc681fe038bbca5d" "checksum rand_core 0.2.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7255ffbdb188d5be1a69b6f9f3cf187de4207430b9e79ed5b76458a6b20de9a" "checksum typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a99dc6780ef33c78780b826cf9d2a78840b72cae9474de4bcaf9051e60ebbd" diff --git a/src/rust/crypto/Cargo.toml b/src/rust/crypto/Cargo.toml index 508c288aa4..3d343344ae 100644 --- a/src/rust/crypto/Cargo.toml +++ b/src/rust/crypto/Cargo.toml @@ -13,7 +13,7 @@ crate_type = ["rlib", "staticlib"] [dependencies] libc = "=0.2.39" digest = "=0.7.2" -rand_core = "=0.1.0" +rand_core = "=0.2.0-pre.0" external = { path = "../external" } smartlist = { path = "../smartlist" } -- cgit v1.2.3-54-g00ecf