This commit is contained in:
Pro7ech
2025-10-15 15:39:52 +02:00
parent 58bee4805e
commit 15ee02e21d
65 changed files with 927 additions and 922 deletions

View File

@@ -35,7 +35,7 @@ impl<D: DataRef> GGLWE<D> {
let dsize: usize = self.dsize().into();
let base2k: usize = self.base2k().into();
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GLWE::decrypt_scratch_space(module, self));
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GLWE::decrypt_tmp_bytes(module, self));
let mut pt: GLWEPlaintext<Vec<u8>> = GLWEPlaintext::alloc_from_infos(module, self);
(0..self.rank_in().into()).for_each(|col_i| {

View File

@@ -48,7 +48,7 @@ impl<D: DataRef> GGSW<D> {
let mut pt_big: VecZnxBig<Vec<u8>, B> = module.vec_znx_big_alloc(1, self.size());
let mut scratch: ScratchOwned<B> =
ScratchOwned::alloc(GLWE::decrypt_scratch_space(module, self) | module.vec_znx_normalize_tmp_bytes());
ScratchOwned::alloc(GLWE::decrypt_tmp_bytes(module, self) | module.vec_znx_normalize_tmp_bytes());
(0..(self.rank() + 1).into()).for_each(|col_j| {
(0..self.dnum().into()).for_each(|row_i| {
@@ -120,7 +120,7 @@ impl<D: DataRef> GGSW<D> {
let mut pt_big: VecZnxBig<Vec<u8>, B> = module.vec_znx_big_alloc(1, self.size());
let mut scratch: ScratchOwned<B> =
ScratchOwned::alloc(GLWE::decrypt_scratch_space(module, self) | module.vec_znx_normalize_tmp_bytes());
ScratchOwned::alloc(GLWE::decrypt_tmp_bytes(module, self) | module.vec_znx_normalize_tmp_bytes());
(0..(self.rank() + 1).into()).for_each(|col_j| {
(0..self.dnum().into()).for_each(|row_i| {

View File

@@ -61,7 +61,7 @@ impl<D: DataRef> GLWE<D> {
+ VecZnxNormalizeInplace<B>,
B: Backend + ScratchOwnedAllocImpl<B> + ScratchOwnedBorrowImpl<B>,
{
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GLWE::decrypt_scratch_space(module, self));
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GLWE::decrypt_tmp_bytes(module, self));
let noise_have: f64 = self.noise(module, sk_prepared, pt_want, scratch.borrow());
assert!(noise_have <= max_noise, "{noise_have} {max_noise}");
}