mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
clippy + cleanup
This commit is contained in:
@@ -2,7 +2,7 @@ use std::hint::black_box;
|
|||||||
|
|
||||||
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
|
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
|
||||||
use poulpy_core::{
|
use poulpy_core::{
|
||||||
GGSWNoise, GLWEDecrypt, GLWEEncryptSk, GLWEExternalProduct, LWEEncryptSk, ScratchTakeCore,
|
GLWEDecrypt, GLWEEncryptSk, LWEEncryptSk, ScratchTakeCore,
|
||||||
layouts::{
|
layouts::{
|
||||||
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
||||||
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
||||||
@@ -17,7 +17,7 @@ pub use poulpy_cpu_avx::FFT64Avx as BackendImpl;
|
|||||||
pub use poulpy_cpu_ref::FFT64Ref as BackendImpl;
|
pub use poulpy_cpu_ref::FFT64Ref as BackendImpl;
|
||||||
|
|
||||||
use poulpy_hal::{
|
use poulpy_hal::{
|
||||||
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxRotateInplace},
|
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow},
|
||||||
layouts::{Backend, Module, Scratch, ScratchOwned},
|
layouts::{Backend, Module, Scratch, ScratchOwned},
|
||||||
source::Source,
|
source::Source,
|
||||||
};
|
};
|
||||||
@@ -30,8 +30,7 @@ use poulpy_schemes::bin_fhe::{
|
|||||||
BlindRotationAlgo, BlindRotationKey, BlindRotationKeyFactory, BlindRotationKeyInfos, BlindRotationKeyLayout, CGGI,
|
BlindRotationAlgo, BlindRotationKey, BlindRotationKeyFactory, BlindRotationKeyInfos, BlindRotationKeyLayout, CGGI,
|
||||||
},
|
},
|
||||||
circuit_bootstrapping::{
|
circuit_bootstrapping::{
|
||||||
CircuitBootstrappingKey, CircuitBootstrappingKeyEncryptSk, CircuitBootstrappingKeyLayout,
|
CircuitBootstrappingKey, CircuitBootstrappingKeyEncryptSk, CircuitBootstrappingKeyLayout, CircuitBootstrappingKeyPrepared,
|
||||||
CircuitBootstrappingKeyPrepared, CircuitBootstrappingKeyPreparedFactory, CirtuitBootstrappingExecute,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -58,16 +57,10 @@ where
|
|||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
|
||||||
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
||||||
+ CircuitBootstrappingKeyPreparedFactory<BRA, BE>
|
|
||||||
+ CirtuitBootstrappingExecute<BRA, BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GGSWNoise<BE>
|
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>
|
||||||
@@ -169,7 +162,7 @@ where
|
|||||||
a_enc_prepared,
|
a_enc_prepared,
|
||||||
b_enc_prepared,
|
b_enc_prepared,
|
||||||
bdd_key_prepared,
|
bdd_key_prepared,
|
||||||
glwe_layout: params.glwe_layout.clone(),
|
glwe_layout: params.glwe_layout,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,16 +213,11 @@ fn bench_operation<BE: Backend, BRA: BlindRotationAlgo, F>(
|
|||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
+ LWEEncryptSk<BE>
|
||||||
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
||||||
+ CircuitBootstrappingKeyPreparedFactory<BRA, BE>
|
|
||||||
+ CirtuitBootstrappingExecute<BRA, BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GGSWNoise<BE>
|
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>
|
||||||
@@ -257,16 +245,11 @@ where
|
|||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
+ LWEEncryptSk<BE>
|
||||||
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
||||||
+ CircuitBootstrappingKeyPreparedFactory<BRA, BE>
|
|
||||||
+ CirtuitBootstrappingExecute<BRA, BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GGSWNoise<BE>
|
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>
|
||||||
@@ -286,7 +269,7 @@ where
|
|||||||
const RANK: u32 = 2;
|
const RANK: u32 = 2;
|
||||||
|
|
||||||
let params: Params = Params {
|
let params: Params = Params {
|
||||||
name: String::from(format!("n_glwe={N_GLWE}")),
|
name: format!("n_glwe={N_GLWE}"),
|
||||||
block_size: BINARY_BLOCK_SIZE as usize,
|
block_size: BINARY_BLOCK_SIZE as usize,
|
||||||
glwe_layout: GLWELayout {
|
glwe_layout: GLWELayout {
|
||||||
n: Degree(N_GLWE),
|
n: Degree(N_GLWE),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use std::hint::black_box;
|
|||||||
|
|
||||||
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
|
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
|
||||||
use poulpy_core::{
|
use poulpy_core::{
|
||||||
GGSWNoise, GLWEDecrypt, GLWEEncryptSk, GLWEExternalProduct, LWEEncryptSk, ScratchTakeCore,
|
GLWEDecrypt, GLWEEncryptSk, ScratchTakeCore,
|
||||||
layouts::{
|
layouts::{
|
||||||
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
||||||
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
||||||
@@ -17,22 +17,18 @@ pub use poulpy_cpu_avx::FFT64Avx as BackendImpl;
|
|||||||
pub use poulpy_cpu_ref::FFT64Ref as BackendImpl;
|
pub use poulpy_cpu_ref::FFT64Ref as BackendImpl;
|
||||||
|
|
||||||
use poulpy_hal::{
|
use poulpy_hal::{
|
||||||
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxRotateInplace},
|
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow},
|
||||||
layouts::{Backend, Module, Scratch, ScratchOwned},
|
layouts::{Backend, Module, Scratch, ScratchOwned},
|
||||||
source::Source,
|
source::Source,
|
||||||
};
|
};
|
||||||
use poulpy_schemes::bin_fhe::{
|
use poulpy_schemes::bin_fhe::{
|
||||||
bdd_arithmetic::{
|
bdd_arithmetic::{
|
||||||
BDDKey, BDDKeyEncryptSk, BDDKeyLayout, BDDKeyPrepared, BDDKeyPreparedFactory, ExecuteBDDCircuit2WTo1W, FheUint,
|
BDDKey, BDDKeyEncryptSk, BDDKeyLayout, BDDKeyPrepared, BDDKeyPreparedFactory, FheUint, FheUintPrepare, FheUintPrepared,
|
||||||
FheUintPrepare, FheUintPrepared,
|
|
||||||
},
|
},
|
||||||
blind_rotation::{
|
blind_rotation::{
|
||||||
BlindRotationAlgo, BlindRotationKey, BlindRotationKeyFactory, BlindRotationKeyInfos, BlindRotationKeyLayout, CGGI,
|
BlindRotationAlgo, BlindRotationKey, BlindRotationKeyFactory, BlindRotationKeyInfos, BlindRotationKeyLayout, CGGI,
|
||||||
},
|
},
|
||||||
circuit_bootstrapping::{
|
circuit_bootstrapping::{CircuitBootstrappingKeyEncryptSk, CircuitBootstrappingKeyLayout},
|
||||||
CircuitBootstrappingKeyEncryptSk, CircuitBootstrappingKeyLayout, CircuitBootstrappingKeyPreparedFactory,
|
|
||||||
CirtuitBootstrappingExecute,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn benc_bdd_prepare<BE: Backend, BRA: BlindRotationAlgo>(c: &mut Criterion, label: &str)
|
pub fn benc_bdd_prepare<BE: Backend, BRA: BlindRotationAlgo>(c: &mut Criterion, label: &str)
|
||||||
@@ -40,20 +36,13 @@ where
|
|||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
|
||||||
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
||||||
+ CircuitBootstrappingKeyPreparedFactory<BRA, BE>
|
|
||||||
+ CirtuitBootstrappingExecute<BRA, BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GGSWNoise<BE>
|
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>,
|
||||||
+ ExecuteBDDCircuit2WTo1W<BE>,
|
|
||||||
BlindRotationKey<Vec<u8>, BRA>: BlindRotationKeyFactory<BRA>, // TODO find a way to remove this bound or move it to CBT KEY
|
BlindRotationKey<Vec<u8>, BRA>: BlindRotationKeyFactory<BRA>, // TODO find a way to remove this bound or move it to CBT KEY
|
||||||
ScratchOwned<BE>: ScratchOwnedAlloc<BE> + ScratchOwnedBorrow<BE>,
|
ScratchOwned<BE>: ScratchOwnedAlloc<BE> + ScratchOwnedBorrow<BE>,
|
||||||
Scratch<BE>: ScratchTakeCore<BE>,
|
Scratch<BE>: ScratchTakeCore<BE>,
|
||||||
@@ -75,20 +64,13 @@ where
|
|||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
|
||||||
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
+ CircuitBootstrappingKeyEncryptSk<BRA, BE>
|
||||||
+ CircuitBootstrappingKeyPreparedFactory<BRA, BE>
|
|
||||||
+ CirtuitBootstrappingExecute<BRA, BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GGSWNoise<BE>
|
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>,
|
||||||
+ ExecuteBDDCircuit2WTo1W<BE>,
|
|
||||||
BlindRotationKey<Vec<u8>, BRA>: BlindRotationKeyFactory<BRA>, /* TODO find a way to remove this bound or move it to CBT KEY */
|
BlindRotationKey<Vec<u8>, BRA>: BlindRotationKeyFactory<BRA>, /* TODO find a way to remove this bound or move it to CBT KEY */
|
||||||
ScratchOwned<BE>: ScratchOwnedAlloc<BE> + ScratchOwnedBorrow<BE>,
|
ScratchOwned<BE>: ScratchOwnedAlloc<BE> + ScratchOwnedBorrow<BE>,
|
||||||
Scratch<BE>: ScratchTakeCore<BE>,
|
Scratch<BE>: ScratchTakeCore<BE>,
|
||||||
@@ -157,7 +139,7 @@ where
|
|||||||
const RANK: u32 = 2;
|
const RANK: u32 = 2;
|
||||||
|
|
||||||
let params: Params = Params {
|
let params: Params = Params {
|
||||||
name: String::from(format!("n_glwe={N_GLWE}")),
|
name: format!("n_glwe={N_GLWE}"),
|
||||||
block_size: BINARY_BLOCK_SIZE as usize,
|
block_size: BINARY_BLOCK_SIZE as usize,
|
||||||
glwe_layout: GLWELayout {
|
glwe_layout: GLWELayout {
|
||||||
n: Degree(N_GLWE),
|
n: Degree(N_GLWE),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use poulpy_core::{
|
use poulpy_core::{
|
||||||
GLWEDecrypt, GLWEEncryptSk, GLWEExternalProduct, LWEEncryptSk, ScratchTakeCore,
|
GLWEDecrypt, GLWEEncryptSk, ScratchTakeCore,
|
||||||
layouts::{
|
layouts::{
|
||||||
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
Base2K, Degree, Dnum, Dsize, GGLWEToGGSWKeyLayout, GGSWLayout, GGSWPreparedFactory, GLWEAutomorphismKeyLayout,
|
||||||
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
GLWELayout, GLWESecret, GLWESecretPrepared, GLWESecretPreparedFactory, GLWESwitchingKeyLayout, GLWEToLWEKeyLayout,
|
||||||
@@ -9,7 +9,7 @@ use poulpy_core::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
use poulpy_hal::{
|
use poulpy_hal::{
|
||||||
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxRotateInplace},
|
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow},
|
||||||
layouts::{Backend, Module, Scratch, ScratchOwned},
|
layouts::{Backend, Module, Scratch, ScratchOwned},
|
||||||
source::Source,
|
source::Source,
|
||||||
};
|
};
|
||||||
@@ -41,18 +41,17 @@ use poulpy_cpu_ref::FFT64Ref;
|
|||||||
//
|
//
|
||||||
// - Result Decryption
|
// - Result Decryption
|
||||||
//
|
//
|
||||||
|
// There also is an example use of the GLWE Blind Selection operation,
|
||||||
|
// which can choose between any number of encrypted fheuint inputs
|
||||||
|
|
||||||
fn example_bdd_arithmetic<BE: Backend, BRA: BlindRotationAlgo>()
|
fn example_bdd_arithmetic<BE: Backend, BRA: BlindRotationAlgo>()
|
||||||
where
|
where
|
||||||
Module<BE>: ModuleNew<BE>
|
Module<BE>: ModuleNew<BE>
|
||||||
+ ModuleN
|
+ ModuleN
|
||||||
+ GLWESecretPreparedFactory<BE>
|
+ GLWESecretPreparedFactory<BE>
|
||||||
+ GLWEExternalProduct<BE>
|
|
||||||
+ GLWEDecrypt<BE>
|
+ GLWEDecrypt<BE>
|
||||||
+ LWEEncryptSk<BE>
|
|
||||||
+ GGSWPreparedFactory<BE>
|
+ GGSWPreparedFactory<BE>
|
||||||
+ GLWEEncryptSk<BE>
|
+ GLWEEncryptSk<BE>
|
||||||
+ VecZnxRotateInplace<BE>
|
|
||||||
+ BDDKeyEncryptSk<BRA, BE>
|
+ BDDKeyEncryptSk<BRA, BE>
|
||||||
+ BDDKeyPreparedFactory<BRA, BE>
|
+ BDDKeyPreparedFactory<BRA, BE>
|
||||||
+ FheUintPrepare<BRA, BE>
|
+ FheUintPrepare<BRA, BE>
|
||||||
|
|||||||
@@ -76,8 +76,9 @@ where
|
|||||||
dsize: Dsize(1),
|
dsize: Dsize(1),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used to generate CBT Keys
|
// Used to generate BDD Keys, for the arithmetic operations
|
||||||
let cbt_layout = CircuitBootstrappingKeyLayout {
|
let bdd_layout = BDDKeyLayout {
|
||||||
|
cbt_layout: CircuitBootstrappingKeyLayout {
|
||||||
brk_layout: BlindRotationKeyLayout {
|
brk_layout: BlindRotationKeyLayout {
|
||||||
n_glwe: Degree(N_GLWE),
|
n_glwe: Degree(N_GLWE),
|
||||||
n_lwe: Degree(N_LWE),
|
n_lwe: Degree(N_LWE),
|
||||||
@@ -102,11 +103,7 @@ where
|
|||||||
dsize: Dsize(1),
|
dsize: Dsize(1),
|
||||||
rank: Rank(RANK),
|
rank: Rank(RANK),
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
|
|
||||||
// Used to generate BDD Keys, for the arithmetic operations
|
|
||||||
let bdd_layout = BDDKeyLayout {
|
|
||||||
cbt_layout: cbt_layout,
|
|
||||||
ks_glwe_layout: Some(GLWESwitchingKeyLayout {
|
ks_glwe_layout: Some(GLWESwitchingKeyLayout {
|
||||||
n: Degree(N_GLWE),
|
n: Degree(N_GLWE),
|
||||||
base2k: Base2K(BASE2K),
|
base2k: Base2K(BASE2K),
|
||||||
@@ -212,7 +209,7 @@ where
|
|||||||
|
|
||||||
let mut input_i_enc_prepared: FheUintPrepared<Vec<u8>, u32, BE> =
|
let mut input_i_enc_prepared: FheUintPrepared<Vec<u8>, u32, BE> =
|
||||||
FheUintPrepared::alloc_from_infos(&module, &ggsw_layout);
|
FheUintPrepared::alloc_from_infos(&module, &ggsw_layout);
|
||||||
input_i_enc_prepared.prepare(&module, &input_i, &bdd_key_prepared, scratch.borrow());
|
input_i_enc_prepared.prepare(&module, input_i, &bdd_key_prepared, scratch.borrow());
|
||||||
|
|
||||||
// b = (input_i < max)
|
// b = (input_i < max)
|
||||||
compare_enc.sltu(
|
compare_enc.sltu(
|
||||||
|
|||||||
Reference in New Issue
Block a user