mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
committed by
GitHub
parent
2cf0b1cf82
commit
2559d8ea81
@@ -7,7 +7,7 @@ use poulpy_hal::{
|
||||
use crate::{
|
||||
Distribution, GLWEEncryptSk, GetDistribution, GetDistributionMut, ScratchTakeCore,
|
||||
layouts::{
|
||||
GLWE, GLWEInfos, GLWEPublicKey, GLWEToMut,
|
||||
GLWEInfos, GLWEPublicKey, GLWEToMut,
|
||||
prepared::{GLWESecretPrepared, GLWESecretPreparedToRef},
|
||||
},
|
||||
};
|
||||
@@ -52,10 +52,7 @@ where
|
||||
|
||||
// Its ok to allocate scratch space here since pk is usually generated only once.
|
||||
let mut scratch: ScratchOwned<BE> = ScratchOwned::alloc(self.glwe_encrypt_sk_tmp_bytes(res));
|
||||
|
||||
let mut tmp: GLWE<Vec<u8>> = GLWE::alloc_from_infos(res);
|
||||
|
||||
tmp.encrypt_zero_sk(self, sk, source_xa, source_xe, scratch.borrow());
|
||||
res.to_mut().encrypt_zero_sk(self, sk, source_xa, source_xe, scratch.borrow());
|
||||
}
|
||||
*res.dist_mut() = *sk.dist();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user