Add Zn type

This commit is contained in:
Pro7ech
2025-08-21 12:16:53 +02:00
parent ccd94e36cc
commit bf513dc555
129 changed files with 1400 additions and 686 deletions

View File

@@ -15,13 +15,13 @@ use crate::{
};
impl LWESwitchingKey<Vec<u8>> {
pub fn encrypt_sk_scratch_space<B: Backend>(module: &Module<B>, n: usize, basek: usize, k: usize) -> usize
pub fn encrypt_sk_scratch_space<B: Backend>(module: &Module<B>, basek: usize, k: usize) -> usize
where
Module<B>: SvpPPolAllocBytes + VecZnxNormalizeTmpBytes + VecZnxDftAllocBytes + VecZnxNormalizeTmpBytes,
{
GLWESecret::bytes_of(n, 1)
+ GLWESecretPrepared::bytes_of(module, n, 1)
+ GGLWESwitchingKey::encrypt_sk_scratch_space(module, n, basek, k, 1, 1)
GLWESecret::bytes_of(module.n(), 1)
+ GLWESecretPrepared::bytes_of(module, 1)
+ GGLWESwitchingKey::encrypt_sk_scratch_space(module, basek, k, 1, 1)
}
}