Fixed gadget product & added noise estimations

This commit is contained in:
Jean-Philippe Bossuat
2025-02-24 08:31:02 +01:00
parent 014bf0c2d1
commit 26c2bcbc05
24 changed files with 762 additions and 473 deletions

View File

@@ -1,6 +1,7 @@
use base2k::{Encoding, FFT64, SvpPPolOps, VecZnx, VecZnxApi};
use rlwe::{
ciphertext::Ciphertext,
elem::ElemCommon,
keys::SecretKey,
parameters::{Parameters, ParametersLiteral},
plaintext::Plaintext,
@@ -22,7 +23,7 @@ fn main() {
let mut tmp_bytes: Vec<u8> = vec![
0u8;
params.decrypt_rlwe_thread_safe_tmp_byte(params.log_q())
params.decrypt_rlwe_tmp_byte(params.log_q())
| params.encrypt_rlwe_sk_tmp_bytes(params.log_q())
];
@@ -64,7 +65,7 @@ fn main() {
&mut tmp_bytes,
);
params.decrypt_rlwe_thread_safe(&mut pt, &ct, &sk_svp_ppol, &mut tmp_bytes);
params.decrypt_rlwe(&mut pt, &ct, &sk_svp_ppol, &mut tmp_bytes);
pt.0.value[0].print(pt.cols(), 16);