mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
fix cross-base2k vec_znx_normalize wrong early carry
This commit is contained in:
@@ -49,8 +49,6 @@ where
|
||||
|
||||
a_enc.sext(module, j, keys, scratch.borrow());
|
||||
|
||||
// println!("{:08x} -> {:08x} {:08x}", a, sext(a, j), a_enc.decrypt(module, sk, scratch.borrow()));
|
||||
|
||||
assert_eq!(
|
||||
sext(a, ((1 + j as u32) << 3) - 1),
|
||||
a_enc.decrypt(module, sk, scratch.borrow())
|
||||
@@ -70,8 +68,6 @@ where
|
||||
|
||||
a_enc.sext(module, j, keys, scratch.borrow());
|
||||
|
||||
// println!("{:08x} -> {:08x} {:08x}", a, sext(a, j), a_enc.decrypt(module, sk, scratch.borrow()));
|
||||
|
||||
assert_eq!(
|
||||
sext(a, ((1 + j as u32) << 3) - 1),
|
||||
a_enc.decrypt(module, sk, scratch.borrow())
|
||||
|
||||
@@ -76,8 +76,6 @@ where
|
||||
|
||||
let k: u32 = source.next_u32();
|
||||
|
||||
// println!("k: {k}");
|
||||
|
||||
let mut k_enc_prep: FheUintPrepared<Vec<u8>, u32, BE> =
|
||||
FheUintPrepared::<Vec<u8>, u32, BE>::alloc_from_infos(module, &ggsw_k_infos);
|
||||
k_enc_prep.encrypt_sk(
|
||||
|
||||
@@ -328,12 +328,6 @@ pub fn circuit_bootstrap_core<R, L, D, M, BRA: BlindRotationAlgo, BE: Backend>(
|
||||
tmp_glwe.trace(module, 0, &res_glwe, &key.atk, scratch_2);
|
||||
}
|
||||
|
||||
// let sk_glwe: &poulpy_core::layouts::GLWESecret<&[u8]> = &sk_glwe.to_ref();
|
||||
// let sk_glwe_prepared: GLWESecretPrepared<Vec<u8>, BE> = GLWESecretPrepared::alloc(module, sk_glwe.rank());
|
||||
// let mut pt: GLWEPlaintext<Vec<u8>> = GLWEPlaintext::alloc_from_infos(&res_glwe);
|
||||
// res_glwe.decrypt(module, &mut pt, &sk_glwe_prepared, scratch_2);
|
||||
// println!("pt[{i}]: {}", pt);
|
||||
|
||||
if i < dnum {
|
||||
module.glwe_rotate_inplace(-(gap as i64), &mut res_glwe, scratch_2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user