arnaucube
arnaucube/poulpyPublic Self-hosted repository
poulpy/poulpy-core/src/external_product/mod.rs
poulpy-core/src/external_product/mod.rsRaw
 1use poulpy_hal::layouts::{Backend, Scratch};
 2
 3use crate::layouts::{GLWECiphertextToMut, GLWECiphertextToRef, prepared::GGSWCiphertextPreparedToRef};
 4
 5mod gglwe_atk;
 6mod gglwe_ksk;
 7mod ggsw_ct;
 8mod glwe_ct;
 9
10pub trait GLWEExternalProduct<BE: Backend> {
11    fn external_product<R, A, D>(&self, res: &mut R, a: &A, ggsw: &D, scratch: &mut Scratch<BE>)
12    where
13        R: GLWECiphertextToMut,
14        A: GLWECiphertextToRef,
15        D: GGSWCiphertextPreparedToRef<BE>;
16}
17
18pub trait GLWEExternalProductInplace<BE: Backend> {
19    fn external_product_inplace<R, D>(&self, res: &mut R, ggsw: &D, scratch: &mut Scratch<BE>)
20    where
21        R: GLWECiphertextToMut,
22        D: GGSWCiphertextPreparedToRef<BE>;
23}