mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
Bug fixes
- fixed `encoding.rs/decode_coeff_i64` for the case `k < basek2`
- `glwe/external_product.rs/external_product_scratch_space` did not allocate enough space for [`a_dft`](829b8be610/core/src/glwe/external_product.rs (L83)) when `k_out < k_ggsw`. Fixed by replacing `in_size` with `ggsw_size`.
- `glwe/ops.rs/add` sets `basek` and `k`of `self` GLWECiphertext whic is invalid because the `size` which depends on `inner` data remains unchanged.
- (not a fix) expose `backend` from `core`.
This commit is contained in:
@@ -14,6 +14,7 @@ pub trait GLWEOps: GLWECiphertextToMut + Infos + SetMetaData {
|
||||
assert_eq!(b.n(), module.n());
|
||||
assert_eq!(self.n(), module.n());
|
||||
assert_eq!(a.basek(), b.basek());
|
||||
assert_eq!(self.basek(), a.basek());
|
||||
assert!(self.rank() >= a.rank().max(b.rank()));
|
||||
}
|
||||
|
||||
@@ -46,8 +47,8 @@ pub trait GLWEOps: GLWECiphertextToMut + Infos + SetMetaData {
|
||||
});
|
||||
});
|
||||
|
||||
self.set_basek(a.basek());
|
||||
self.set_k(a.k().max(b.k()));
|
||||
// self.set_basek(a.basek());
|
||||
// self.set_k(a.k().max(b.k()));
|
||||
}
|
||||
|
||||
fn add_inplace<A>(&mut self, module: &Module<FFT64>, a: &A)
|
||||
|
||||
Reference in New Issue
Block a user