Skip to content

Commit

Permalink
use mc-rand, delete mc-crypto-rand (#3291)
Browse files Browse the repository at this point in the history
* use mc-rand, delete mc-crypto-rand

* bump to 1.1, fix cargo sort issue

* Update common/Cargo.toml

Co-authored-by: Varsha <102332078+varsha888@users.noreply.github.com>

---------

Co-authored-by: Varsha <102332078+varsha888@users.noreply.github.com>
  • Loading branch information
cbeck88 and varsha888 committed Mar 27, 2023
1 parent 6c0735b commit 1a9f649
Show file tree
Hide file tree
Showing 61 changed files with 164 additions and 407 deletions.
62 changes: 32 additions & 30 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ members = [
"crypto/message-cipher",
"crypto/multisig",
"crypto/noise",
"crypto/rand",
"crypto/ring-signature",
"crypto/ring-signature/signer",
"crypto/sig",
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ loggers = [
[dependencies]
mc-crypto-digestible = { path = "../crypto/digestible" }
mc-crypto-keys = { path = "../crypto/keys", default-features = false, features = [ "serde", "alloc", "prost" ] }
mc-crypto-rand = { path = "../crypto/rand" }
mc-rand = "1.0"
# loggers-only dependencies
mc-util-build-info = { path = "../util/build/info", optional = true }
# log- and loggers-only dependencies
Expand Down
4 changes: 2 additions & 2 deletions common/src/hasher_builder.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) 2018-2022 The MobileCoin Foundation
// Copyright (c) 2018-2023 The MobileCoin Foundation

//! This file provides [HasherBuilder], used in `mc_common::HashMap`
//! in and out of the enclave.

use core::hash::BuildHasher;
use mc_crypto_rand::McRng;
use mc_rand::McRng;
use rand_core::RngCore;
use siphasher::sip::SipHasher13;

Expand Down
2 changes: 1 addition & 1 deletion connection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mc-common = { path = "../common" }
mc-consensus-api = { path = "../consensus/api" }
mc-crypto-keys = { path = "../crypto/keys" }
mc-crypto-noise = { path = "../crypto/noise" }
mc-crypto-rand = { path = "../crypto/rand" }
mc-transaction-core = { path = "../transaction/core" }
mc-util-grpc = { path = "../util/grpc" }
mc-util-serial = { path = "../util/serial" }
Expand All @@ -27,6 +26,7 @@ aes-gcm = "0.10.1"
cookie = "0.17"
displaydoc = "0.2"
grpcio = "0.12.1"
mc-rand = "1"
retry = "2.0"
secrecy = "0.8"
serde = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions connection/src/thick.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2022 The MobileCoin Foundation
// Copyright (c) 2018-2023 The MobileCoin Foundation

//! Connection implementations required for the thick client.
//! The attested client implementation.
Expand Down Expand Up @@ -38,7 +38,7 @@ use mc_consensus_api::{
};
use mc_crypto_keys::X25519;
use mc_crypto_noise::CipherError;
use mc_crypto_rand::McRng;
use mc_rand::McRng;
use mc_transaction_core::tx::Tx;
use mc_util_grpc::{ConnectionUriGrpcioChannel, GrpcCookieStore, CHAIN_ID_GRPC_HEADER};
use mc_util_serial::encode;
Expand Down
2 changes: 1 addition & 1 deletion consensus/enclave/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ pkg-config = "0.3"
mc-attest-ake = { path = "../../attest/ake" }
mc-attest-api = { path = "../../attest/api" }
mc-attest-net = { path = "../../attest/net" }
mc-crypto-rand = { path = "../../crypto/rand" }
mc-fog-test-infra = { path = "../../fog/test_infra" }
mc-ledger-db = { path = "../../ledger/db", features = ["test_utils"] }
mc-rand = "1.0"
mc-sgx-report-cache-untrusted = { path = "../../sgx/report-cache/untrusted" }
mc-transaction-core-test-utils = { path = "../../transaction/core/test-utils" }
mc-util-metrics = { path = "../../util/metrics" }
Expand Down
2 changes: 1 addition & 1 deletion consensus/enclave/impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mc-crypto-ake-enclave = { path = "../../../crypto/ake/enclave" }
mc-crypto-digestible = { path = "../../../crypto/digestible" }
mc-crypto-keys = { path = "../../../crypto/keys", default-features = false }
mc-crypto-message-cipher = { path = "../../../crypto/message-cipher" }
mc-crypto-rand = { path = "../../../crypto/rand" }
mc-rand = "1.0"
mc-sgx-compat = { path = "../../../sgx/compat" }
mc-sgx-report-cache-api = { path = "../../../sgx/report-cache/api" }
mc-transaction-core = { path = "../../../transaction/core" }
Expand Down
4 changes: 2 additions & 2 deletions consensus/enclave/impl/src/identity.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2018-2022 The MobileCoin Foundation
// Copyright (c) 2018-2023 The MobileCoin Foundation

/// Implementation of ed25519 signer identity for report
use mc_crypto_ake_enclave::EnclaveIdentity;
use mc_crypto_keys::{Ed25519Pair, Ed25519Public};
use mc_crypto_rand::McRng;
use mc_rand::McRng;
use mc_sgx_compat::sync::Mutex;
use mc_util_from_random::FromRandom;

Expand Down
4 changes: 2 additions & 2 deletions consensus/enclave/impl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2022 The MobileCoin Foundation
// Copyright (c) 2018-2023 The MobileCoin Foundation

//! MobileNode Internal Enclave Implementation
//!
Expand Down Expand Up @@ -55,7 +55,7 @@ use mc_crypto_ake_enclave::AkeEnclaveState;
use mc_crypto_digestible::{DigestTranscript, Digestible, MerlinTranscript};
use mc_crypto_keys::{Ed25519Pair, Ed25519Public, RistrettoPrivate, RistrettoPublic, X25519Public};
use mc_crypto_message_cipher::{AesMessageCipher, MessageCipher};
use mc_crypto_rand::McRng;
use mc_rand::McRng;
use mc_sgx_compat::sync::Mutex;
use mc_sgx_report_cache_api::{ReportableEnclave, Result as ReportableEnclaveResult};
use mc_transaction_core::{
Expand Down
2 changes: 1 addition & 1 deletion consensus/enclave/mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mc-common = { path = "../../../common" }
mc-consensus-enclave-api = { path = "../api" }
mc-crypto-keys = { path = "../../../crypto/keys" }
mc-crypto-multisig = { path = "../../../crypto/multisig" }
mc-crypto-rand = { path = "../../../crypto/rand" }
mc-rand = "1.0"
mc-sgx-report-cache-api = { path = "../../../sgx/report-cache/api" }
mc-transaction-core = { path = "../../../transaction/core" }
mc-transaction-core-test-utils = { path = "../../../transaction/core/test-utils" }
Expand Down
Loading

0 comments on commit 1a9f649

Please sign in to comment.