From 40accf61797d6a5736c1998d7bf41774ef25b72e Mon Sep 17 00:00:00 2001 From: arnaucube Date: Thu, 8 Jan 2026 11:22:44 +0000 Subject: [PATCH] expose pub fields --- poulpy-core/src/encryption/mod.rs | 2 +- poulpy-core/src/layouts/glwe.rs | 2 +- poulpy-core/src/layouts/glwe_public_key.rs | 6 +++--- poulpy-core/src/layouts/prepared/glwe.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poulpy-core/src/encryption/mod.rs b/poulpy-core/src/encryption/mod.rs index d64757f..a7e8f0b 100644 --- a/poulpy-core/src/encryption/mod.rs +++ b/poulpy-core/src/encryption/mod.rs @@ -27,4 +27,4 @@ pub use lwe_switching_key::*; pub use lwe_to_glwe_key::*; pub const SIGMA: f64 = 3.2; -pub(crate) const SIGMA_BOUND: f64 = 6.0 * SIGMA; +pub const SIGMA_BOUND: f64 = 6.0 * SIGMA; diff --git a/poulpy-core/src/layouts/glwe.rs b/poulpy-core/src/layouts/glwe.rs index def9600..bfb7b00 100644 --- a/poulpy-core/src/layouts/glwe.rs +++ b/poulpy-core/src/layouts/glwe.rs @@ -59,7 +59,7 @@ impl GLWEInfos for GLWELayout { #[derive(PartialEq, Eq, Clone)] pub struct GLWE { - pub(crate) data: VecZnx, + pub data: VecZnx, pub(crate) base2k: Base2K, pub(crate) k: TorusPrecision, } diff --git a/poulpy-core/src/layouts/glwe_public_key.rs b/poulpy-core/src/layouts/glwe_public_key.rs index f9c8c41..43f4e2f 100644 --- a/poulpy-core/src/layouts/glwe_public_key.rs +++ b/poulpy-core/src/layouts/glwe_public_key.rs @@ -1,14 +1,14 @@ use poulpy_hal::layouts::{Data, DataMut, DataRef, ReaderFrom, VecZnx, WriterTo}; use crate::{ - GetDistribution, GetDistributionMut, 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)] pub struct GLWEPublicKey { - pub(crate) key: GLWE, + pub key: GLWE, pub(crate) dist: Distribution, } diff --git a/poulpy-core/src/layouts/prepared/glwe.rs b/poulpy-core/src/layouts/prepared/glwe.rs index cf7e564..a024b24 100644 --- a/poulpy-core/src/layouts/prepared/glwe.rs +++ b/poulpy-core/src/layouts/prepared/glwe.rs @@ -3,11 +3,11 @@ use poulpy_hal::{ 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)] pub struct GLWEPrepared { - pub(crate) data: VecZnxDft, + pub data: VecZnxDft, pub(crate) base2k: Base2K, pub(crate) k: TorusPrecision, }