This commit is contained in:
Pro7ech
2025-10-12 21:34:10 +02:00
parent f72363cc4b
commit 662e533eac
32 changed files with 1594 additions and 787 deletions

View File

@@ -18,7 +18,7 @@ use crate::{
encryption::SIGMA,
layouts::{
GGLWECiphertextLayout, GGLWESwitchingKey, GLWESecret,
compressed::{Decompress, GGLWESwitchingKeyCompressed},
compressed::{Decompress, GGLWEKeyCompressed},
prepared::{GLWESecretPrepared, PrepareAlloc},
},
};
@@ -173,12 +173,12 @@ where
rank_out: rank_out.into(),
};
let mut ksk_compressed: GGLWESwitchingKeyCompressed<Vec<u8>> = GGLWESwitchingKeyCompressed::alloc(&gglwe_infos);
let mut ksk_compressed: GGLWEKeyCompressed<Vec<u8>> = GGLWEKeyCompressed::alloc(&gglwe_infos);
let mut source_xs: Source = Source::new([0u8; 32]);
let mut source_xe: Source = Source::new([0u8; 32]);
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GGLWESwitchingKeyCompressed::encrypt_sk_scratch_space(
let mut scratch: ScratchOwned<B> = ScratchOwned::alloc(GGLWEKeyCompressed::encrypt_sk_scratch_space(
module,
&gglwe_infos,
));

View File

@@ -363,7 +363,7 @@ where
let sk_prepared: GLWESecretPrepared<Vec<u8>, B> = sk.prepare_alloc(module, scratch.borrow());
let mut pk: GLWEPublicKey<Vec<u8>> = GLWEPublicKey::alloc(&glwe_infos);
pk.generate_from_sk(module, &sk_prepared, &mut source_xa, &mut source_xe);
pk.generate(module, &sk_prepared, &mut source_xa, &mut source_xe);
module.vec_znx_fill_uniform(base2k, &mut pt_want.data, 0, &mut source_xa);