fixed many test noise check + update noise retrieval (not passing)

This commit is contained in:
Pro7ech
2025-11-18 17:38:16 +01:00
parent 0d4f7ed424
commit 2fb1627613
34 changed files with 1122 additions and 612 deletions

View File

@@ -1,8 +1,8 @@
use poulpy_core::{
GLWENormalize,
layouts::{
GGLWEToGGSWKeyLayout, GGSW, GGSWLayout, GLWE, GLWEAutomorphismKeyLayout, GLWELayout, GLWEPlaintext, GLWESecret, LWE,
LWELayout, LWEPlaintext, LWESecret,
GGLWEToGGSWKeyLayout, GGSW, GGSWInfos, GGSWLayout, GLWE, GLWEAutomorphismKeyLayout, GLWEInfos, GLWELayout, GLWEPlaintext,
GLWESecret, LWE, LWELayout, LWEPlaintext, LWESecret,
prepared::{GGSWPrepared, GLWESecretPrepared},
},
};
@@ -212,7 +212,23 @@ fn main() {
pt_ggsw.at_mut(0, 0)[0] = data;
// Prints noise of GGSW(data)
res.print_noise(&module, &sk_glwe_prepared, &pt_ggsw);
for row in 0..res.dnum().as_usize() {
for col in 0..res.rank().as_usize() + 1 {
println!(
"row:{row} col:{col} -> {}",
res.noise(
&module,
row,
col,
&pt_ggsw,
&sk_glwe_prepared,
scratch.borrow()
)
.std()
.log2()
)
}
}
// Tests RLWE(1) * GGSW(data)