Skip to content

Commit

Permalink
test: use deterministic PRG (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
themighty1 committed May 13, 2024
1 parent cfa42a5 commit 0e3cd1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ot/mpz-ot-core/src/ferret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ mod tests {
ideal_mpcot::{IdealMpcot, MpcotMsgForReceiver, MpcotMsgForSender},
};
use mpz_core::{lpn::LpnParameters, prg::Prg};
use rand::SeedableRng;

const LPN_PARAMETERS_TEST: LpnParameters = LpnParameters {
n: 9600,
Expand All @@ -63,7 +64,7 @@ mod tests {

#[test]
fn ferret_test() {
let mut prg = Prg::new();
let mut prg = Prg::from_seed([1u8; 16].into());
let delta = prg.random_block();
let mut ideal_cot = IdealCOT::new_with_delta(delta);
let mut ideal_mpcot = IdealMpcot::init_with_delta(delta);
Expand Down
5 changes: 3 additions & 2 deletions ot/mpz-ot-core/src/ferret/mpcot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ mod tests {
};
use crate::ideal::ideal_spcot::{IdealSpcot, SpcotMsgForReceiver, SpcotMsgForSender};
use mpz_core::prg::Prg;
use rand::SeedableRng;

#[test]
fn mpcot_general_test() {
let mut prg = Prg::new();
let mut prg = Prg::from_seed([1u8; 16].into());
let delta = prg.random_block();
let mut ideal_spcot = IdealSpcot::new_with_delta(delta);

Expand Down Expand Up @@ -94,7 +95,7 @@ mod tests {

#[test]
fn mpcot_regular_test() {
let mut prg = Prg::new();
let mut prg = Prg::from_seed([2u8; 16].into());
let delta = prg.random_block();
let mut ideal_spcot = IdealSpcot::new_with_delta(delta);

Expand Down

0 comments on commit 0e3cd1a

Please sign in to comment.