remove prints

This commit is contained in:
Janmajaya Mall
2024-06-16 22:54:57 +05:30
parent a34f34757f
commit b1af696918
3 changed files with 4 additions and 13 deletions

View File

@@ -950,17 +950,15 @@ where
);
let mut ais = M::zeros(ui_to_s_ksk_decomposition_count.0, ring_size);
println!("START {}...", share.user_index);
ais.iter_rows_mut().for_each(|r_ai| {
RandomFillUniformInModulus::random_fill(
&mut ksk_prng,
rlwe_q,
r_ai.as_mut(),
);
println!("{:?}", r_ai.as_ref());
nttop.forward(r_ai.as_mut())
});
println!("...END {}", share.user_index);
ais
})
.collect_vec();
@@ -3068,7 +3066,7 @@ mod tests {
ModulusPowerOf2<CiphertextModulus<u64>>,
ShoupServerKeyEvaluationDomain<Vec<Vec<u64>>>,
>::new(NON_INTERACTIVE_SMALL_MP_BOOL_PARAMS);
let mp_seed = NonInteractiveMultiPartyCrs { seed: [0u8; 32] };
let mp_seed = NonInteractiveMultiPartyCrs { seed: [1u8; 32] };
let ring_size = evaluator.parameters().rlwe_n().0;
let rlwe_q = evaluator.parameters().rlwe_q();
@@ -3137,7 +3135,7 @@ mod tests {
// RLWE'(-sm)
gadget_vec_a.iter().enumerate().for_each(|(index, beta)| {
// RLWE(\beta -sm)
dbg!(beta);
// \beta * -sX^[lwe_s[i]]
let mut beta_neg_sm = neg_sm.clone();
rlwe_modop.elwise_scalar_mul_mut(&mut beta_neg_sm, beta);

View File

@@ -161,13 +161,10 @@ where
let mut scratch_space = M::R::zeros(ring_size);
println!("START KSK...");
izip!(ksk.iter_rows_mut(), gadget_vec.iter()).for_each(|(e_ksk, beta)| {
// sample a_i
RandomFillUniformInModulus::random_fill(p_rng, q, e_ksk.as_mut());
println!("{:?}", e_ksk.as_ref());
// a_i * s + e + beta u
nttop.forward(e_ksk.as_mut());
modop.elwise_mul_mut(e_ksk.as_mut(), s_poly_eval.as_ref());
@@ -181,7 +178,6 @@ where
// a_i * s + e + \beta * u
modop.elwise_add_mut(e_ksk.as_mut(), scratch_space.as_ref());
});
println!("...END");
ksk
}
@@ -217,11 +213,9 @@ where
let mut scratch_space = M::R::zeros(ring_size);
println!("START KSK 0 ENC...");
izip!(zero_encs.iter_rows_mut()).for_each(|(e_zero)| {
// sample a_i
RandomFillUniformInModulus::random_fill(p_rng, q, e_zero.as_mut());
println!("{:?}", e_zero.as_ref());
// a_i * s + e
nttop.forward(e_zero.as_mut());
@@ -231,7 +225,6 @@ where
RandomFillGaussianInModulus::random_fill(rng, q, scratch_space.as_mut());
modop.elwise_add_mut(e_zero.as_mut(), scratch_space.as_ref());
});
println!("...END");
zero_encs
}

View File

@@ -9,7 +9,7 @@ use rand_distr::{uniform::SampleUniform, Distribution};
use crate::{backend::Modulus, utils::WithLocal};
thread_local! {
pub(crate) static DEFAULT_RNG: RefCell<DefaultSecureRng> = RefCell::new(DefaultSecureRng::new_seeded([0u8;32]));
pub(crate) static DEFAULT_RNG: RefCell<DefaultSecureRng> = RefCell::new(DefaultSecureRng::new());
}
pub trait NewWithSeed {