This commit is contained in:
Pro7ech
2025-10-12 21:34:10 +02:00
committed by Jean-Philippe Bossuat
parent f72363cc4b
commit 2b2b994f7d
169 changed files with 8705 additions and 7677 deletions

View File

@@ -8,8 +8,8 @@ use std::marker::PhantomData;
use poulpy_core::{
Distribution,
layouts::{
Base2K, Degree, Dnum, Dsize, GGSWInfos, GLWEInfos, LWEInfos, Rank, TorusPrecision,
prepared::{GGSWCiphertextPrepared, Prepare, PrepareAlloc},
Base2K, Dnum, Dsize, GGSWInfos, GLWEInfos, LWEInfos, Rank, RingDegree, TorusPrecision,
prepared::{GGSWPrepared, Prepare, PrepareAlloc},
},
};
@@ -23,19 +23,19 @@ pub trait BlindRotationKeyPreparedAlloc<B: Backend> {
#[derive(PartialEq, Eq)]
pub struct BlindRotationKeyPrepared<D: Data, BRT: BlindRotationAlgo, B: Backend> {
pub(crate) data: Vec<GGSWCiphertextPrepared<D, B>>,
pub(crate) data: Vec<GGSWPrepared<D, B>>,
pub(crate) dist: Distribution,
pub(crate) x_pow_a: Option<Vec<SvpPPol<Vec<u8>, B>>>,
pub(crate) _phantom: PhantomData<BRT>,
}
impl<D: Data, BRT: BlindRotationAlgo, B: Backend> BlindRotationKeyInfos for BlindRotationKeyPrepared<D, BRT, B> {
fn n_glwe(&self) -> Degree {
fn n_glwe(&self) -> RingDegree {
self.n()
}
fn n_lwe(&self) -> Degree {
Degree(self.data.len() as u32)
fn n_lwe(&self) -> RingDegree {
RingDegree(self.data.len() as u32)
}
}
@@ -48,7 +48,7 @@ impl<D: Data, BRT: BlindRotationAlgo, B: Backend> LWEInfos for BlindRotationKeyP
self.data[0].k()
}
fn n(&self) -> Degree {
fn n(&self) -> RingDegree {
self.data[0].n()
}