wip test glwe encryption

This commit is contained in:
Jean-Philippe Bossuat
2025-10-18 13:12:01 +02:00
parent a84ad06086
commit ca3997a4c9
11 changed files with 82 additions and 110 deletions

View File

@@ -15,7 +15,7 @@ impl GLWE<Vec<u8>> {
pub fn decrypt_tmp_bytes<A, M, BE: Backend>(module: &M, a_infos: &A) -> usize
where
A: GLWEInfos,
M: GLWEDecryption<BE>,
M: GLWEDecrypt<BE>,
{
module.glwe_decrypt_tmp_bytes(a_infos)
}
@@ -26,14 +26,14 @@ impl<DataSelf: DataMut> GLWE<DataSelf> {
where
P: GLWEPlaintextToMut,
S: GLWESecretPreparedToRef<BE>,
M: GLWEDecryption<BE>,
M: GLWEDecrypt<BE>,
Scratch<BE>: ScratchTakeBasic,
{
module.glwe_decrypt(self, pt, sk, scratch);
}
}
pub trait GLWEDecryption<BE: Backend>
pub trait GLWEDecrypt<BE: Backend>
where
Self: Sized
+ ModuleN
@@ -110,7 +110,7 @@ where
}
}
impl<BE: Backend> GLWEDecryption<BE> for Module<BE> where
impl<BE: Backend> GLWEDecrypt<BE> for Module<BE> where
Self: ModuleN
+ VecZnxDftBytesOf
+ VecZnxNormalizeTmpBytes