Skip to content

Commit

Permalink
Bring back rand_chacha
Browse files Browse the repository at this point in the history
  • Loading branch information
survived committed Apr 25, 2024
1 parent 19773c0 commit 3af24b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
13 changes: 1 addition & 12 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions round-based-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ tokio = { version = "1", features = ["rt", "macros"] }
hex-literal = "0.3"
futures = "0.3"
matches = "0.1"

rand_dev = "0.1"
rand_chacha = "0.3"

round-based = { path = "../round-based" }
random-generation-protocol = { path = "../examples/random-generation-protocol" }
4 changes: 3 additions & 1 deletion round-based-tests/tests/rounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use round_based::rounds_router::errors::IoError;
use round_based::rounds_router::{simple_store::RoundInput, CompleteRoundError, RoundsRouter};
use round_based::{Delivery, Incoming, MessageType, MpcParty, Outgoing};

const PARTY0_SEED: [u8; 32] =
hex!("6772d079d5c984b3936a291e36b0d3dc6c474e36ed4afdfc973ef79a431ca870");
const PARTY1_COMMITMENT: [u8; 32] =
hex!("2a8c585d9a80cb78bc226f4ab35a75c8e5834ff77a83f41cf6c893ea0f3b2aed");
const PARTY1_RANDOMNESS: [u8; 32] =
Expand Down Expand Up @@ -395,7 +397,7 @@ where
I::IntoIter: Send + 'static,
E: std::error::Error + Send + Sync + Unpin + 'static,
{
let rng = rand_dev::DevRng::new();
let rng = rand_chacha::ChaCha8Rng::from_seed(PARTY0_SEED);

let party = MpcParty::connected(MockedDelivery::new(stream::iter(incomings), sink::drain()));
protocol_of_random_generation(party, 0, 3, rng).await
Expand Down

0 comments on commit 3af24b7

Please sign in to comment.