Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use deterministic PRG #127

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading