mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
wip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#[cfg(test)]
|
||||
use poulpy_core::layouts::{
|
||||
AutomorphismKeyLayout, Base2K, Degree, Dnum, Dsize, GGSWCiphertextLayout, GLWELayout, GLWEToLWEKeyLayout, Rank,
|
||||
AutomorphismKeyLayout, Base2K, Degree, Dnum, Dsize, GGSWLayout, GLWELayout, GLWEToLWEKeyLayout, Rank,
|
||||
TensorKeyLayout, TorusPrecision,
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ pub(crate) static TEST_GLWE_INFOS: GLWELayout = GLWELayout {
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) static TEST_GGSW_INFOS: GGSWCiphertextLayout = GGSWCiphertextLayout {
|
||||
pub(crate) static TEST_GGSW_INFOS: GGSWLayout = GGSWLayout {
|
||||
n: Degree(TEST_N_GLWE),
|
||||
base2k: Base2K(TEST_BASE2K),
|
||||
k: TorusPrecision(TEST_K_GGSW),
|
||||
|
||||
@@ -4,7 +4,7 @@ use poulpy_backend::FFT64Ref;
|
||||
use poulpy_core::{
|
||||
TakeGGSW, TakeGLWEPlaintext,
|
||||
layouts::{
|
||||
GGSWCiphertextLayout, GLWELayout, GLWESecret, LWEInfos, LWESecret,
|
||||
GGSWLayout, GLWELayout, GLWESecret, LWEInfos, LWESecret,
|
||||
prepared::{GLWESecretPrepared, PrepareAlloc},
|
||||
},
|
||||
};
|
||||
@@ -108,7 +108,7 @@ where
|
||||
BlindRotationKey<Vec<u8>, BRA>: BlindRotationKeyAlloc + BlindRotationKeyEncryptSk<BE>,
|
||||
{
|
||||
let glwe_infos: GLWELayout = TEST_GLWE_INFOS;
|
||||
let ggsw_infos: GGSWCiphertextLayout = TEST_GGSW_INFOS;
|
||||
let ggsw_infos: GGSWLayout = TEST_GGSW_INFOS;
|
||||
|
||||
let n_glwe: usize = glwe_infos.n().into();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use poulpy_hal::{
|
||||
|
||||
use poulpy_core::{
|
||||
Distribution, GLWEOperations, TakeGLWE,
|
||||
layouts::{GGSWInfos, GLWE, GLWEInfos, GLWEToMut, LWE, LWECiphertextToRef, LWEInfos},
|
||||
layouts::{GGSWInfos, GLWE, GLWEInfos, GLWEToMut, LWE, LWEToRef, LWEInfos},
|
||||
};
|
||||
|
||||
use crate::tfhe::blind_rotation::{
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::tfhe::blind_rotation::{
|
||||
};
|
||||
|
||||
use poulpy_core::layouts::{
|
||||
GLWE, GLWELayout, GLWEPlaintext, GLWESecret, LWE, LWECiphertextLayout, LWECiphertextToRef, LWEInfos, LWEPlaintext, LWESecret,
|
||||
GLWE, GLWELayout, GLWEPlaintext, GLWESecret, LWE, LWELayout, LWEToRef, LWEInfos, LWEPlaintext, LWESecret,
|
||||
prepared::{GLWESecretPrepared, PrepareAlloc},
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ where
|
||||
rank: rank.into(),
|
||||
};
|
||||
|
||||
let lwe_infos: LWECiphertextLayout = LWECiphertextLayout {
|
||||
let lwe_infos: LWELayout = LWELayout {
|
||||
n: n_lwe.into(),
|
||||
k: k_lwe.into(),
|
||||
base2k: base2k.into(),
|
||||
|
||||
@@ -16,7 +16,7 @@ use poulpy_hal::{
|
||||
|
||||
use poulpy_core::{
|
||||
GLWEOperations, TakeGGLWE, TakeGLWE,
|
||||
layouts::{Dsize, GGLWECiphertextLayout, GGSWInfos, GLWEInfos, LWEInfos},
|
||||
layouts::{Dsize, GGLWELayout, GGSWInfos, GLWEInfos, LWEInfos},
|
||||
};
|
||||
|
||||
use poulpy_core::glwe_packing;
|
||||
@@ -214,7 +214,7 @@ pub fn circuit_bootstrap_core<DRes, DLwe, DBrk, BRA: BlindRotationAlgo, B>(
|
||||
// TODO: separate GGSW k from output of blind rotation k
|
||||
let (mut res_glwe, scratch_1) = scratch.take_glwe_ct(res);
|
||||
|
||||
let gglwe_infos: GGLWECiphertextLayout = GGLWECiphertextLayout {
|
||||
let gglwe_infos: GGLWELayout = GGLWELayout {
|
||||
n: n.into(),
|
||||
base2k: base2k.into(),
|
||||
k: k.into(),
|
||||
|
||||
@@ -32,7 +32,7 @@ use crate::tfhe::{
|
||||
};
|
||||
|
||||
use poulpy_core::layouts::{
|
||||
AutomorphismKeyLayout, Dsize, GGSWCiphertextLayout, LWECiphertextLayout, TensorKeyLayout, prepared::PrepareAlloc,
|
||||
AutomorphismKeyLayout, Dsize, GGSWLayout, LWELayout, TensorKeyLayout, prepared::PrepareAlloc,
|
||||
};
|
||||
|
||||
use poulpy_core::layouts::{
|
||||
@@ -128,7 +128,7 @@ where
|
||||
let k_ggsw_res: usize = 4 * base2k;
|
||||
let rows_ggsw_res: usize = 2;
|
||||
|
||||
let lwe_infos: LWECiphertextLayout = LWECiphertextLayout {
|
||||
let lwe_infos: LWELayout = LWELayout {
|
||||
n: n_lwe.into(),
|
||||
k: k_lwe_ct.into(),
|
||||
base2k: base2k.into(),
|
||||
@@ -161,7 +161,7 @@ where
|
||||
},
|
||||
};
|
||||
|
||||
let ggsw_infos: GGSWCiphertextLayout = GGSWCiphertextLayout {
|
||||
let ggsw_infos: GGSWLayout = GGSWLayout {
|
||||
n: n_glwe.into(),
|
||||
base2k: base2k.into(),
|
||||
k: k_ggsw_res.into(),
|
||||
@@ -350,7 +350,7 @@ where
|
||||
let k_ggsw_res: usize = 4 * base2k;
|
||||
let rows_ggsw_res: usize = 3;
|
||||
|
||||
let lwe_infos: LWECiphertextLayout = LWECiphertextLayout {
|
||||
let lwe_infos: LWELayout = LWELayout {
|
||||
n: n_lwe.into(),
|
||||
k: k_lwe_ct.into(),
|
||||
base2k: base2k.into(),
|
||||
@@ -383,7 +383,7 @@ where
|
||||
},
|
||||
};
|
||||
|
||||
let ggsw_infos: GGSWCiphertextLayout = GGSWCiphertextLayout {
|
||||
let ggsw_infos: GGSWLayout = GGSWLayout {
|
||||
n: n_glwe.into(),
|
||||
base2k: base2k.into(),
|
||||
k: k_ggsw_res.into(),
|
||||
|
||||
Reference in New Issue
Block a user