mirror of
https://github.com/arnaucube/phantom-zone.git
synced 2026-01-08 23:21:29 +01:00
remove prints
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user