mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
expose pub fields
This commit is contained in:
@@ -27,4 +27,4 @@ pub use lwe_switching_key::*;
|
|||||||
pub use lwe_to_glwe_key::*;
|
pub use lwe_to_glwe_key::*;
|
||||||
|
|
||||||
pub const SIGMA: f64 = 3.2;
|
pub const SIGMA: f64 = 3.2;
|
||||||
pub(crate) const SIGMA_BOUND: f64 = 6.0 * SIGMA;
|
pub const SIGMA_BOUND: f64 = 6.0 * SIGMA;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ impl GLWEInfos for GLWELayout {
|
|||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone)]
|
#[derive(PartialEq, Eq, Clone)]
|
||||||
pub struct GLWE<D: Data> {
|
pub struct GLWE<D: Data> {
|
||||||
pub(crate) data: VecZnx<D>,
|
pub data: VecZnx<D>,
|
||||||
pub(crate) base2k: Base2K,
|
pub(crate) base2k: Base2K,
|
||||||
pub(crate) k: TorusPrecision,
|
pub(crate) k: TorusPrecision,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
use poulpy_hal::layouts::{Data, DataMut, DataRef, ReaderFrom, VecZnx, WriterTo};
|
use poulpy_hal::layouts::{Data, DataMut, DataRef, ReaderFrom, VecZnx, WriterTo};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
GetDistribution, GetDistributionMut,
|
|
||||||
dist::Distribution,
|
dist::Distribution,
|
||||||
layouts::{Base2K, Degree, GLWE, GLWEInfos, GLWEToMut, GLWEToRef, LWEInfos, Rank, TorusPrecision},
|
layouts::{Base2K, Degree, GLWEInfos, GLWEToMut, GLWEToRef, LWEInfos, Rank, TorusPrecision, GLWE},
|
||||||
|
GetDistribution, GetDistributionMut,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
#[derive(PartialEq, Eq)]
|
||||||
pub struct GLWEPublicKey<D: Data> {
|
pub struct GLWEPublicKey<D: Data> {
|
||||||
pub(crate) key: GLWE<D>,
|
pub key: GLWE<D>,
|
||||||
pub(crate) dist: Distribution,
|
pub(crate) dist: Distribution,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ use poulpy_hal::{
|
|||||||
layouts::{Backend, Data, DataMut, DataRef, Module, VecZnxDft, VecZnxDftToMut, VecZnxDftToRef, ZnxInfos},
|
layouts::{Backend, Data, DataMut, DataRef, Module, VecZnxDft, VecZnxDftToMut, VecZnxDftToRef, ZnxInfos},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::layouts::{Base2K, Degree, GLWE, GLWEInfos, GLWEToRef, GetDegree, LWEInfos, Rank, TorusPrecision};
|
use crate::layouts::{Base2K, Degree, GLWEInfos, GLWEToRef, GetDegree, LWEInfos, Rank, TorusPrecision, GLWE};
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
#[derive(PartialEq, Eq)]
|
||||||
pub struct GLWEPrepared<D: Data, B: Backend> {
|
pub struct GLWEPrepared<D: Data, B: Backend> {
|
||||||
pub(crate) data: VecZnxDft<D, B>,
|
pub data: VecZnxDft<D, B>,
|
||||||
pub(crate) base2k: Base2K,
|
pub(crate) base2k: Base2K,
|
||||||
pub(crate) k: TorusPrecision,
|
pub(crate) k: TorusPrecision,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user