mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
add zero_byte for fhe_uint & fix test for glwe blind selection
This commit is contained in:
@@ -58,7 +58,7 @@ where
|
||||
}
|
||||
|
||||
pub fn sext(x: u32, byte: usize) -> u32 {
|
||||
x | ((x >> (byte << 3)) & 1) * (0xFFFF_FFFF & (0xFFFF_FFFF << (byte << 3)))
|
||||
x | (((x >> (byte << 3)) & 1) * (0xFFFF_FFFF << (byte << 3)))
|
||||
}
|
||||
|
||||
pub fn test_fhe_uint_splice_u8<BRA: BlindRotationAlgo, BE: Backend>(test_context: &TestContext<BRA, BE>)
|
||||
|
||||
@@ -129,7 +129,7 @@ where
|
||||
res.decrypt(module, &mut pt, sk_glwe_prep, scratch.borrow());
|
||||
|
||||
let idx = ((k >> bit_start) & mask) as usize;
|
||||
if idx.is_multiple_of(3) {
|
||||
if !idx.is_multiple_of(3) {
|
||||
assert_eq!(0, pt.decode_coeff_i64(TorusPrecision(base2k.as_u32()), 0));
|
||||
} else {
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user