mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
glwe + ggsw keyswitch
This commit is contained in:
@@ -11,7 +11,7 @@ use crate::{
|
||||
};
|
||||
|
||||
impl AutomorphismKey<Vec<u8>> {
|
||||
pub fn keyswitch_inplace_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
pub fn keyswitch_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
where
|
||||
R: GGLWEInfos,
|
||||
A: GGLWEInfos,
|
||||
@@ -44,7 +44,7 @@ impl<DataSelf: DataMut> AutomorphismKey<DataSelf> {
|
||||
}
|
||||
|
||||
impl GLWESwitchingKey<Vec<u8>> {
|
||||
pub fn keyswitch_inplace_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
pub fn keyswitch_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
where
|
||||
R: GGLWEInfos,
|
||||
A: GGLWEInfos,
|
||||
@@ -77,7 +77,7 @@ impl<DataSelf: DataMut> GLWESwitchingKey<DataSelf> {
|
||||
}
|
||||
|
||||
impl GGLWE<Vec<u8>> {
|
||||
pub fn keyswitch_inplace_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
pub fn keyswitch_tmp_bytes<R, A, K, M, BE: Backend>(module: &M, res_infos: &R, a_infos: &A, key_infos: &K) -> usize
|
||||
where
|
||||
R: GGLWEInfos,
|
||||
A: GGLWEInfos,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use poulpy_hal::layouts::{Backend, DataMut, Scratch, VecZnx};
|
||||
use poulpy_hal::layouts::{Backend, DataMut, Module, Scratch, VecZnx};
|
||||
|
||||
use crate::{
|
||||
GGSWExpandRows, ScratchTakeCore,
|
||||
@@ -51,6 +51,8 @@ impl<D: DataMut> GGSW<D> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<BE: Backend> GGSWKeyswitch<BE> for Module<BE> where Self: GLWEKeyswitch<BE> + GGSWExpandRows<BE> {}
|
||||
|
||||
pub trait GGSWKeyswitch<BE: Backend>
|
||||
where
|
||||
Self: GLWEKeyswitch<BE> + GGSWExpandRows<BE>,
|
||||
|
||||
@@ -4,6 +4,6 @@ mod glwe_ct;
|
||||
mod lwe_ct;
|
||||
|
||||
pub use gglwe_ct::*;
|
||||
// pub use gglwe_ct::*;
|
||||
pub use ggsw_ct::*;
|
||||
pub use glwe_ct::*;
|
||||
pub use lwe_ct::*;
|
||||
|
||||
Reference in New Issue
Block a user