mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
wip
This commit is contained in:
@@ -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| {
|
||||
|
||||
@@ -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| {
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user