diff --git a/apps/trivium/benches/kreyvium_shortint.rs b/apps/trivium/benches/kreyvium_shortint.rs index fda65671b6..4ede073b6b 100644 --- a/apps/trivium/benches/kreyvium_shortint.rs +++ b/apps/trivium/benches/kreyvium_shortint.rs @@ -1,6 +1,6 @@ use criterion::Criterion; use tfhe::prelude::*; -use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; +use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; use tfhe::shortint::prelude::*; use tfhe::{generate_keys, ConfigBuilder, FheUint64}; use tfhe_trivium::{KreyviumStreamShortint, TransCiphering}; @@ -12,7 +12,7 @@ pub fn kreyvium_shortint_warmup(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), @@ -63,7 +63,7 @@ pub fn kreyvium_shortint_gen(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), @@ -109,7 +109,7 @@ pub fn kreyvium_shortint_trans(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), diff --git a/apps/trivium/benches/trivium_shortint.rs b/apps/trivium/benches/trivium_shortint.rs index 933431aea6..b49da8462e 100644 --- a/apps/trivium/benches/trivium_shortint.rs +++ b/apps/trivium/benches/trivium_shortint.rs @@ -1,6 +1,6 @@ use criterion::Criterion; use tfhe::prelude::*; -use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; +use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; use tfhe::shortint::prelude::*; use tfhe::{generate_keys, ConfigBuilder, FheUint64}; use tfhe_trivium::{TransCiphering, TriviumStreamShortint}; @@ -12,7 +12,7 @@ pub fn trivium_shortint_warmup(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), @@ -63,7 +63,7 @@ pub fn trivium_shortint_gen(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), @@ -109,7 +109,7 @@ pub fn trivium_shortint_trans(c: &mut Criterion) { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), diff --git a/apps/trivium/src/kreyvium/test.rs b/apps/trivium/src/kreyvium/test.rs index 64ba6e6dfb..24b2e1bee0 100644 --- a/apps/trivium/src/kreyvium/test.rs +++ b/apps/trivium/src/kreyvium/test.rs @@ -1,6 +1,6 @@ use crate::{KreyviumStream, KreyviumStreamByte, KreyviumStreamShortint, TransCiphering}; use tfhe::prelude::*; -use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; +use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; use tfhe::{generate_keys, ConfigBuilder, FheBool, FheUint64, FheUint8}; // Values for these tests come from the github repo renaud1239/Kreyvium, // commit fd6828f68711276c25f55e605935028f5e843f43 @@ -222,7 +222,7 @@ fn kreyvium_test_shortint_long() { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), diff --git a/apps/trivium/src/trivium/test.rs b/apps/trivium/src/trivium/test.rs index a505df4239..0d755571fc 100644 --- a/apps/trivium/src/trivium/test.rs +++ b/apps/trivium/src/trivium/test.rs @@ -1,6 +1,6 @@ use crate::{TransCiphering, TriviumStream, TriviumStreamByte, TriviumStreamShortint}; use tfhe::prelude::*; -use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; +use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; use tfhe::{generate_keys, ConfigBuilder, FheBool, FheUint64, FheUint8}; // Values for these tests come from the github repo cantora/avr-crypto-lib, commit 2a5b018, // file testvectors/trivium-80.80.test-vectors @@ -358,7 +358,7 @@ fn trivium_test_shortint_long() { let underlying_sk: tfhe::shortint::ServerKey = (*hl_server_key.as_ref()).clone().into(); let (client_key, server_key): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ksk = KeySwitchingKey::new( (&client_key, Some(&server_key)), diff --git a/backends/tfhe-cuda-backend/cuda/tests_and_benchmarks/tests/test_classical_pbs.cpp b/backends/tfhe-cuda-backend/cuda/tests_and_benchmarks/tests/test_classical_pbs.cpp index 5a5223d4fe..e272d2f13c 100644 --- a/backends/tfhe-cuda-backend/cuda/tests_and_benchmarks/tests/test_classical_pbs.cpp +++ b/backends/tfhe-cuda-backend/cuda/tests_and_benchmarks/tests/test_classical_pbs.cpp @@ -237,7 +237,7 @@ ::testing::internal::ParamGenerator (ClassicalProgrammableBootstrapTestParams){ 887, 1, 2048, new_t_uniform(46), new_t_uniform(17), 22, 1, 4, 4, 100, 1, 1}, - // PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + // V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 (ClassicalProgrammableBootstrapTestParams){ 977, 1, 8192, new_gaussian_from_std_dev(3.0144389706858286e-07), new_gaussian_from_std_dev(2.168404344971009e-19), 16, 2, 8, 8, 100, diff --git a/tfhe/benches/core_crypto/ks_bench.rs b/tfhe/benches/core_crypto/ks_bench.rs index e874da9275..4f165c7b78 100644 --- a/tfhe/benches/core_crypto/ks_bench.rs +++ b/tfhe/benches/core_crypto/ks_bench.rs @@ -9,8 +9,10 @@ use tfhe::core_crypto::prelude::*; use tfhe::keycache::NamedParam; use tfhe::shortint::parameters::{ COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; #[cfg(feature = "gpu")] use tfhe::shortint::parameters::{ @@ -21,13 +23,13 @@ use tfhe::shortint::parameters::{ }; #[cfg(not(feature = "gpu"))] use tfhe::shortint::parameters::{ - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::prelude::*; use tfhe::shortint::{MultiBitPBSParameters, PBSParameters}; @@ -35,28 +37,28 @@ use tfhe::shortint::{MultiBitPBSParameters, PBSParameters}; #[cfg(not(feature = "gpu"))] const SHORTINT_BENCH_PARAMS: [ClassicPBSParameters; 5] = [ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ]; #[cfg(feature = "gpu")] const SHORTINT_BENCH_PARAMS: [ClassicPBSParameters; 4] = [ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ]; #[cfg(not(feature = "gpu"))] const SHORTINT_MULTI_BIT_BENCH_PARAMS: [MultiBitPBSParameters; 6] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ]; #[cfg(feature = "gpu")] diff --git a/tfhe/benches/core_crypto/pbs_bench.rs b/tfhe/benches/core_crypto/pbs_bench.rs index badf7abe31..406490ffe8 100644 --- a/tfhe/benches/core_crypto/pbs_bench.rs +++ b/tfhe/benches/core_crypto/pbs_bench.rs @@ -17,10 +17,10 @@ const SHORTINT_BENCH_PARAMS_TUNIFORM: [ClassicPBSParameters; 1] = [PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64]; const SHORTINT_BENCH_PARAMS_GAUSSIAN: [ClassicPBSParameters; 4] = [ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ]; const BOOLEAN_BENCH_PARAMS: [(&str, BooleanParameters); 2] = [ @@ -57,17 +57,17 @@ fn throughput_benchmark_parameters_64bits() -> Vec<(String, CryptoParametersReco let parameters = if cfg!(feature = "gpu") { vec![ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ] } else { vec![ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ] }; @@ -102,12 +102,12 @@ fn multi_bit_benchmark_parameters_64bits( ] } else { vec![ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ] }; @@ -832,13 +832,20 @@ mod cuda { use tfhe::core_crypto::prelude::*; use tfhe::keycache::NamedParam; use tfhe::shortint::parameters::{ - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::{ClassicPBSParameters, PBSParameters}; @@ -846,19 +853,19 @@ mod cuda { // TUniform PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // Gaussian - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, ]; fn cuda_benchmark_parameters_64bits() -> Vec<(String, CryptoParametersRecord)> { diff --git a/tfhe/benches/shortint/bench.rs b/tfhe/benches/shortint/bench.rs index 544b479b05..2737d71b38 100644 --- a/tfhe/benches/shortint/bench.rs +++ b/tfhe/benches/shortint/bench.rs @@ -12,43 +12,43 @@ use tfhe::shortint::{Ciphertext, CompressedServerKey, ServerKey}; const SERVER_KEY_BENCH_PARAMS: [ClassicPBSParameters; 5] = [ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ]; const SERVER_KEY_BENCH_PARAMS_EXTENDED: [ClassicPBSParameters; 16] = [ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, ]; const SERVER_KEY_MULTI_BIT_BENCH_PARAMS: [MultiBitPBSParameters; 2] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ]; const SERVER_KEY_MULTI_BIT_BENCH_PARAMS_EXTENDED: [MultiBitPBSParameters; 6] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ]; enum BenchParamsSet { diff --git a/tfhe/benches/shortint/casting.rs b/tfhe/benches/shortint/casting.rs index 5ae0d1c189..5dc56d5722 100644 --- a/tfhe/benches/shortint/casting.rs +++ b/tfhe/benches/shortint/casting.rs @@ -2,7 +2,8 @@ use crate::utilities::{write_to_json, OperatorType}; use criterion::Criterion; use rayon::prelude::*; use tfhe::shortint::parameters::{ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::prelude::*; @@ -11,9 +12,9 @@ pub fn pack_cast_64(c: &mut Criterion) { let mut bench_group = c.benchmark_group(bench_name); let (client_key_1, server_key_1): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let (client_key_2, server_key_2): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); let ks_param = PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS; let ks_param_name = "PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS"; @@ -62,9 +63,9 @@ pub fn pack_cast(c: &mut Criterion) { let mut bench_group = c.benchmark_group(bench_name); let (client_key_1, server_key_1): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let (client_key_2, server_key_2): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); let ks_param = PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS; let ks_param_name = "PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS"; @@ -103,9 +104,9 @@ pub fn cast(c: &mut Criterion) { let mut bench_group = c.benchmark_group(bench_name); let (client_key_1, server_key_1): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let (client_key_2, server_key_2): (ClientKey, ServerKey) = - gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); let ks_param = PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS; let ks_param_name = "PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS"; diff --git a/tfhe/benches/utilities.rs b/tfhe/benches/utilities.rs index 5348010941..9cd33200cd 100644 --- a/tfhe/benches/utilities.rs +++ b/tfhe/benches/utilities.rs @@ -41,7 +41,7 @@ pub mod shortint_utils { #[cfg(feature = "gpu")] use tfhe::shortint::parameters::PARAM_GPU_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_3_KS_PBS; #[cfg(not(feature = "gpu"))] - use tfhe::shortint::parameters::PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + use tfhe::shortint::parameters::V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; use tfhe::shortint::parameters::{ ShortintKeySwitchingParameters, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, }; @@ -63,8 +63,9 @@ pub mod shortint_utils { #[cfg(feature = "gpu")] let params = vec![PARAM_GPU_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_3_KS_PBS.into()]; #[cfg(not(feature = "gpu"))] - let params = - vec![PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into()]; + let params = vec![ + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), + ]; let params_and_bit_sizes = iproduct!(params, env_config.bit_sizes()); Self { diff --git a/tfhe/c_api_tests/test_high_level_custom_integers.c b/tfhe/c_api_tests/test_high_level_custom_integers.c index b420e59257..c6a600f18d 100644 --- a/tfhe/c_api_tests/test_high_level_custom_integers.c +++ b/tfhe/c_api_tests/test_high_level_custom_integers.c @@ -215,7 +215,7 @@ int main(void) { config_builder_default(&builder); config_builder_use_custom_parameters(&builder, - SHORTINT_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64); + SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64); config_builder_build(builder, &config); ClientKey *client_key = NULL; @@ -243,7 +243,7 @@ int main(void) { config_builder_default(&builder); config_builder_use_custom_parameters(&builder, - SHORTINT_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); + SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); config_builder_build(builder, &config); ClientKey *client_key = NULL; diff --git a/tfhe/c_api_tests/test_high_level_integers.c b/tfhe/c_api_tests/test_high_level_integers.c index ebcc47a118..0cc0752e88 100644 --- a/tfhe/c_api_tests/test_high_level_integers.c +++ b/tfhe/c_api_tests/test_high_level_integers.c @@ -647,7 +647,7 @@ int main(void) { assert(ok == 0); // Then use small parameters, those are gaussians as we don't have small TUniform params ok = config_builder_use_custom_parameters( - &builder, SHORTINT_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + &builder, SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); ok = config_builder_build(builder, &config); assert(ok == 0); diff --git a/tfhe/c_api_tests/test_shortint_keygen.c b/tfhe/c_api_tests/test_shortint_keygen.c index ed0299529c..c603c802fd 100644 --- a/tfhe/c_api_tests/test_shortint_keygen.c +++ b/tfhe/c_api_tests/test_shortint_keygen.c @@ -15,7 +15,7 @@ void test_predefined_keygen_w_serde(void) { ShortintCompressedCiphertext *cct = NULL; ShortintCompressedCiphertext *deser_cct = NULL; ShortintCiphertext *decompressed_ct = NULL; - ShortintPBSParameters params = SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + ShortintPBSParameters params = SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; int gen_keys_ok = shortint_gen_keys_with_parameters(params, &cks, &sks); assert(gen_keys_ok == 0); @@ -79,7 +79,7 @@ void test_server_key_trivial_encrypt(void) { ShortintClientKey *cks = NULL; ShortintServerKey *sks = NULL; ShortintCiphertext *ct = NULL; - ShortintPBSParameters params = SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + ShortintPBSParameters params = SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; int gen_keys_ok = shortint_gen_keys_with_parameters(params, &cks, &sks); assert(gen_keys_ok == 0); @@ -219,10 +219,10 @@ void test_compressed_public_keygen(ShortintPBSParameters params) { int main(void) { test_predefined_keygen_w_serde(); test_custom_keygen(); - test_public_keygen(SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); - test_public_keygen(SHORTINT_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); - test_compressed_public_keygen(SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); - test_compressed_public_keygen(SHORTINT_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + test_public_keygen(SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + test_public_keygen(SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + test_compressed_public_keygen(SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + test_compressed_public_keygen(SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); test_server_key_trivial_encrypt(); return EXIT_SUCCESS; } diff --git a/tfhe/c_api_tests/test_shortint_pbs.c b/tfhe/c_api_tests/test_shortint_pbs.c index 154330be79..c960aecf9d 100644 --- a/tfhe/c_api_tests/test_shortint_pbs.c +++ b/tfhe/c_api_tests/test_shortint_pbs.c @@ -41,7 +41,7 @@ void test_shortint_pbs_2_bits_message(void) { ShortintPBSLookupTable *lookup_table = NULL; ShortintClientKey *cks = NULL; ShortintServerKey *sks = NULL; - ShortintPBSParameters params = SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + ShortintPBSParameters params = SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; int gen_keys_ok = shortint_gen_keys_with_parameters(params, &cks, &sks); assert(gen_keys_ok == 0); @@ -115,7 +115,7 @@ void test_shortint_bivariate_pbs_2_bits_message(void) { ShortintBivariatePBSLookupTable *lookup_table = NULL; ShortintClientKey *cks = NULL; ShortintServerKey *sks = NULL; - ShortintPBSParameters params = SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + ShortintPBSParameters params = SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; int gen_keys_ok = shortint_gen_keys_with_parameters(params, &cks, &sks); assert(gen_keys_ok == 0); diff --git a/tfhe/c_api_tests/test_shortint_server_key.c b/tfhe/c_api_tests/test_shortint_server_key.c index b2cf53d76d..9622e9714b 100644 --- a/tfhe/c_api_tests/test_shortint_server_key.c +++ b/tfhe/c_api_tests/test_shortint_server_key.c @@ -541,7 +541,7 @@ void test_server_key(void) { ShortintPBSParameters params = SHORTINT_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; // We don't have TUniform small params, use gaussian instead - ShortintPBSParameters params_small = SHORTINT_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + ShortintPBSParameters params_small = SHORTINT_V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; assert(params.message_modulus == 1 << message_bits); assert(params.carry_modulus == 1 << carry_bits); diff --git a/tfhe/docs/fundamentals/compress.md b/tfhe/docs/fundamentals/compress.md index badde0c0cf..131ebfb28e 100644 --- a/tfhe/docs/fundamentals/compress.md +++ b/tfhe/docs/fundamentals/compress.md @@ -214,7 +214,7 @@ use tfhe::{ fn main() { let config = ConfigBuilder::default() .use_custom_parameters( - tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); diff --git a/tfhe/docs/fundamentals/serialization.md b/tfhe/docs/fundamentals/serialization.md index 2d70db33de..795fe9cf34 100644 --- a/tfhe/docs/fundamentals/serialization.md +++ b/tfhe/docs/fundamentals/serialization.md @@ -55,7 +55,7 @@ Here is a more complete example: use tfhe::conformance::ParameterSetConformant; use tfhe::prelude::*; use tfhe::safe_serialization::{safe_serialize, safe_deserialize_conformant}; -use tfhe::shortint::parameters::{PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64}; +use tfhe::shortint::parameters::{PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64}; use tfhe::conformance::ListSizeConstraint; use tfhe::{ generate_keys, FheUint8, CompactCiphertextList, FheUint8ConformanceParams, @@ -64,7 +64,7 @@ use tfhe::{ fn main() { let params_1 = PARAM_MESSAGE_2_CARRY_2_KS_PBS; - let params_2 = PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_2 = V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let config = ConfigBuilder::with_custom_parameters(params_1).build(); diff --git a/tfhe/docs/guides/js_on_wasm_api.md b/tfhe/docs/guides/js_on_wasm_api.md index 7253866b3e..25a0a226d6 100644 --- a/tfhe/docs/guides/js_on_wasm_api.md +++ b/tfhe/docs/guides/js_on_wasm_api.md @@ -34,7 +34,7 @@ function fhe_uint32_example() { // the error message will be displayed in the console init_panic_hook(); - const block_params = new ShortintParameters(ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); + const block_params = new ShortintParameters(ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); let config = TfheConfigBuilder.default() .build(); @@ -79,7 +79,7 @@ async function example() { await initThreadPool(navigator.hardwareConcurrency); await init_panic_hook(); - const block_params = new ShortintParameters(ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); + const block_params = new ShortintParameters(ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); // .... } ``` diff --git a/tfhe/docs/guides/parallelized_pbs.md b/tfhe/docs/guides/parallelized_pbs.md index 3ae49f3795..a1f8adaf34 100644 --- a/tfhe/docs/guides/parallelized_pbs.md +++ b/tfhe/docs/guides/parallelized_pbs.md @@ -17,7 +17,7 @@ use tfhe::{generate_keys, set_server_key, ConfigBuilder, FheUint32}; fn main() -> Result<(), Box> { let config = ConfigBuilder::default() .use_custom_parameters( - tfhe::shortint::parameters::PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + tfhe::shortint::parameters::V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ) .build(); @@ -50,7 +50,7 @@ use tfhe::{generate_keys, set_server_key, ConfigBuilder, FheUint32}; fn main() -> Result<(), Box> { let config = ConfigBuilder::default() .use_custom_parameters( - tfhe::shortint::parameters::PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.with_deterministic_execution(), + tfhe::shortint::parameters::V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.with_deterministic_execution(), ) .build(); diff --git a/tfhe/docs/guides/public_key.md b/tfhe/docs/guides/public_key.md index b9505b2c02..b0773d1b4b 100644 --- a/tfhe/docs/guides/public_key.md +++ b/tfhe/docs/guides/public_key.md @@ -45,7 +45,7 @@ use tfhe::{ fn main() { let config = ConfigBuilder::default() .use_custom_parameters( - tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); diff --git a/tfhe/examples/sha256.rs b/tfhe/examples/sha256.rs index 2fb908c031..dbc5182758 100644 --- a/tfhe/examples/sha256.rs +++ b/tfhe/examples/sha256.rs @@ -187,10 +187,10 @@ fn main() -> Result<(), std::io::Error> { let config = match args.multibit { None => ConfigBuilder::default(), Some(2) => ConfigBuilder::with_custom_parameters( - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ), Some(3) => ConfigBuilder::with_custom_parameters( - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ), Some(v) => { panic!("Invalid multibit setting {v}"); diff --git a/tfhe/examples/utilities/generates_test_keys.rs b/tfhe/examples/utilities/generates_test_keys.rs index ac4e7511ce..033f65125c 100644 --- a/tfhe/examples/utilities/generates_test_keys.rs +++ b/tfhe/examples/utilities/generates_test_keys.rs @@ -17,27 +17,34 @@ use tfhe::shortint::parameters::key_switching::p_fail_2_minus_64::ks_pbs::PARAM_ use tfhe::shortint::parameters::key_switching::ShortintKeySwitchingParameters; use tfhe::shortint::parameters::multi_bit::gaussian::p_fail_2_minus_64::ks_pbs::{ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::parameters::{ - ClassicPBSParameters, PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + ClassicPBSParameters, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, }; #[cfg(feature = "experimental")] use tfhe::shortint::parameters::{ - WopbsParameters, WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + WopbsParameters, LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, }; use tfhe::shortint::MultiBitPBSParameters; @@ -65,12 +72,12 @@ fn client_server_keys() { let coverage_only: bool = matches.get_flag("coverage_only"); if multi_bit_only { const MULTI_BIT_PARAMS: [MultiBitPBSParameters; 6] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ]; generate_pbs_multi_bit_keys(&MULTI_BIT_PARAMS); @@ -101,13 +108,13 @@ fn client_server_keys() { ShortintKeySwitchingParameters, ); 2] = [ ( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS, ), ( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS, ), ]; @@ -117,8 +124,8 @@ fn client_server_keys() { #[cfg(feature = "experimental")] { const WOPBS_PARAMS: [(ClassicPBSParameters, WopbsParameters); 1] = [( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, )]; generate_wopbs_keys(&WOPBS_PARAMS); } @@ -131,19 +138,19 @@ fn client_server_keys() { // TUniform PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // Gaussian - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ]; generate_pbs_keys(&PBS_KEYS); @@ -151,20 +158,20 @@ fn client_server_keys() { { const WOPBS_PARAMS: [(ClassicPBSParameters, WopbsParameters); 4] = [ ( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, ), ( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, ), ( - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, ), ( - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, ), ]; diff --git a/tfhe/examples/utilities/hlapi_compact_pk_ct_sizes.rs b/tfhe/examples/utilities/hlapi_compact_pk_ct_sizes.rs index b777af33ea..7b3fd28ed0 100644 --- a/tfhe/examples/utilities/hlapi_compact_pk_ct_sizes.rs +++ b/tfhe/examples/utilities/hlapi_compact_pk_ct_sizes.rs @@ -10,8 +10,8 @@ use tfhe::integer::U256; use tfhe::keycache::NamedParam; use tfhe::prelude::*; use tfhe::shortint::parameters::classic::compact_pk::{ - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, }; use tfhe::shortint::PBSParameters; use tfhe::{ @@ -40,7 +40,7 @@ pub fn cpk_and_cctl_sizes(results_file: &Path) { let operator = OperatorType::Atomic; { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) .build(); @@ -98,7 +98,7 @@ pub fn cpk_and_cctl_sizes(results_file: &Path) { } { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) .build(); @@ -157,7 +157,7 @@ pub fn cpk_and_cctl_sizes(results_file: &Path) { // 256 bits { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) .build(); @@ -205,7 +205,7 @@ pub fn cpk_and_cctl_sizes(results_file: &Path) { } { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) .build(); diff --git a/tfhe/examples/utilities/shortint_key_sizes.rs b/tfhe/examples/utilities/shortint_key_sizes.rs index 5ea02c201b..99350b1339 100644 --- a/tfhe/examples/utilities/shortint_key_sizes.rs +++ b/tfhe/examples/utilities/shortint_key_sizes.rs @@ -15,15 +15,17 @@ use tfhe::shortint::parameters::{ PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::{ ClassicPBSParameters, ClientKey, CompactPrivateKey, CompressedCompactPublicKey, @@ -39,16 +41,16 @@ fn write_result(file: &mut File, name: &str, value: usize) { fn client_server_key_sizes(results_file: &Path) { let shortint_params_vec: Vec = vec![ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64.into(), - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.into(), PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64.into(), PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64.into(), PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), diff --git a/tfhe/examples/utilities/wasm_benchmarks_parser.rs b/tfhe/examples/utilities/wasm_benchmarks_parser.rs index fe07cbc164..b8facda274 100644 --- a/tfhe/examples/utilities/wasm_benchmarks_parser.rs +++ b/tfhe/examples/utilities/wasm_benchmarks_parser.rs @@ -10,19 +10,20 @@ use std::io::Write; use std::path::Path; use tfhe::keycache::NamedParam; use tfhe::shortint::keycache::{ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64_NAME, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64_NAME, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64_NAME, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64_NAME, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_NAME, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64_NAME, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64_NAME, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64_NAME, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64_NAME, }; use tfhe::shortint::parameters::classic::compact_pk::{ - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, }; use tfhe::shortint::parameters::classic::tuniform::p_fail_2_minus_64::ks_pbs::PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; use tfhe::shortint::parameters::{ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }; use tfhe::shortint::{ClassicPBSParameters, PBSParameters}; @@ -36,17 +37,17 @@ struct Args { fn params_from_name(name: &str) -> ClassicPBSParameters { match name.to_uppercase().as_str() { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64_NAME => { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64_NAME => { + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64 } - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64_NAME => { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64_NAME => { + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 } - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64_NAME => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64_NAME => { + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64 } - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64_NAME => { - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64_NAME => { + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 } PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_NAME => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 diff --git a/tfhe/js_on_wasm_tests/test-hlapi-signed.js b/tfhe/js_on_wasm_tests/test-hlapi-signed.js index 0b9eeea4b0..224e73af08 100644 --- a/tfhe/js_on_wasm_tests/test-hlapi-signed.js +++ b/tfhe/js_on_wasm_tests/test-hlapi-signed.js @@ -87,7 +87,7 @@ test('hlapi_compressed_public_client_int8_big', (t) => { }); test('hlapi_public_key_encrypt_decrypt_int32_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -111,7 +111,7 @@ test('hlapi_public_key_encrypt_decrypt_int32_small', (t) => { }); test('hlapi_decompress_public_key_then_encrypt_decrypt_int32_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -184,7 +184,7 @@ test('hlapi_client_key_encrypt_decrypt_int128_big', (t) => { }); test('hlapi_client_key_encrypt_decrypt_int128_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -272,7 +272,7 @@ test('hlapi_client_key_encrypt_decrypt_int256_big', (t) => { }); test('hlapi_client_key_encrypt_decrypt_int256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -321,7 +321,7 @@ test('hlapi_client_key_encrypt_decrypt_int256_small', (t) => { }); test('hlapi_decompress_public_key_then_encrypt_decrypt_int256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -348,7 +348,7 @@ test('hlapi_decompress_public_key_then_encrypt_decrypt_int256_small', (t) => { }); test('hlapi_public_key_encrypt_decrypt_int256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -401,7 +401,7 @@ function hlapi_compact_public_key_encrypt_decrypt_int32_single(config) { } test('hlapi_compact_public_key_encrypt_decrypt_int32_big_single', (t) => { - const block_params = new ShortintParameters(ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64); + const block_params = new ShortintParameters(ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) .build(); @@ -410,7 +410,7 @@ test('hlapi_compact_public_key_encrypt_decrypt_int32_big_single', (t) => { }); test('hlapi_compact_public_key_encrypt_decrypt_int32_small_single', (t) => { - const block_params = new ShortintParameters(ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); + const block_params = new ShortintParameters(ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) .build(); diff --git a/tfhe/js_on_wasm_tests/test-hlapi-unsigned.js b/tfhe/js_on_wasm_tests/test-hlapi-unsigned.js index 131d3623b8..f71da7014f 100644 --- a/tfhe/js_on_wasm_tests/test-hlapi-unsigned.js +++ b/tfhe/js_on_wasm_tests/test-hlapi-unsigned.js @@ -81,7 +81,7 @@ test('hlapi_key_gen_big', (t) => { }); test('hlapi_key_gen_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -142,7 +142,7 @@ test('hlapi_compressed_public_client_uint8_big', (t) => { }); test('hlapi_public_key_encrypt_decrypt_uint32_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -166,7 +166,7 @@ test('hlapi_public_key_encrypt_decrypt_uint32_small', (t) => { }); test('hlapi_decompress_public_key_then_encrypt_decrypt_uint32_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -239,7 +239,7 @@ test('hlapi_client_key_encrypt_decrypt_uint128_big', (t) => { }); test('hlapi_client_key_encrypt_decrypt_uint128_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -316,7 +316,7 @@ test('hlapi_client_key_encrypt_decrypt_uint256_big', (t) => { }); test('hlapi_client_key_encrypt_decrypt_uint256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -355,7 +355,7 @@ test('hlapi_client_key_encrypt_decrypt_uint256_small', (t) => { }); test('hlapi_decompress_public_key_then_encrypt_decrypt_uint256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); @@ -381,7 +381,7 @@ test('hlapi_decompress_public_key_then_encrypt_decrypt_uint256_small', (t) => { }); test('hlapi_public_key_encrypt_decrypt_uint256_small', (t) => { - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small) .build(); diff --git a/tfhe/js_on_wasm_tests/test.js b/tfhe/js_on_wasm_tests/test.js index 3d6b5d01c8..6e93cde732 100644 --- a/tfhe/js_on_wasm_tests/test.js +++ b/tfhe/js_on_wasm_tests/test.js @@ -110,7 +110,7 @@ test('shortint_encrypt_decrypt', (t) => { // No equality tests here, as wasm stores pointers which will always differ // Encryption using small keys - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let cks_small = Shortint.new_client_key(params_small); @@ -142,7 +142,7 @@ test('shortint_compressed_encrypt_decrypt', (t) => { // Encryption using small keys // We don't have TUniform small params so use previous gaussian ones. - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let cks_small = Shortint.new_client_key(params_small); @@ -158,7 +158,7 @@ test('shortint_compressed_encrypt_decrypt', (t) => { }); test('shortint_public_encrypt_decrypt', (t) => { - let params_name_2_0 = ShortintParametersName.PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64; + let params_name_2_0 = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64; let params_2_0 = new ShortintParameters(params_name_2_0); let cks = Shortint.new_client_key(params_2_0); let pk = Shortint.new_public_key(cks); @@ -172,7 +172,7 @@ test('shortint_public_encrypt_decrypt', (t) => { assert.deepStrictEqual(decrypted, BigInt(3)); // Small - let params_name_2_2_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_2_2_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_2_2_small = new ShortintParameters(params_name_2_2_small); let cks_small = Shortint.new_client_key(params_2_2_small); @@ -205,7 +205,7 @@ test('shortint_compressed_public_encrypt_decrypt', (t) => { assert.deepStrictEqual(decrypted, BigInt(1)); // Small - let params_name_small = ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + let params_name_small = ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let cks_small = Shortint.new_client_key(params_small); diff --git a/tfhe/src/c_api/shortint/parameters.rs b/tfhe/src/c_api/shortint/parameters.rs index f71bf9155c..7be86247aa 100644 --- a/tfhe/src/c_api/shortint/parameters.rs +++ b/tfhe/src/c_api/shortint/parameters.rs @@ -284,81 +284,81 @@ macro_rules! expose_as_shortint_pbs_parameters( ); expose_as_shortint_pbs_parameters!( - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, // Small params - PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, // CPK - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, // CPK SMALL - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, // TUniform PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, ); diff --git a/tfhe/src/high_level_api/integers/signed/tests.rs b/tfhe/src/high_level_api/integers/signed/tests.rs index b58c1ec38f..bd5bca0a35 100644 --- a/tfhe/src/high_level_api/integers/signed/tests.rs +++ b/tfhe/src/high_level_api/integers/signed/tests.rs @@ -26,7 +26,7 @@ fn test_integer_compressed_small() { let mut rng = thread_rng(); let config = ConfigBuilder::with_custom_parameters( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); @@ -281,7 +281,7 @@ fn test_int64_rotate() { fn test_multi_bit_rotate() { let config = ConfigBuilder::default() .use_custom_parameters( - crate::shortint::parameters::PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ) .build(); fhe_int64_rotate(config); @@ -369,7 +369,7 @@ fn test_int32_div_rem() { fn test_multi_div_rem() { let config = ConfigBuilder::default() .use_custom_parameters( - crate::shortint::parameters::PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ) .build(); fhe_int32_div_rem(config); @@ -533,7 +533,7 @@ fn test_trivial_fhe_int8() { #[test] fn test_trivial_fhe_int256_small() { let config = ConfigBuilder::with_custom_parameters( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, ) .build(); let (client_key, sks) = generate_keys(config); @@ -549,7 +549,7 @@ fn test_trivial_fhe_int256_small() { fn test_compact_public_key_big() { let config = ConfigBuilder::default() .use_custom_parameters( - crate::shortint::parameters::classic::compact_pk::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + crate::shortint::parameters::classic::compact_pk::V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); @@ -569,7 +569,7 @@ fn test_compact_public_key_big() { fn test_compact_public_key_small() { let config = ConfigBuilder::default() .use_custom_parameters( - crate::shortint::parameters::classic::compact_pk::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + crate::shortint::parameters::classic::compact_pk::V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); diff --git a/tfhe/src/high_level_api/integers/unsigned/tests/cpu.rs b/tfhe/src/high_level_api/integers/unsigned/tests/cpu.rs index 9d0a7853bb..d44b959641 100644 --- a/tfhe/src/high_level_api/integers/unsigned/tests/cpu.rs +++ b/tfhe/src/high_level_api/integers/unsigned/tests/cpu.rs @@ -66,7 +66,7 @@ fn test_integer_compressed() { #[test] fn test_integer_compressed_small() { let config = ConfigBuilder::with_custom_parameters( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, ) .build(); let (client_key, _) = generate_keys(config); @@ -111,7 +111,7 @@ fn test_uint32_shift() { #[test] fn test_uint32_shift_multibit() { let config = ConfigBuilder::default() - .use_custom_parameters(PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64) + .use_custom_parameters(V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64) .build(); let (client_key, server_key) = generate_keys(config); @@ -135,7 +135,7 @@ fn test_uint32_rotate() { #[test] fn test_multi_bit_rotate() { let client_key = setup_cpu(Some( - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, )); super::test_case_uint32_rotate(&client_key); } @@ -149,7 +149,7 @@ fn test_uint32_div_rem() { #[test] fn test_multi_div_rem() { let client_key = setup_cpu(Some( - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, )); super::test_case_uint32_div_rem(&client_key); } @@ -157,7 +157,7 @@ fn test_multi_div_rem() { #[test] fn test_small_uint128() { let config = ConfigBuilder::with_custom_parameters( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, ) .build(); @@ -206,7 +206,7 @@ fn test_decompressed_public_key_encrypt() { #[test] fn test_compact_public_key_big() { let config = ConfigBuilder::default() - .use_custom_parameters(PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64) + .use_custom_parameters(V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64) .build(); let (client_key, _) = generate_keys(config); @@ -224,7 +224,7 @@ fn test_compact_public_key_big() { #[test] fn test_compact_public_key_small() { let config = ConfigBuilder::default() - .use_custom_parameters(PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64) + .use_custom_parameters(V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64) .build(); let (client_key, _) = generate_keys(config); diff --git a/tfhe/src/high_level_api/keys/public.rs b/tfhe/src/high_level_api/keys/public.rs index 9233c2b18c..45e9563db6 100644 --- a/tfhe/src/high_level_api/keys/public.rs +++ b/tfhe/src/high_level_api/keys/public.rs @@ -276,7 +276,7 @@ mod test { use crate::conformance::ParameterSetConformant; use crate::shortint::parameters::{ CompactPublicKeyEncryptionParameters, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, }; use crate::{ generate_keys, ClientKey, CompactPublicKey, CompressedCompactPublicKey, ConfigBuilder, @@ -284,7 +284,7 @@ mod test { #[test] fn conformance_compact_public_key() { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) @@ -320,7 +320,7 @@ mod test { #[test] fn conformance_compressed_compact_public_key() { - let params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + let params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; let config = ConfigBuilder::default() .use_custom_parameters(params) diff --git a/tfhe/src/high_level_api/tests/tags_on_entities.rs b/tfhe/src/high_level_api/tests/tags_on_entities.rs index dee88cd3dc..62dfa384c1 100644 --- a/tfhe/src/high_level_api/tests/tags_on_entities.rs +++ b/tfhe/src/high_level_api/tests/tags_on_entities.rs @@ -23,7 +23,7 @@ fn test_tag_propagation_cpu() { )), Some(COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64), Some(( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, V0_11_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, )), ) @@ -144,7 +144,7 @@ fn test_tag_propagation_gpu() { None, Some(COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64), Some(( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, V0_11_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, )), ) diff --git a/tfhe/src/integer/ciphertext/base.rs b/tfhe/src/integer/ciphertext/base.rs index 318fc8e96a..ab00ed6edc 100644 --- a/tfhe/src/integer/ciphertext/base.rs +++ b/tfhe/src/integer/ciphertext/base.rs @@ -68,10 +68,10 @@ impl RadixCiphertext { /// /// ```rust /// use tfhe::integer::{gen_keys_radix, RadixCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // 8 bits - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); /// /// let msg = 124u8; /// let msg2 = 17u8; @@ -170,10 +170,10 @@ impl SignedRadixCiphertext { /// /// ```rust /// use tfhe::integer::{gen_keys_radix, SignedRadixCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // 8 bits - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); /// /// let msg = -35i8; /// let msg2 = 17i8; diff --git a/tfhe/src/integer/ciphertext/boolean_value.rs b/tfhe/src/integer/ciphertext/boolean_value.rs index b915e2c63b..e045866c6b 100644 --- a/tfhe/src/integer/ciphertext/boolean_value.rs +++ b/tfhe/src/integer/ciphertext/boolean_value.rs @@ -24,11 +24,11 @@ use tfhe_versionable::Versionize; /// /// ```rust /// use tfhe::integer::gen_keys_radix; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; -/// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); +/// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let a = 128u8; /// let b = 55u8; @@ -83,11 +83,11 @@ impl BooleanBlock { /// /// ```rust /// use tfhe::integer::{gen_keys_radix, BooleanBlock}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let a = 128u8; /// let ct_a = cks.encrypt(a); @@ -142,10 +142,10 @@ impl BooleanBlock { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // 8 bits - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); /// /// let msg = false; /// let msg2 = true; diff --git a/tfhe/src/integer/ciphertext/compact_list.rs b/tfhe/src/integer/ciphertext/compact_list.rs index 2de5c812fc..b73085b359 100644 --- a/tfhe/src/integer/ciphertext/compact_list.rs +++ b/tfhe/src/integer/ciphertext/compact_list.rs @@ -605,9 +605,9 @@ impl CompactCiphertextList { /// RadixCiphertext, SignedRadixCiphertext, /// }; /// use tfhe::integer::{ClientKey, CompactPublicKey}; - /// use tfhe::shortint::parameters::classic::compact_pk::PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::classic::compact_pk::V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; /// - /// let fhe_params = PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; + /// let fhe_params = V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4usize; /// @@ -1073,8 +1073,14 @@ mod tests { BooleanBlock, ClientKey, CompactPrivateKey, CompactPublicKey, RadixCiphertext, ServerKey, }; use crate::shortint::parameters::classic::tuniform::p_fail_2_minus_64::ks_pbs::PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; - use crate::shortint::parameters::compact_public_key_only::p_fail_2_minus_64::ks_pbs::V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; - use crate::shortint::parameters::key_switching::p_fail_2_minus_64::ks_pbs::V0_11_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; + use crate::shortint::parameters::compact_public_key_only::p_fail_2_minus_64::ks_pbs::{ + V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1, + }; + use crate::shortint::parameters::key_switching::p_fail_2_minus_64::ks_pbs::{ + V0_11_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1, + }; use crate::zk::{CompactPkeCrs, ZkComputeLoad}; use rand::random; @@ -1140,6 +1146,73 @@ mod tests { } } + /// Test a compact list encryption proven with the v1 zk scheme + #[test] + fn test_zkv1_compact_ciphertext_list_encryption_ci_run_filter() { + let pke_params = V0_11_PARAM_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1; + let ksk_params = + V0_11_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1; + + let fhe_params = PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; + + let metadata = [b'i', b'n', b't', b'e', b'g', b'e', b'r']; + + let num_blocks = 4usize; + let modulus = pke_params + .message_modulus + .0 + .checked_pow(num_blocks as u32) + .unwrap(); + + let crs = + CompactPkeCrs::from_shortint_params_legacy_v1(pke_params, LweCiphertextCount(512)) + .unwrap(); + let cks = ClientKey::new(fhe_params); + let sk = ServerKey::new_radix_server_key(&cks); + let compact_private_key = CompactPrivateKey::new(pke_params); + let ksk = KeySwitchingKey::new((&compact_private_key, None), (&cks, &sk), ksk_params); + let pk = CompactPublicKey::new(&compact_private_key); + + let msgs = (0..512) + .map(|_| random::() % modulus) + .collect::>(); + + let proven_ct = CompactCiphertextList::builder(&pk) + .extend_with_num_blocks(msgs.iter().copied(), num_blocks) + .build_with_proof_packed(&crs, &metadata, ZkComputeLoad::Proof) + .unwrap(); + + let expander = proven_ct + .verify_and_expand( + &crs, + &pk, + &metadata, + IntegerCompactCiphertextListExpansionMode::CastAndUnpackIfNecessary(ksk.as_view()), + ) + .unwrap(); + + for (idx, msg) in msgs.iter().copied().enumerate() { + let expanded = expander.get::(idx).unwrap().unwrap(); + let decrypted = cks.decrypt_radix::(&expanded); + assert_eq!(msg, decrypted); + } + + let unverified_expander = proven_ct + .expand_without_verification( + IntegerCompactCiphertextListExpansionMode::CastAndUnpackIfNecessary(ksk.as_view()), + ) + .unwrap(); + + for (idx, msg) in msgs.iter().copied().enumerate() { + let expanded = unverified_expander + .get::(idx) + .unwrap() + .unwrap(); + let decrypted = cks.decrypt_radix::(&expanded); + assert_eq!(msg, decrypted); + } + } + #[test] fn test_several_proven_lists() { let pke_params = V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; diff --git a/tfhe/src/integer/ciphertext/compressed_modulus_switched_ciphertext.rs b/tfhe/src/integer/ciphertext/compressed_modulus_switched_ciphertext.rs index ca791ac3c6..2e3bcf5e5a 100644 --- a/tfhe/src/integer/ciphertext/compressed_modulus_switched_ciphertext.rs +++ b/tfhe/src/integer/ciphertext/compressed_modulus_switched_ciphertext.rs @@ -17,13 +17,15 @@ use crate::shortint::parameters::Degree; /// /// ```rust /// use tfhe::integer::gen_keys_radix; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::shortint::PBSParameters; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; -/// let (cks, sks) = -/// gen_keys_radix::(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), size); +/// let (cks, sks) = gen_keys_radix::( +/// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), +/// size, +/// ); /// /// let clear = 3u8; /// @@ -60,13 +62,15 @@ impl ParameterSetConformant for CompressedModulusSwitchedRadixCiphertext { /// /// ```rust /// use tfhe::integer::gen_keys_radix; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::shortint::PBSParameters; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; -/// let (cks, sks) = -/// gen_keys_radix::(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), size); +/// let (cks, sks) = gen_keys_radix::( +/// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64.into(), +/// size, +/// ); /// /// let clear = -3i8; /// diff --git a/tfhe/src/integer/client_key/crt.rs b/tfhe/src/integer/client_key/crt.rs index ab41f7907e..ba9cf46db2 100644 --- a/tfhe/src/integer/client_key/crt.rs +++ b/tfhe/src/integer/client_key/crt.rs @@ -13,10 +13,10 @@ use tfhe_versionable::Versionize; /// /// ```rust /// use tfhe::integer::CrtClientKey; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// let basis = vec![2, 3, 5]; -/// let cks = CrtClientKey::new(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); +/// let cks = CrtClientKey::new(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let msg = 13_u64; /// diff --git a/tfhe/src/integer/client_key/mod.rs b/tfhe/src/integer/client_key/mod.rs index 855a3df342..79aa436e94 100644 --- a/tfhe/src/integer/client_key/mod.rs +++ b/tfhe/src/integer/client_key/mod.rs @@ -132,12 +132,12 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key, that can encrypt in /// // radix and crt decomposition, where each block of the decomposition /// // have over 2 bits of message modulus. - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// ``` pub fn new

(parameter_set: P) -> Self where @@ -155,12 +155,12 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key, that can encrypt in /// // radix and crt decomposition, where each block of the decomposition /// // have over 2 bits of message modulus. - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let key = cks.into_raw_parts(); /// ``` @@ -174,12 +174,12 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key, that can encrypt in /// // radix and crt decomposition, where each block of the decomposition /// // have over 2 bits of message modulus. - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let key = cks.into_raw_parts(); /// @@ -213,9 +213,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// let num_block = 4; /// /// let msg = 167_u64; @@ -239,9 +239,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// let num_block = 4; /// /// let msg = 167_u64; @@ -314,9 +314,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// let num_block = 4; /// /// let msg = 191_u64; @@ -342,9 +342,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// let num_block = 4; /// /// let msg = 191_u64; @@ -489,9 +489,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 2_u64; /// @@ -510,11 +510,11 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let a = cks.encrypt_bool(false); /// let dec = cks.decrypt_bool(&a); @@ -545,9 +545,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::{BooleanBlock, ClientKey}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let a = cks.encrypt_one_block(1u64); /// let wrapped = BooleanBlock::new_unchecked(a); @@ -564,9 +564,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 13_u64; /// @@ -604,10 +604,10 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 27_u64; /// let basis: Vec = vec![2, 3, 5]; @@ -642,9 +642,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 13_u64; /// @@ -683,9 +683,9 @@ impl ClientKey { /// /// ```rust /// use tfhe::integer::ClientKey; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// - /// let cks = ClientKey::new(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 27_u64; /// let basis: Vec = vec![2, 3, 5]; diff --git a/tfhe/src/integer/client_key/radix.rs b/tfhe/src/integer/client_key/radix.rs index 9d2646ce4d..ac577733e5 100644 --- a/tfhe/src/integer/client_key/radix.rs +++ b/tfhe/src/integer/client_key/radix.rs @@ -22,11 +22,14 @@ use tfhe_versionable::Versionize; /// /// ```rust /// use tfhe::integer::RadixClientKey; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // 2 * 4 = 8 bits of message /// let num_block = 4; -/// let cks = RadixClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_block); +/// let cks = RadixClientKey::new( +/// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, +/// num_block, +/// ); /// /// let msg = 167_u64; /// diff --git a/tfhe/src/integer/gpu/ciphertext/boolean_value.rs b/tfhe/src/integer/gpu/ciphertext/boolean_value.rs index 214a8aa26d..390a8add2e 100644 --- a/tfhe/src/integer/gpu/ciphertext/boolean_value.rs +++ b/tfhe/src/integer/gpu/ciphertext/boolean_value.rs @@ -108,7 +108,7 @@ impl CudaBooleanBlock { /// use tfhe::integer::gpu::ciphertext::CudaUnsignedRadixCiphertext; /// use tfhe::integer::gpu::gen_keys_radix_gpu; /// use tfhe::integer::BooleanBlock; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let gpu_index = 0; /// let mut stream = CudaStreams::new_single_gpu(GpuIndex(gpu_index)); @@ -116,7 +116,7 @@ impl CudaBooleanBlock { /// // Generate the client key and the server key: /// let num_blocks = 1; /// let (cks, sks) = gen_keys_radix_gpu( - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// num_blocks, /// &mut stream, /// ); diff --git a/tfhe/src/integer/gpu/server_key/radix/mod.rs b/tfhe/src/integer/gpu/server_key/radix/mod.rs index 508d0e5aa7..a1eebbbae1 100644 --- a/tfhe/src/integer/gpu/server_key/radix/mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/mod.rs @@ -965,7 +965,7 @@ impl CudaServerKey { /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ /// PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - /// PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, /// }; /// { /// // Generate the client key and the server key: @@ -1005,11 +1005,11 @@ impl CudaServerKey { /// } /// { /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); /// let gpu_index = 0; /// let mut streams = CudaStreams::new_single_gpu(GpuIndex(gpu_index)); /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_gpu(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, &streams); + /// let (cks, sks) = gen_keys_gpu(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, &streams); /// let num_blocks = 2; /// let msg = 3; /// let ct = cks.encrypt_radix(msg, num_blocks); diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs index d2ed604fbb..608a2fea01 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs @@ -42,7 +42,7 @@ macro_rules! create_gpu_parameterized_test{ create_gpu_parameterized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/key_switching_key/test.rs b/tfhe/src/integer/key_switching_key/test.rs index 5f1e6cd372..819d1d1d96 100644 --- a/tfhe/src/integer/key_switching_key/test.rs +++ b/tfhe/src/integer/key_switching_key/test.rs @@ -12,19 +12,23 @@ use crate::shortint::parameters::key_switching::p_fail_2_minus_64::ks_pbs::{ }; use crate::shortint::parameters::{ ClassicPBSParameters, CompactPublicKeyEncryptionParameters, ShortintKeySwitchingParameters, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }; #[test] fn gen_multi_keys_test_rdxinteger_to_rdxinteger_ci_run_filter() { let num_block = 4; - let client_key_1 = RadixClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_block); + let client_key_1 = RadixClientKey::new( + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + num_block, + ); // We generate a set of client/server keys, using the default parameters: let (client_key_2, server_key_2) = KEY_CACHE.get_from_params( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, IntegerKeyKind::Radix, ); let client_key_2 = RadixClientKey::from((client_key_2, num_block)); @@ -60,12 +64,14 @@ fn gen_multi_keys_test_rdxinteger_to_rdxinteger_ci_run_filter() { fn gen_multi_keys_test_crtinteger_to_crtinteger_ci_run_filter() { let basis = vec![2, 3, 5, 7, 11]; - let client_key_1 = - CrtClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, basis.clone()); + let client_key_1 = CrtClientKey::new( + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + basis.clone(), + ); // We generate a set of client/server keys, using the default parameters: let (client_key_2, server_key_2) = KEY_CACHE.get_from_params( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, IntegerKeyKind::CRT, ); let client_key_2 = CrtClientKey::from((client_key_2, basis)); @@ -105,13 +111,13 @@ fn gen_multi_keys_test_crtinteger_to_crtinteger_fail_ci_run_filter() { let basis = vec![2, 3, 5, 7, 11]; let (client_key_1, server_key_1) = KEY_CACHE.get_from_params( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, IntegerKeyKind::CRT, ); let client_key_1 = CrtClientKey::from((client_key_1, basis.clone())); let (client_key_2, server_key_2) = KEY_CACHE.get_from_params( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, IntegerKeyKind::CRT, ); let client_key_2 = CrtClientKey::from((client_key_2, basis)); @@ -138,11 +144,11 @@ fn gen_multi_keys_test_crtinteger_to_crtinteger_fail_ci_run_filter() { #[test] fn gen_multi_keys_test_integer_to_integer_ci_run_filter() { // We generate a set of client keys, using the default parameters: - let client_key_1 = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + let client_key_1 = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); // We generate a set of client/server keys, using the default parameters: let (client_key_2, server_key_2) = KEY_CACHE.get_from_params( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, IntegerKeyKind::Radix, ); diff --git a/tfhe/src/integer/mod.rs b/tfhe/src/integer/mod.rs index 29bf4a3ed2..9fcd4cd57c 100755 --- a/tfhe/src/integer/mod.rs +++ b/tfhe/src/integer/mod.rs @@ -15,7 +15,7 @@ //! //! ```rust //! use tfhe::integer::gen_keys_radix; -//! use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +//! use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; //! //! //4 blocks for the radix decomposition //! let number_of_blocks = 4; @@ -24,7 +24,7 @@ //! //! // Generation of the client/server keys, using the default parameters: //! let (client_key, server_key) = gen_keys_radix( -//! PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, +//! V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, //! number_of_blocks, //! ); //! @@ -185,11 +185,14 @@ where /// /// ```rust /// use tfhe::integer::gen_keys_radix; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // generate the client key and the server key: /// let num_blocks = 4; -/// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); +/// let (cks, sks) = gen_keys_radix( +/// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, +/// num_blocks, +/// ); /// ``` pub fn gen_keys_radix

(parameters_set: P, num_blocks: usize) -> (RadixClientKey, ServerKey) where @@ -208,11 +211,11 @@ where /// /// ```rust /// use tfhe::integer::gen_keys_crt; -/// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; +/// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // generate the client key and the server key: /// let basis = vec![2, 3, 5]; -/// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, basis); +/// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, basis); /// ``` pub fn gen_keys_crt

(parameters_set: P, basis: Vec) -> (CrtClientKey, ServerKey) where diff --git a/tfhe/src/integer/oprf.rs b/tfhe/src/integer/oprf.rs index 1c92229c3b..a24a8b8533 100644 --- a/tfhe/src/integer/oprf.rs +++ b/tfhe/src/integer/oprf.rs @@ -13,13 +13,13 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::Seed; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let ct_res = sks.par_generate_oblivious_pseudo_random_unsigned_integer(Seed(0), size as u64); /// @@ -83,13 +83,13 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::Seed; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let random_bits_count = 3; /// @@ -164,13 +164,13 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::Seed; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let ct_res = sks.par_generate_oblivious_pseudo_random_signed_integer(Seed(0), size as u64); /// @@ -211,7 +211,7 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::Seed; /// /// let size = 4; @@ -219,7 +219,7 @@ impl ServerKey { /// let random_bits_count = 3; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let ct_res = sks.par_generate_oblivious_pseudo_random_signed_integer_bounded( /// Seed(0), @@ -306,8 +306,11 @@ pub(crate) mod test { let num_blocks = 2; use crate::integer::gen_keys_radix; - use crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; - let (ck, sk) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + use crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + let (ck, sk) = gen_keys_radix( + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + num_blocks, + ); let test_uniformity = |distinct_values: u64, f: &(dyn Fn(usize) -> u64 + Sync)| { test_uniformity(sample_count, p_value_limit, distinct_values, f) diff --git a/tfhe/src/integer/public_key/standard.rs b/tfhe/src/integer/public_key/standard.rs index d943134f3a..de67271c6b 100644 --- a/tfhe/src/integer/public_key/standard.rs +++ b/tfhe/src/integer/public_key/standard.rs @@ -121,7 +121,7 @@ mod tests { use crate::shortint::parameters::*; create_parameterized_test!(integer_public_key_decompression_small { - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, }); fn integer_public_key_decompression_small(param: ClassicPBSParameters) { diff --git a/tfhe/src/integer/public_key/tests.rs b/tfhe/src/integer/public_key/tests.rs index 977b88911a..23382e67a3 100644 --- a/tfhe/src/integer/public_key/tests.rs +++ b/tfhe/src/integer/public_key/tests.rs @@ -14,7 +14,7 @@ create_parameterized_test!(big_radix_encrypt_decrypt_128_bits { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, /* PARAM_MESSAGE_3_CARRY_3_KS_PBS, Skipped as the key requires 32GB * PARAM_MESSAGE_4_CARRY_4_KS_PBS, Skipped as the key requires 550GB */ @@ -28,7 +28,7 @@ create_parameterized_test!( COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, /* PARAM_MESSAGE_3_CARRY_3_KS_PBS, Skipped as its slow * PARAM_MESSAGE_4_CARRY_4_KS_PBS, Skipped as its slow */ @@ -42,7 +42,7 @@ create_parameterized_test!( COVERAGE_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, }, no_coverage => { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, } } ); @@ -53,7 +53,7 @@ create_parameterized_test!( COVERAGE_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, }, no_coverage => { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/crt/add_crt.rs b/tfhe/src/integer/server_key/crt/add_crt.rs index c31ffbfd3c..9858aa6d80 100644 --- a/tfhe/src/integer/server_key/crt/add_crt.rs +++ b/tfhe/src/integer/server_key/crt/add_crt.rs @@ -8,12 +8,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; diff --git a/tfhe/src/integer/server_key/crt/mod.rs b/tfhe/src/integer/server_key/crt/mod.rs index 3258e4a745..3a30cac558 100644 --- a/tfhe/src/integer/server_key/crt/mod.rs +++ b/tfhe/src/integer/server_key/crt/mod.rs @@ -30,12 +30,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -69,12 +69,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 28; /// diff --git a/tfhe/src/integer/server_key/crt/mul_crt.rs b/tfhe/src/integer/server_key/crt/mul_crt.rs index 1baac9a7d2..3e11bd2066 100644 --- a/tfhe/src/integer/server_key/crt/mul_crt.rs +++ b/tfhe/src/integer/server_key/crt/mul_crt.rs @@ -8,12 +8,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 29; /// let clear_2 = 23; @@ -66,11 +66,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 29; /// let clear_2 = 29; diff --git a/tfhe/src/integer/server_key/crt/neg_crt.rs b/tfhe/src/integer/server_key/crt/neg_crt.rs index 190e0169de..12d6872d45 100644 --- a/tfhe/src/integer/server_key/crt/neg_crt.rs +++ b/tfhe/src/integer/server_key/crt/neg_crt.rs @@ -12,11 +12,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear = 14_u64; /// @@ -54,11 +54,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear = 14_u64; /// diff --git a/tfhe/src/integer/server_key/crt/scalar_add_crt.rs b/tfhe/src/integer/server_key/crt/scalar_add_crt.rs index fc4c34234a..7dd1afd208 100644 --- a/tfhe/src/integer/server_key/crt/scalar_add_crt.rs +++ b/tfhe/src/integer/server_key/crt/scalar_add_crt.rs @@ -13,12 +13,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -58,11 +58,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -95,12 +95,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -145,12 +145,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -183,12 +183,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; diff --git a/tfhe/src/integer/server_key/crt/scalar_mul_crt.rs b/tfhe/src/integer/server_key/crt/scalar_mul_crt.rs index aa6e947d17..53eb590cb5 100644 --- a/tfhe/src/integer/server_key/crt/scalar_mul_crt.rs +++ b/tfhe/src/integer/server_key/crt/scalar_mul_crt.rs @@ -13,12 +13,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 2; @@ -66,11 +66,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 2; @@ -100,12 +100,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 2; @@ -152,7 +152,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar value shall fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is returned as a new ciphertext. @@ -161,12 +161,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -192,7 +192,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar shall value fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is assigned to the input ciphertext @@ -201,12 +201,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; diff --git a/tfhe/src/integer/server_key/crt/scalar_sub_crt.rs b/tfhe/src/integer/server_key/crt/scalar_sub_crt.rs index c35c220fe8..04d45e469f 100644 --- a/tfhe/src/integer/server_key/crt/scalar_sub_crt.rs +++ b/tfhe/src/integer/server_key/crt/scalar_sub_crt.rs @@ -13,12 +13,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; @@ -52,10 +52,10 @@ impl ServerKey { ///```rust /// use tfhe::integer::gen_keys_crt; /// let basis = vec![2, 3, 5]; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; @@ -90,12 +90,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 8; @@ -126,12 +126,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; @@ -161,12 +161,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; diff --git a/tfhe/src/integer/server_key/crt/sub_crt.rs b/tfhe/src/integer/server_key/crt/sub_crt.rs index 38656bc102..33e0f7b95d 100644 --- a/tfhe/src/integer/server_key/crt/sub_crt.rs +++ b/tfhe/src/integer/server_key/crt/sub_crt.rs @@ -12,12 +12,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -51,12 +51,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -85,12 +85,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -129,12 +129,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; diff --git a/tfhe/src/integer/server_key/crt/tests.rs b/tfhe/src/integer/server_key/crt/tests.rs index e700acad08..1d1ab82b19 100644 --- a/tfhe/src/integer/server_key/crt/tests.rs +++ b/tfhe/src/integer/server_key/crt/tests.rs @@ -34,7 +34,7 @@ const NB_TESTS: usize = 1; const NB_TESTS_SMALLER: usize = 1; #[cfg(not(tarpaulin))] -const PARAM: ClassicPBSParameters = PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64; +const PARAM: ClassicPBSParameters = V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64; #[cfg(tarpaulin)] const PARAM: ClassicPBSParameters = COVERAGE_PARAM_MESSAGE_5_CARRY_1_KS_PBS; diff --git a/tfhe/src/integer/server_key/crt_parallel/add_crt.rs b/tfhe/src/integer/server_key/crt_parallel/add_crt.rs index 5602b257b9..b6b1536d17 100644 --- a/tfhe/src/integer/server_key/crt_parallel/add_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/add_crt.rs @@ -10,12 +10,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -65,12 +65,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 29; /// let clear_2 = 29; diff --git a/tfhe/src/integer/server_key/crt_parallel/mod.rs b/tfhe/src/integer/server_key/crt_parallel/mod.rs index cc078c18ad..f3c00116f0 100644 --- a/tfhe/src/integer/server_key/crt_parallel/mod.rs +++ b/tfhe/src/integer/server_key/crt_parallel/mod.rs @@ -19,12 +19,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -59,12 +59,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 28; /// diff --git a/tfhe/src/integer/server_key/crt_parallel/mul_crt.rs b/tfhe/src/integer/server_key/crt_parallel/mul_crt.rs index 903efea0a4..2c3f1f7fdc 100644 --- a/tfhe/src/integer/server_key/crt_parallel/mul_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/mul_crt.rs @@ -10,12 +10,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 29; /// let clear_2 = 23; @@ -77,11 +77,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 29; /// let clear_2 = 29; diff --git a/tfhe/src/integer/server_key/crt_parallel/neg_crt.rs b/tfhe/src/integer/server_key/crt_parallel/neg_crt.rs index da812198cd..e80e367d46 100644 --- a/tfhe/src/integer/server_key/crt_parallel/neg_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/neg_crt.rs @@ -12,11 +12,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear = 14_u64; /// @@ -52,11 +52,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear = 14_u64; /// diff --git a/tfhe/src/integer/server_key/crt_parallel/scalar_add_crt.rs b/tfhe/src/integer/server_key/crt_parallel/scalar_add_crt.rs index f1e9c2c8d0..53e0b37355 100644 --- a/tfhe/src/integer/server_key/crt_parallel/scalar_add_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/scalar_add_crt.rs @@ -14,12 +14,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -72,12 +72,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -122,12 +122,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -164,12 +164,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; diff --git a/tfhe/src/integer/server_key/crt_parallel/scalar_mul_crt.rs b/tfhe/src/integer/server_key/crt_parallel/scalar_mul_crt.rs index e606abac6c..8cef398adc 100644 --- a/tfhe/src/integer/server_key/crt_parallel/scalar_mul_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/scalar_mul_crt.rs @@ -14,12 +14,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 2; @@ -80,12 +80,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 2; @@ -132,7 +132,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar value shall fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is returned as a new ciphertext. @@ -141,12 +141,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; @@ -174,7 +174,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar shall value fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is assigned to the input ciphertext @@ -183,12 +183,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 14; diff --git a/tfhe/src/integer/server_key/crt_parallel/scalar_sub_crt.rs b/tfhe/src/integer/server_key/crt_parallel/scalar_sub_crt.rs index a642eaac52..09cd5bafa7 100644 --- a/tfhe/src/integer/server_key/crt_parallel/scalar_sub_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/scalar_sub_crt.rs @@ -14,12 +14,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; @@ -66,12 +66,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 8; @@ -104,12 +104,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; @@ -139,12 +139,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 7; diff --git a/tfhe/src/integer/server_key/crt_parallel/sub_crt.rs b/tfhe/src/integer/server_key/crt_parallel/sub_crt.rs index a46c6b0b4e..7468376ec9 100644 --- a/tfhe/src/integer/server_key/crt_parallel/sub_crt.rs +++ b/tfhe/src/integer/server_key/crt_parallel/sub_crt.rs @@ -11,12 +11,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -50,12 +50,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -84,12 +84,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; @@ -127,12 +127,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_crt; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let basis = vec![2, 3, 5]; /// let modulus: u64 = basis.iter().product(); - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); /// /// let clear_1 = 14; /// let clear_2 = 5; diff --git a/tfhe/src/integer/server_key/crt_parallel/tests.rs b/tfhe/src/integer/server_key/crt_parallel/tests.rs index a688b782f0..ba0208f85b 100644 --- a/tfhe/src/integer/server_key/crt_parallel/tests.rs +++ b/tfhe/src/integer/server_key/crt_parallel/tests.rs @@ -14,7 +14,7 @@ const NB_TESTS: usize = 30; const NB_TESTS: usize = 1; #[cfg(not(tarpaulin))] -const PARAM: ClassicPBSParameters = PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64; +const PARAM: ClassicPBSParameters = V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64; #[cfg(tarpaulin)] const PARAM: ClassicPBSParameters = COVERAGE_PARAM_MESSAGE_5_CARRY_1_KS_PBS; diff --git a/tfhe/src/integer/server_key/mod.rs b/tfhe/src/integer/server_key/mod.rs index 31e6380205..d554d85cd6 100644 --- a/tfhe/src/integer/server_key/mod.rs +++ b/tfhe/src/integer/server_key/mod.rs @@ -81,10 +81,10 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::{ClientKey, ServerKey}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key: - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the server key: /// let sks = ServerKey::new_radix_server_key(cks); @@ -134,11 +134,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::{ClientKey, ServerKey}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::shortint::ServerKey as ShortintServerKey; /// /// // Generate the client key: - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the shortint server key: /// let shortint_sks = ShortintServerKey::new(cks.as_ref()); @@ -165,11 +165,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::{ClientKey, ServerKey}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// use tfhe::shortint::ServerKey as ShortintServerKey; /// /// // Generate the client key: - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the shortint server key: /// let shortint_sks = ShortintServerKey::new(cks.as_ref()); @@ -340,7 +340,7 @@ mod test { fn test_compressed_server_key_max_degree() { { let cks = ClientKey::new( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ); // msg_mod = 4, carry_mod = 4, (msg_mod * carry_mod - 1) - (carry_mod - 1) = 12 let expected_radix_max_degree = MaxDegree::new(12); @@ -357,7 +357,7 @@ mod test { { let cks = ClientKey::new( - crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ); // msg_mod = 4, carry_mod = 4, msg_mod * carrymod - 1 = 15 let expected_crt_max_degree = MaxDegree::new(15); diff --git a/tfhe/src/integer/server_key/radix/add.rs b/tfhe/src/integer/server_key/radix/add.rs index a76f9b20c0..0a36a793a2 100644 --- a/tfhe/src/integer/server_key/radix/add.rs +++ b/tfhe/src/integer/server_key/radix/add.rs @@ -16,11 +16,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 10; /// let msg2 = 127; @@ -52,10 +55,13 @@ impl ServerKey { /// The result is assigned to the `ct_left` ciphertext. /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 28; /// let msg2 = 127; @@ -89,11 +95,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 46u64; /// let msg2 = 87u64; @@ -143,11 +152,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 41; /// let msg2 = 101; @@ -183,11 +195,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 41; /// let msg2 = 101; @@ -216,11 +231,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; diff --git a/tfhe/src/integer/server_key/radix/bitwise_op.rs b/tfhe/src/integer/server_key/radix/bitwise_op.rs index 1dd8174a88..5b0a624a7c 100644 --- a/tfhe/src/integer/server_key/radix/bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix/bitwise_op.rs @@ -14,11 +14,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 201u64; /// let msg2 = 1u64; @@ -61,12 +61,12 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 46u64; /// let msg2 = 87u64; @@ -104,12 +104,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -144,12 +144,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -177,12 +177,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14; /// let msg2 = 97; @@ -239,11 +239,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 200; /// let msg2 = 1; @@ -289,12 +289,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -330,12 +330,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -364,12 +364,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14; /// let msg2 = 97; @@ -428,11 +428,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 49; /// let msg2 = 64; @@ -478,12 +478,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -519,12 +519,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 41; /// let msg2 = 101; @@ -553,12 +553,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14; /// let msg2 = 97; @@ -610,11 +610,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 14u8; /// @@ -644,11 +647,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 14u8; /// @@ -678,11 +684,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 14u8; /// @@ -713,11 +722,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = true; /// diff --git a/tfhe/src/integer/server_key/radix/comparison.rs b/tfhe/src/integer/server_key/radix/comparison.rs index 523cf60111..c4f6e770e2 100644 --- a/tfhe/src/integer/server_key/radix/comparison.rs +++ b/tfhe/src/integer/server_key/radix/comparison.rs @@ -15,12 +15,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -145,12 +145,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -181,12 +181,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 97u64; /// let msg2 = 97u64; @@ -217,12 +217,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 237u64; /// let msg2 = 23u64; @@ -253,12 +253,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 237u64; /// let msg2 = 23u64; @@ -288,12 +288,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 237u64; /// let msg2 = 23u64; @@ -323,12 +323,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 237u64; /// let msg2 = 23u64; @@ -357,12 +357,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -410,12 +410,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -444,12 +444,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -478,12 +478,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -512,12 +512,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -546,12 +546,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; @@ -580,12 +580,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; diff --git a/tfhe/src/integer/server_key/radix/mod.rs b/tfhe/src/integer/server_key/radix/mod.rs index bc2f3dc652..4ad4bcf36b 100644 --- a/tfhe/src/integer/server_key/radix/mod.rs +++ b/tfhe/src/integer/server_key/radix/mod.rs @@ -36,12 +36,15 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::{gen_keys_radix, RadixCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let ctxt: RadixCiphertext = sks.create_trivial_zero_radix(num_blocks); /// @@ -110,12 +113,15 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::{gen_keys_radix, RadixCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let ctxt: RadixCiphertext = sks.create_trivial_radix(212u64, num_blocks); /// @@ -143,12 +149,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -162,7 +171,7 @@ impl ServerKey { /// // Decrypt /// let res: u64 = cks.decrypt(&ct1); /// assert_eq!( - /// 7 * (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 + /// 7 * (V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 /// .message_modulus /// .0) /// .pow(added_blocks as u32), @@ -185,12 +194,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -204,7 +216,7 @@ impl ServerKey { /// // Decrypt /// let res: u64 = cks.decrypt(&ct_res); /// assert_eq!( - /// 7 * (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 + /// 7 * (V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 /// .message_modulus /// .0) /// .pow(added_blocks as u32), @@ -228,12 +240,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -264,12 +279,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -300,12 +318,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 119u64; /// @@ -331,12 +352,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 119u64; /// @@ -367,12 +391,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 119u64; /// @@ -401,12 +428,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 119u64; /// @@ -437,12 +467,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = -1i8; /// @@ -492,12 +525,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = -2i8; /// @@ -528,12 +564,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = -2i8; /// @@ -604,12 +643,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 8; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = u16::MAX; /// @@ -678,12 +720,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -719,12 +764,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 10; /// diff --git a/tfhe/src/integer/server_key/radix/mul.rs b/tfhe/src/integer/server_key/radix/mul.rs index f19437e0ce..03fa09605f 100644 --- a/tfhe/src/integer/server_key/radix/mul.rs +++ b/tfhe/src/integer/server_key/radix/mul.rs @@ -14,11 +14,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let clear_1 = 170; /// let clear_2 = 3; @@ -57,11 +57,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let clear_1 = 55; /// let clear_2 = 3; @@ -114,11 +114,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let clear_1 = 170; /// let clear_2 = 3; @@ -188,11 +188,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let clear_1 = 255; /// let clear_2 = 143; @@ -244,11 +244,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let clear_1 = 170; /// let clear_2 = 6; diff --git a/tfhe/src/integer/server_key/radix/neg.rs b/tfhe/src/integer/server_key/radix/neg.rs index 0b01da4c56..e262cc2cd8 100644 --- a/tfhe/src/integer/server_key/radix/neg.rs +++ b/tfhe/src/integer/server_key/radix/neg.rs @@ -62,12 +62,12 @@ impl ServerKey { /// ```rust /// // Encrypt two messages: /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; /// let modulus = 1 << 8; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 159u64; /// @@ -123,11 +123,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 2u64; /// @@ -180,11 +180,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// @@ -222,12 +222,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; /// let modulus = 1 << 8; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1; /// @@ -258,11 +258,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// @@ -295,11 +295,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// diff --git a/tfhe/src/integer/server_key/radix/scalar_add.rs b/tfhe/src/integer/server_key/radix/scalar_add.rs index c470660038..e17f69b001 100644 --- a/tfhe/src/integer/server_key/radix/scalar_add.rs +++ b/tfhe/src/integer/server_key/radix/scalar_add.rs @@ -16,11 +16,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 4; /// let scalar = 40; @@ -70,11 +70,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 2u64; /// let scalar = 40; @@ -122,11 +122,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 4; /// let scalar = 40; @@ -171,11 +171,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 4; /// let scalar = 40; @@ -213,11 +213,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 129; /// let scalar = 40; diff --git a/tfhe/src/integer/server_key/radix/scalar_mul.rs b/tfhe/src/integer/server_key/radix/scalar_mul.rs index e8321aac66..d96ff544b1 100644 --- a/tfhe/src/integer/server_key/radix/scalar_mul.rs +++ b/tfhe/src/integer/server_key/radix/scalar_mul.rs @@ -83,11 +83,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 30; /// let scalar = 3; @@ -123,11 +123,11 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 25u64; /// let scalar1 = 3; @@ -163,11 +163,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 33; /// let scalar = 3; @@ -209,11 +209,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 33; /// let scalar = 3; @@ -241,7 +241,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar value shall fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is returned as a new ciphertext. @@ -250,12 +250,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let modulus = 1 << 8; /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 13; /// let scalar = 2; @@ -284,7 +284,7 @@ impl ServerKey { /// Computes homomorphically a multiplication between a scalar and a ciphertext. /// /// `small` means the scalar shall value fit in a __shortint block__. - /// For example, if the parameters are PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// For example, if the parameters are V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// the scalar should fit in 2 bits. /// /// The result is assigned to the input ciphertext @@ -293,12 +293,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let modulus = 1 << 8; /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 9; /// let scalar = 3; @@ -325,11 +325,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// let power = 2; @@ -362,12 +362,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let modulus = 1 << 8; /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 230; /// let scalar = 376; diff --git a/tfhe/src/integer/server_key/radix/scalar_sub.rs b/tfhe/src/integer/server_key/radix/scalar_sub.rs index ddc47ed8fc..53b0f633dd 100644 --- a/tfhe/src/integer/server_key/radix/scalar_sub.rs +++ b/tfhe/src/integer/server_key/radix/scalar_sub.rs @@ -30,11 +30,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 40; /// let scalar = 3; @@ -127,11 +130,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 40u64; /// let scalar = 2u64; @@ -174,11 +180,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 40; /// let scalar = 4; @@ -210,11 +219,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 232; /// let scalar = 83; @@ -248,11 +260,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 165; /// let scalar = 112; diff --git a/tfhe/src/integer/server_key/radix/shift.rs b/tfhe/src/integer/server_key/radix/shift.rs index 308621066f..e77b2a1337 100644 --- a/tfhe/src/integer/server_key/radix/shift.rs +++ b/tfhe/src/integer/server_key/radix/shift.rs @@ -13,11 +13,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 16; /// let shift = 2; @@ -60,11 +63,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 128u64; /// let shift = 2; @@ -96,11 +102,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 18u64; /// let shift = 4; @@ -200,11 +209,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 21u64; /// let shift = 2; @@ -249,11 +261,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 13u64; /// let shift = 2; diff --git a/tfhe/src/integer/server_key/radix/slice.rs b/tfhe/src/integer/server_key/radix/slice.rs index 00b43e09bd..c04846754c 100644 --- a/tfhe/src/integer/server_key/radix/slice.rs +++ b/tfhe/src/integer/server_key/radix/slice.rs @@ -57,11 +57,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_block = 1; @@ -101,11 +104,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_block = 1; @@ -246,11 +252,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -336,11 +345,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -379,11 +391,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -426,11 +441,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -471,11 +489,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -518,11 +539,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; diff --git a/tfhe/src/integer/server_key/radix/sub.rs b/tfhe/src/integer/server_key/radix/sub.rs index 78c3c4ab10..563c7ef018 100644 --- a/tfhe/src/integer/server_key/radix/sub.rs +++ b/tfhe/src/integer/server_key/radix/sub.rs @@ -16,10 +16,13 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 12; /// let msg_2 = 10; @@ -55,11 +58,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 128; /// let msg_2 = 99; @@ -89,11 +95,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 182u64; /// let msg_2 = 120u64; @@ -159,11 +168,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 1u64; /// @@ -201,12 +213,15 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 41u8; /// let msg2 = 101u8; @@ -235,11 +250,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -284,11 +302,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -330,11 +351,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 1u8; /// let msg_2 = 2u8; diff --git a/tfhe/src/integer/server_key/radix/tests.rs b/tfhe/src/integer/server_key/radix/tests.rs index 26e15e16bc..ede74cb3ba 100644 --- a/tfhe/src/integer/server_key/radix/tests.rs +++ b/tfhe/src/integer/server_key/radix/tests.rs @@ -57,9 +57,9 @@ create_parameterized_test!( no_coverage => { // Skip the 1_1 params for the smart add 128 bits which proved to be the slowest test in our test // suite - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 } } ); @@ -101,11 +101,11 @@ create_parameterized_test!( COVERAGE_PARAM_MESSAGE_2_CARRY_3_KS_PBS, // Test case where carry_modulus > message_modulus }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, // Test case where carry_modulus > message_modulus - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, // Test case where carry_modulus > message_modulus + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 } } ); @@ -126,8 +126,8 @@ create_parameterized_test!(integer_unchecked_min { }, no_coverage => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 } }); @@ -666,7 +666,7 @@ fn integer_smart_scalar_mul_decomposition_overflow() { let mut rng = rand::thread_rng(); - let param = PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + let param = V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; let num_block = (128_f64 / (param.message_modulus.0 as f64).log(2.0)).ceil() as usize; diff --git a/tfhe/src/integer/server_key/radix_parallel/add.rs b/tfhe/src/integer/server_key/radix_parallel/add.rs index 9f838633bc..d9d9b68630 100644 --- a/tfhe/src/integer/server_key/radix_parallel/add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/add.rs @@ -131,11 +131,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -199,11 +202,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -266,11 +272,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = u8::MAX; /// let msg2 = 1; @@ -342,11 +351,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = u8::MAX; /// let msg2 = 1; @@ -1531,12 +1543,12 @@ fn overflow_flag_preparation_lut( mod tests { use super::should_parallel_propagation_be_faster; use crate::integer::gen_keys_radix; - use crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + use crate::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; #[test] fn test_propagate_single_carry_on_empty_input_ci_run_filter() { // Parameters and num blocks do not matter here - let (_, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); + let (_, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 4); sks.propagate_single_carry_parallelized(&mut []); // The most interesting part we test is that the code does not panic diff --git a/tfhe/src/integer/server_key/radix_parallel/bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/bitwise_op.rs index bd221a56c0..721d1bb3b5 100644 --- a/tfhe/src/integer/server_key/radix_parallel/bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/bitwise_op.rs @@ -35,11 +35,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -108,11 +111,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -200,11 +206,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -275,11 +284,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -367,11 +379,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -442,11 +457,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14; /// let msg2 = 97; @@ -518,11 +536,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 14; /// diff --git a/tfhe/src/integer/server_key/radix_parallel/cmux.rs b/tfhe/src/integer/server_key/radix_parallel/cmux.rs index 5c4264eb83..6d97190f83 100644 --- a/tfhe/src/integer/server_key/radix_parallel/cmux.rs +++ b/tfhe/src/integer/server_key/radix_parallel/cmux.rs @@ -54,11 +54,11 @@ where /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::prelude::*; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let a = 128u8; /// let b = 55u8; @@ -121,11 +121,11 @@ impl ServerKeyDefaultCMux<&BooleanBlock, &BooleanBlock> for ServerKey { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::prelude::*; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// for cond in [true, false] { /// for a in [true, false] { @@ -246,11 +246,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let a = 128u8; /// let b = 55u8; diff --git a/tfhe/src/integer/server_key/radix_parallel/mod.rs b/tfhe/src/integer/server_key/radix_parallel/mod.rs index aff7c3d27c..99181e8899 100644 --- a/tfhe/src/integer/server_key/radix_parallel/mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/mod.rs @@ -54,11 +54,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::{gen_keys_radix, IntegerCiphertext}; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 7u64; /// @@ -197,11 +200,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 10u64; /// diff --git a/tfhe/src/integer/server_key/radix_parallel/mul.rs b/tfhe/src/integer/server_key/radix_parallel/mul.rs index 1d5ebf84e3..72a934e1f8 100644 --- a/tfhe/src/integer/server_key/radix_parallel/mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/mul.rs @@ -20,11 +20,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 170; /// let clear_2 = 3; @@ -67,11 +70,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 55; /// let clear_2 = 3; @@ -134,11 +140,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 170; /// let clear_2 = 3; @@ -220,11 +229,14 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 170; /// let clear_2 = 3; @@ -414,11 +426,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 255; /// let clear_2 = 143; @@ -490,11 +505,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 170; /// let clear_2 = 6; @@ -577,11 +595,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 170; /// let clear_2 = 6; @@ -728,11 +749,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = 128u8; /// let clear_2 = 5u8; @@ -798,11 +822,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let clear_1 = -128i8; /// let clear_2 = 5i8; diff --git a/tfhe/src/integer/server_key/radix_parallel/neg.rs b/tfhe/src/integer/server_key/radix_parallel/neg.rs index bd5b296514..4ba323a5a8 100644 --- a/tfhe/src/integer/server_key/radix_parallel/neg.rs +++ b/tfhe/src/integer/server_key/radix_parallel/neg.rs @@ -10,11 +10,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// @@ -56,11 +56,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 1u64; /// diff --git a/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs b/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs index 2c1bbb1c3a..c8a7b45219 100644 --- a/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs +++ b/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs @@ -9,12 +9,15 @@ impl ServerKey { /// ///```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let num_blocks = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg = 0b10110100_u8; /// diff --git a/tfhe/src/integer/server_key/radix_parallel/rotate.rs b/tfhe/src/integer/server_key/radix_parallel/rotate.rs index 21ae5769eb..dc68a2698a 100644 --- a/tfhe/src/integer/server_key/radix_parallel/rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/rotate.rs @@ -72,11 +72,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -234,11 +234,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_add.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_add.rs index d72d034aa0..59a58bccb3 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_add.rs @@ -119,11 +119,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 4; /// let scalar = 40; @@ -157,11 +157,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 129; /// let scalar = 40; @@ -204,11 +204,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 4; /// let scalar = 40; @@ -249,11 +249,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 129; /// let scalar = 40; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_bitwise_op.rs index fa7ca27c18..82cc7fa055 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_bitwise_op.rs @@ -74,11 +74,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14u8; /// let msg2 = 97u8; @@ -107,11 +110,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 123u8; /// let msg2 = 34u8; @@ -199,11 +205,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14u8; /// let msg2 = 97u8; @@ -232,11 +241,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 123u8; /// let msg2 = 34u8; @@ -327,11 +339,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 14u8; /// let msg2 = 97u8; @@ -360,11 +375,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg1 = 123u8; /// let msg2 = 34u8; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_comparison.rs index b558a15f1f..f6eb10e94d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_comparison.rs @@ -370,12 +370,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let size = 4; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg1 = 14u64; /// let msg2 = 97u64; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_mul.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_mul.rs index 52390775f9..b323f9f00e 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_mul.rs @@ -91,12 +91,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let modulus = 1 << 8; /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 230; /// let scalar = 376; @@ -149,12 +149,12 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let modulus = 1 << 8; /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 230; /// let scalar = 376; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_rotate.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_rotate.rs index 3da899d5f9..c75c50f06d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_rotate.rs @@ -20,11 +20,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -61,11 +61,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -110,11 +110,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -148,11 +148,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -197,11 +197,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -244,11 +244,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2; @@ -351,11 +351,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; @@ -392,11 +392,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; @@ -441,11 +441,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; @@ -479,11 +479,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; @@ -528,11 +528,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; @@ -575,11 +575,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128u8; /// let n = 2u32; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_shift.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_shift.rs index 19244b393f..f93af2375e 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_shift.rs @@ -26,11 +26,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128; /// let shift = 2; @@ -69,11 +69,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 18; /// let shift = 4; @@ -374,11 +374,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128; /// let shift = 2; @@ -419,11 +419,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 18; /// let shift = 4; @@ -470,11 +470,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 21; /// let shift = 2; @@ -519,11 +519,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 13; /// let shift = 2; @@ -648,11 +648,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 21; /// let shift = 2; @@ -693,11 +693,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 13; /// let shift = 2; diff --git a/tfhe/src/integer/server_key/radix_parallel/scalar_sub.rs b/tfhe/src/integer/server_key/radix_parallel/scalar_sub.rs index 9ca8759859..871f74c482 100644 --- a/tfhe/src/integer/server_key/radix_parallel/scalar_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/scalar_sub.rs @@ -13,11 +13,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 165; /// let scalar = 112; @@ -70,11 +70,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 165; /// let scalar = 112; diff --git a/tfhe/src/integer/server_key/radix_parallel/shift.rs b/tfhe/src/integer/server_key/radix_parallel/shift.rs index b731ee89ab..deab40126d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/shift.rs @@ -120,11 +120,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 128; /// let shift = 2; @@ -268,11 +268,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg = 21; /// let shift = 2; diff --git a/tfhe/src/integer/server_key/radix_parallel/slice.rs b/tfhe/src/integer/server_key/radix_parallel/slice.rs index d0e99d3141..a9b8630f2c 100644 --- a/tfhe/src/integer/server_key/radix_parallel/slice.rs +++ b/tfhe/src/integer/server_key/radix_parallel/slice.rs @@ -58,11 +58,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -157,11 +160,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -200,11 +206,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -249,11 +258,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -295,11 +307,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; @@ -342,11 +357,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg: u64 = 225; /// let start_bit = 3; diff --git a/tfhe/src/integer/server_key/radix_parallel/sub.rs b/tfhe/src/integer/server_key/radix_parallel/sub.rs index 8cfb6eca33..dd367042f5 100644 --- a/tfhe/src/integer/server_key/radix_parallel/sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/sub.rs @@ -14,11 +14,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -65,11 +65,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -121,11 +121,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -165,11 +165,11 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let size = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, size); /// /// let msg_1 = 120u8; /// let msg_2 = 181u8; @@ -231,11 +231,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = 1u8; /// let msg_2 = 255u8; @@ -720,11 +723,14 @@ impl ServerKey { /// /// ```rust /// use tfhe::integer::gen_keys_radix; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// // We have 4 * 2 = 8 bits of message /// let num_blocks = 4; - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, num_blocks); + /// let (cks, sks) = gen_keys_radix( + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + /// num_blocks, + /// ); /// /// let msg_1 = i8::MIN; /// let msg_2 = 1; diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs index ddc7fa12f5..0735a4ffee 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs @@ -31,12 +31,12 @@ create_parameterized_test!( // Requires 4 bits, so 1_1 parameters are not supported // until they get their own version of the algorithm PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -58,12 +58,12 @@ create_parameterized_test!( // Requires 4 bits, so 1_1 parameters are not supported // until they get their own version of the algorithm PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs index afc677d0a8..9c81cf8c2b 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs @@ -16,13 +16,13 @@ use std::sync::Arc; create_parameterized_test!(integer_signed_unchecked_if_then_else { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_default_if_then_else { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); fn integer_signed_unchecked_if_then_else

(param: P) diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs index 111cbc95fb..d5880d3089 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs @@ -353,22 +353,22 @@ macro_rules! define_signed_comparison_test_functions { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -383,14 +383,14 @@ macro_rules! define_signed_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -398,14 +398,14 @@ macro_rules! define_signed_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -413,7 +413,7 @@ macro_rules! define_signed_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -715,40 +715,40 @@ mod no_coverage { create_parameterized_test!(integer_signed_unchecked_max_parallelized_128_bits); create_parameterized_test!(integer_signed_unchecked_min_parallelized_128_bits); create_parameterized_test!(integer_signed_smart_max_parallelized_128_bits { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_smart_min_parallelized_128_bits { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_max_parallelized_128_bits { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_min_parallelized_128_bits { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); define_signed_comparison_test_functions!(eq, i128); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs index 938c6cbf19..c6daae2e75 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs @@ -23,12 +23,12 @@ create_parameterized_test!( no_coverage => { // Does not support 1_1 PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -41,12 +41,12 @@ create_parameterized_test!( no_coverage => { // Does not support 1_1 PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs index 0cdd7af600..ab8ecf5818 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs @@ -26,12 +26,12 @@ create_parameterized_test!(integer_signed_default_ilog2); create_parameterized_test!(integer_signed_default_checked_ilog2 { // uses comparison so 1_1 parameters are not supported PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 }); fn integer_signed_default_trailing_zeros

(param: P) diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs index 2910ccc3cb..8b09451745 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs @@ -26,12 +26,12 @@ create_parameterized_test!( no_coverage => { // Uses comparisons internally, so no 1_1 PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs index 3727b9adcf..02604e7f22 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs @@ -267,13 +267,13 @@ macro_rules! define_signed_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -281,7 +281,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -289,7 +289,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { // and when using 3_3 to represent 128 we actually have more than 128 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -297,7 +297,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -305,7 +305,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { // and when using 3_3 to represent 128 we actually have more than 128 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -610,52 +610,52 @@ mod no_coverage { } create_parameterized_test!(integer_signed_unchecked_scalar_max_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_unchecked_scalar_min_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_smart_scalar_max_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_smart_scalar_min_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_scalar_max_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_signed_scalar_min_parallelized_i128 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); define_signed_scalar_comparison_test_functions!(eq, i128); @@ -666,12 +666,12 @@ mod no_coverage { define_signed_scalar_comparison_test_functions!(ge, i128); create_parameterized_test!(integer_signed_is_scalar_out_of_bounds { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as the test relies on the ciphertext to encrypt 128bits // but with param 3_3 we actually encrypt more that 128bits - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, }); } diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs index 3fd712ee7f..850619680d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs @@ -32,12 +32,12 @@ create_parameterized_test!(integer_signed_default_overflowing_sub_parallel { }, no_coverage => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); create_parameterized_test!(integer_extensive_trivial_signed_default_overflowing_sub); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs index 562ee309ed..9828c00169 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs @@ -440,12 +440,12 @@ create_parameterized_test!( no_coverage => { // This algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -458,12 +458,12 @@ create_parameterized_test!( no_coverage => { // This algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -477,12 +477,12 @@ create_parameterized_test!( no_coverage => { // This algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -495,12 +495,12 @@ create_parameterized_test!( no_coverage => { // This algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -514,15 +514,15 @@ create_parameterized_test!( COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS, }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, // Test case where carry_modulus > message_modulus - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, // Test case where carry_modulus > message_modulus + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs index 4558ef94f0..b5906913f3 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs @@ -30,12 +30,12 @@ create_parameterized_test!(integer_advanced_overflowing_add_assign_with_carry_at }, no_coverage => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); create_parameterized_test!(integer_advanced_add_assign_with_carry_sequential); @@ -46,12 +46,12 @@ create_parameterized_test!(integer_extensive_trivial_overflowing_advanced_add_as }, no_coverage => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); create_parameterized_test!( diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs index 692e9aaa3e..1a95985621 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs @@ -322,21 +322,21 @@ macro_rules! define_comparison_test_functions { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -351,14 +351,14 @@ macro_rules! define_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -366,14 +366,14 @@ macro_rules! define_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -381,7 +381,7 @@ macro_rules! define_comparison_test_functions { // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -663,28 +663,28 @@ mod no_coverage { create_parameterized_test!(integer_unchecked_min_parallelized_u256); create_parameterized_test!(integer_unchecked_max_parallelized_u256); create_parameterized_test!(integer_smart_min_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_smart_max_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_min_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_max_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); define_comparison_test_functions!(eq, U256); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs index 35f3810a92..55395d5781 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs @@ -21,12 +21,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -40,12 +40,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -59,12 +59,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -78,12 +78,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -97,12 +97,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); @@ -116,12 +116,12 @@ create_parameterized_test!( // Due to the use of comparison, // this algorithm requires 3 bits PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, } } ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs index e5ec417295..0092276855 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs @@ -20,12 +20,12 @@ create_parameterized_test!(integer_default_ilog2); create_parameterized_test!(integer_default_checked_ilog2 { // This uses comparisons, so require more than 1 bit PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 }); fn integer_default_trailing_zeros

(param: P) diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs index a02b8ff516..e608a697e7 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs @@ -245,13 +245,13 @@ macro_rules! define_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -259,14 +259,14 @@ macro_rules! define_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as smart test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -274,14 +274,14 @@ macro_rules! define_scalar_comparison_test_functions { create_parameterized_test!([] { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as default test might overflow values // and when using 3_3 to represent 256 we actually have more than 256 bits // of message so the overflow behaviour is not the same, leading to false negatives - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); @@ -713,41 +713,41 @@ mod no_coverage { } create_parameterized_test!(integer_unchecked_scalar_min_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_unchecked_scalar_max_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_smart_scalar_min_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_smart_scalar_max_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_scalar_min_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_scalar_max_parallelized_u256 { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); define_scalar_comparison_test_functions!(eq, U256); @@ -758,10 +758,10 @@ mod no_coverage { define_scalar_comparison_test_functions!(ge, U256); create_parameterized_test!(integer_unchecked_scalar_comparisons_edge { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_is_scalar_out_of_bounds { @@ -769,14 +769,14 @@ mod no_coverage { // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as the test relies on the ciphertext to encrypt 128bits // but with param 3_3 we actually encrypt more that 128bits - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); create_parameterized_test!(integer_comparisons_for_empty_blocks { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, }); } diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs index 63efdd0ac0..d440389206 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs @@ -15,7 +15,7 @@ create_parameterized_test!( COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, } } diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs index d61306a745..6c11ca7cfd 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs @@ -30,12 +30,12 @@ create_parameterized_test!(integer_advanced_sub_assign_with_borrow_at_least_4_bi }, no_coverage => { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); create_parameterized_test!(integer_advanced_sub_assign_with_borrow_sequential); diff --git a/tfhe/src/integer/tests.rs b/tfhe/src/integer/tests.rs index e11e7a6330..bed121a917 100644 --- a/tfhe/src/integer/tests.rs +++ b/tfhe/src/integer/tests.rs @@ -23,16 +23,16 @@ macro_rules! create_parameterized_test { COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); }; @@ -65,10 +65,10 @@ macro_rules! create_parameterized_test_classical_params { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }, no_coverage => { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 } }); }; diff --git a/tfhe/src/integer/wopbs/mod.rs b/tfhe/src/integer/wopbs/mod.rs index b701d05c64..2156874bdc 100644 --- a/tfhe/src/integer/wopbs/mod.rs +++ b/tfhe/src/integer/wopbs/mod.rs @@ -218,12 +218,12 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, 1); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, 1); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS); /// ``` pub fn new_wopbs_key>( cks: &IntegerClientKey, @@ -270,13 +270,13 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let nb_block = 3; /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut moduli = 1_u64; /// for _ in 0..nb_block { /// moduli *= cks.parameters().message_modulus().0; @@ -449,12 +449,12 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::WopbsKey; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// /// let basis: Vec = vec![9, 11]; /// let msg_space: u64 = basis.iter().copied().product(); /// - /// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// let param = LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// //Generate the client key and the server key: /// let (cks, sks) = gen_keys_crt(param, basis); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); @@ -478,15 +478,15 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let nb_block = 3; /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); /// /// // Generate wopbs_v0 key - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut moduli = 1_u64; /// for _ in 0..nb_block { /// moduli *= cks.parameters().message_modulus().0; @@ -518,15 +518,15 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let nb_block = 3; /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); /// /// //Generate wopbs_v0 key /// - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut moduli = 1_u64; /// for _ in 0..nb_block { /// moduli *= cks.parameters().message_modulus().0; @@ -590,14 +590,14 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::WopbsKey; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let nb_block = 3; /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); /// //Generate wopbs_v0 key - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut moduli = 1_u64; /// for _ in 0..nb_block { /// moduli *= cks.parameters().message_modulus().0; @@ -657,12 +657,12 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::WopbsKey; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// /// let basis: Vec = vec![9, 11]; /// let msg_space: u64 = basis.iter().copied().product(); /// - /// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// let param = LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// //Generate the client key and the server key: /// let (cks, sks) = gen_keys_crt(param, basis); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); @@ -717,15 +717,15 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// let basis: Vec = vec![5, 7]; /// let msg_space: u64 = basis.iter().copied().product(); /// /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); /// /// let clear = 42 % msg_space; /// let ct = cks.encrypt(clear); @@ -784,15 +784,15 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_radix; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64; /// /// let nb_block = 3; /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); + /// let (cks, sks) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, nb_block); /// /// //Generate wopbs_v0 key /// - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut moduli = 1_u64; /// for _ in 0..nb_block { /// moduli *= cks.parameters().message_modulus().0; @@ -882,14 +882,14 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::*; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64; /// /// let basis: Vec = vec![5, 7]; /// let msg_space: u64 = basis.iter().copied().product(); /// //Generate the client key and the server key: - /// let (cks, sks) = gen_keys_crt(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); + /// let (cks, sks) = gen_keys_crt(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, basis); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); /// /// let clear1 = 42 % msg_space; // Encrypt the integers /// let clear2 = 24 % msg_space; // Encrypt the integers @@ -969,12 +969,12 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::WopbsKey; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// /// let basis: Vec = vec![9, 11]; /// let msg_space: u64 = basis.iter().copied().product(); /// - /// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// let param = LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// //Generate the client key and the server key: /// let (cks, sks) = gen_keys_crt(param, basis); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); @@ -1040,12 +1040,12 @@ mod experimental { /// ```rust /// use tfhe::integer::gen_keys_crt; /// use tfhe::integer::wopbs::WopbsKey; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// /// let basis: Vec = vec![9, 11]; /// let msg_space: u64 = basis.iter().copied().product(); /// - /// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; + /// let param = LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS; /// //Generate the client key and the server key: /// let (cks, sks) = gen_keys_crt(param, basis); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); diff --git a/tfhe/src/integer/wopbs/test.rs b/tfhe/src/integer/wopbs/test.rs index 4a864def72..4c6d175064 100644 --- a/tfhe/src/integer/wopbs/test.rs +++ b/tfhe/src/integer/wopbs/test.rs @@ -38,11 +38,11 @@ macro_rules! create_parameterized_test{ ( ($name:ident)=> { create_parameterized_test!($name { - (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), + (V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), #[cfg(not(tarpaulin))] - (PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS), + (V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS), #[cfg(not(tarpaulin))] - (PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS) + (V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS) }); }; } @@ -268,8 +268,9 @@ pub fn test_wopbs_non_reg_trivial_0() { use crate::integer::{gen_keys_radix, RadixCiphertext, RadixClientKey, ServerKey}; fn generate_keys() -> (RadixClientKey, ServerKey, WopbsKey) { - let (ck, sk) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 16); - let wopbs_key = WopbsKey::new_wopbs_key(&ck, &sk, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + let (ck, sk) = gen_keys_radix(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, 16); + let wopbs_key = + WopbsKey::new_wopbs_key(&ck, &sk, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); (ck, sk, wopbs_key) } diff --git a/tfhe/src/js_on_wasm_api/shortint.rs b/tfhe/src/js_on_wasm_api/shortint.rs index 1ca95448f4..3436c6d6f7 100644 --- a/tfhe/src/js_on_wasm_api/shortint.rs +++ b/tfhe/src/js_on_wasm_api/shortint.rs @@ -307,80 +307,80 @@ macro_rules! expose_predefined_parameters { } expose_predefined_parameters! { - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, // Small params - PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, // CPK - PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, // CPK SMALL - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, // TUniform PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, } diff --git a/tfhe/src/safe_serialization.rs b/tfhe/src/safe_serialization.rs index 0fe1ca9a07..e29ce2f696 100644 --- a/tfhe/src/safe_serialization.rs +++ b/tfhe/src/safe_serialization.rs @@ -496,7 +496,8 @@ pub fn safe_deserialize_conformant< mod test_shortint { use crate::safe_serialization::{DeserializationConfig, SerializationConfig}; use crate::shortint::parameters::{ - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use crate::shortint::{gen_keys, Ciphertext}; @@ -520,7 +521,7 @@ mod test_shortint { assert!(DeserializationConfig::new(1 << 20) .deserialize_from::( buffer.as_slice(), - &PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.to_shortint_conformance_param() + &V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.to_shortint_conformance_param() ) .is_err()); @@ -555,7 +556,7 @@ mod test_shortint { assert!(DeserializationConfig::new(1 << 20,) .deserialize_from::( buffer.as_slice(), - &PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.to_shortint_conformance_param() + &V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64.to_shortint_conformance_param() ) .is_err()); @@ -634,7 +635,8 @@ mod test_integer { use crate::prelude::*; use crate::safe_serialization::{DeserializationConfig, SerializationConfig}; use crate::shortint::parameters::{ - PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use crate::{ set_server_key, CompactCiphertextList, CompactCiphertextListConformanceParams, @@ -673,7 +675,7 @@ mod test_integer { for param_set in [ CompactCiphertextListConformanceParams { - shortint_params: PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + shortint_params: V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 .to_shortint_conformance_param(), num_elements_constraint: ListSizeConstraint::exact_size(3), }, @@ -756,7 +758,7 @@ mod test_integer { for param_set in [ CompactCiphertextListConformanceParams { - shortint_params: PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + shortint_params: V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 .to_shortint_conformance_param(), num_elements_constraint: ListSizeConstraint::exact_size(3), }, diff --git a/tfhe/src/shortint/client_key/mod.rs b/tfhe/src/shortint/client_key/mod.rs index b6efb2cbfa..26d9aca041 100644 --- a/tfhe/src/shortint/client_key/mod.rs +++ b/tfhe/src/shortint/client_key/mod.rs @@ -466,7 +466,7 @@ impl ClientKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::ClientKey; /// @@ -482,7 +482,7 @@ impl ClientKey { /// let dec = cks.decrypt_message_and_carry(&ct); /// assert_eq!(msg, dec); /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encryption of one message: /// let ct = cks.encrypt(msg); @@ -512,7 +512,7 @@ impl ClientKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::ClientKey; /// @@ -528,7 +528,7 @@ impl ClientKey { /// let dec = cks.decrypt(&ct); /// assert_eq!(msg, dec); /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encryption of one message: /// let ct = cks.encrypt(msg); @@ -609,12 +609,13 @@ impl ClientKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::ClientKey; /// /// // Generate the client key - /// let cks = ClientKey::new(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 3; /// @@ -625,7 +626,7 @@ impl ClientKey { /// let dec = cks.decrypt_message_and_carry_without_padding(&ct); /// assert_eq!(msg, dec); /// - /// let cks = ClientKey::new(PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64); /// /// // Encryption of one message: /// let ct = cks.encrypt_without_padding(msg); @@ -657,7 +658,7 @@ impl ClientKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::ClientKey; /// @@ -674,7 +675,7 @@ impl ClientKey { /// let dec = cks.decrypt_without_padding(&ct); /// assert_eq!(msg % modulus, dec); /// - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encryption of one message: /// let ct = cks.encrypt_without_padding(msg); @@ -760,7 +761,7 @@ impl ClientKey { /// ```rust /// use tfhe::shortint::parameters::{ /// MessageModulus, PARAM_MESSAGE_2_CARRY_2_KS_PBS, - /// PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::ClientKey; /// @@ -778,7 +779,7 @@ impl ClientKey { /// assert_eq!(msg, dec % modulus.0); /// /// // Generate the client key - /// let cks = ClientKey::new(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let cks = ClientKey::new(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encryption of one message: /// let ct = cks.encrypt_native_crt(msg, modulus); diff --git a/tfhe/src/shortint/key_switching_key/mod.rs b/tfhe/src/shortint/key_switching_key/mod.rs index 77ee072dda..4aa6082587 100644 --- a/tfhe/src/shortint/key_switching_key/mod.rs +++ b/tfhe/src/shortint/key_switching_key/mod.rs @@ -176,14 +176,15 @@ impl KeySwitchingKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS, + /// V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::prelude::*; /// use tfhe::shortint::{gen_keys, KeySwitchingKey}; /// /// // Generate the client keys and server keys: - /// let (ck1, sk1) = gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); - /// let (ck2, sk2) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let (ck1, sk1) = gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (ck2, sk2) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the server key: /// let ksk = KeySwitchingKey::new( @@ -322,14 +323,15 @@ impl KeySwitchingKey { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS, + /// V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::prelude::*; /// use tfhe::shortint::{gen_keys, KeySwitchingKey}; /// /// // Generate the client keys and server keys: - /// let (ck1, sk1) = gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); - /// let (ck2, sk2) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let (ck1, sk1) = gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (ck2, sk2) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the server key: /// let ksk = KeySwitchingKey::new( @@ -462,14 +464,15 @@ impl<'keys> KeySwitchingKeyView<'keys> { /// /// ```rust /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS, + /// V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, /// }; /// use tfhe::shortint::prelude::*; /// use tfhe::shortint::{gen_keys, KeySwitchingKey}; /// /// // Generate the client keys and server keys: - /// let (ck1, sk1) = gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); - /// let (ck2, sk2) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let (ck1, sk1) = gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (ck2, sk2) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); /// /// // Generate the server key: /// let ksk = KeySwitchingKey::new( diff --git a/tfhe/src/shortint/key_switching_key/test.rs b/tfhe/src/shortint/key_switching_key/test.rs index ccb99480e2..239930d4ea 100644 --- a/tfhe/src/shortint/key_switching_key/test.rs +++ b/tfhe/src/shortint/key_switching_key/test.rs @@ -1,15 +1,16 @@ use crate::shortint::keycache::{KEY_CACHE, KEY_CACHE_KSK}; use crate::shortint::parameters::{ - ShortintKeySwitchingParameters, PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + ShortintKeySwitchingParameters, V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, }; use crate::shortint::prelude::*; #[test] fn gen_multi_keys_test_fresh_ci_run_filter() { let keys = KEY_CACHE_KSK.get_from_param(( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS, )); let ck1 = keys.client_key_1(); @@ -57,7 +58,7 @@ fn gen_multi_keys_test_fresh_ci_run_filter() { #[test] fn gen_multi_keys_test_fresh_2_ci_run_filter() { - let keys2 = KEY_CACHE.get_from_param(PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); + let keys2 = KEY_CACHE.get_from_param(V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64); let (ck2, sk2) = (keys2.client_key(), keys2.server_key()); let ksk_params = ShortintKeySwitchingParameters::new( @@ -67,8 +68,8 @@ fn gen_multi_keys_test_fresh_2_ci_run_filter() { ); let keys = KEY_CACHE_KSK.get_from_param(( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, ksk_params, )); let ck1 = keys.client_key_1(); @@ -116,8 +117,8 @@ fn gen_multi_keys_test_fresh_2_ci_run_filter() { #[test] fn gen_multi_keys_test_add_with_overflow_ci_run_filter() { let keys = KEY_CACHE_KSK.get_from_param(( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS, )); let (ck1, sk1) = (keys.client_key_1(), keys.server_key_1()); @@ -141,7 +142,7 @@ fn gen_multi_keys_test_add_with_overflow_ci_run_filter() { #[test] fn gen_multi_keys_test_no_shift_ci_run_filter() { - let keys2 = KEY_CACHE.get_from_param(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + let keys2 = KEY_CACHE.get_from_param(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let ck2 = keys2.client_key(); let ksk_params = ShortintKeySwitchingParameters::new( @@ -151,8 +152,8 @@ fn gen_multi_keys_test_no_shift_ci_run_filter() { ); let keys = KEY_CACHE_KSK.get_from_param(( - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, ksk_params, )); let ksk = keys.key_switching_key(); @@ -162,7 +163,7 @@ fn gen_multi_keys_test_no_shift_ci_run_filter() { #[test] fn gen_multi_keys_test_truncate_ci_run_filter() { - let keys2 = KEY_CACHE.get_from_param(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + let keys2 = KEY_CACHE.get_from_param(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); let (ck2, sk2) = (keys2.client_key(), keys2.server_key()); let ksk_params = ShortintKeySwitchingParameters::new( @@ -172,8 +173,8 @@ fn gen_multi_keys_test_truncate_ci_run_filter() { ); let keys = KEY_CACHE_KSK.get_from_param(( - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, ksk_params, )); let (ck1, sk1) = (keys.client_key_1(), keys.server_key_1()); diff --git a/tfhe/src/shortint/keycache.rs b/tfhe/src/shortint/keycache.rs index 27d74407c7..e377910f82 100644 --- a/tfhe/src/shortint/keycache.rs +++ b/tfhe/src/shortint/keycache.rs @@ -17,105 +17,105 @@ use crate::shortint::{ClientKey, KeySwitchingKey, ServerKey}; use serde::{Deserialize, Serialize}; named_params_impl!( ShortintParameterSet => - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, // Small - PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, // MultiBit Group 2 - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, // MultiBit Group 3 - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, // MultiBit Group 2 GPU PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -127,123 +127,123 @@ named_params_impl!( ShortintParameterSet => // Tuniform PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // CPK - PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, // CPK SMALL - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, // TUniform PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // Wopbs - WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, // Wopbs only - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, // Coverage #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs index 4a6cb58d5b..25d98367bb 100644 --- a/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -2,7 +2,7 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; // p-fail = 2^-64.093, algorithmic cost ~ 43, 2-norm = 1 -pub const PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(684), glwe_dimension: GlweDimension(2), @@ -25,7 +25,7 @@ pub const PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3 -pub const PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(781), glwe_dimension: GlweDimension(4), @@ -48,7 +48,7 @@ pub const PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.415, algorithmic cost ~ 76, 2-norm = 7 -pub const PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(858), glwe_dimension: GlweDimension(2), @@ -71,7 +71,7 @@ pub const PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.088, algorithmic cost ~ 109, 2-norm = 15 -pub const PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(859), glwe_dimension: GlweDimension(1), @@ -94,7 +94,7 @@ pub const PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.069, algorithmic cost ~ 362, 2-norm = 31 -pub const PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(902), glwe_dimension: GlweDimension(1), @@ -117,7 +117,7 @@ pub const PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.068, algorithmic cost ~ 836, 2-norm = 63 -pub const PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(981), glwe_dimension: GlweDimension(1), @@ -140,7 +140,7 @@ pub const PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.054, algorithmic cost ~ 2522, 2-norm = 127 -pub const PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1054), glwe_dimension: GlweDimension(1), @@ -163,7 +163,7 @@ pub const PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.02, algorithmic cost ~ 8616, 2-norm = 255 -pub const PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1114), glwe_dimension: GlweDimension(1), @@ -186,7 +186,7 @@ pub const PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.017, algorithmic cost ~ 60, 2-norm = 1 -pub const PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(781), glwe_dimension: GlweDimension(4), @@ -209,7 +209,7 @@ pub const PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.176, algorithmic cost ~ 76, 2-norm = 2 -pub const PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(857), glwe_dimension: GlweDimension(2), @@ -232,7 +232,7 @@ pub const PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.074, algorithmic cost ~ 106, 2-norm = 5 -pub const PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(834), glwe_dimension: GlweDimension(1), @@ -255,7 +255,7 @@ pub const PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.084, algorithmic cost ~ 362, 2-norm = 10 -pub const PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(902), glwe_dimension: GlweDimension(1), @@ -278,7 +278,7 @@ pub const PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.078, algorithmic cost ~ 833, 2-norm = 21 -pub const PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -300,8 +300,8 @@ pub const PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.058, algorithmic cost ~ 2517, 2-norm = 42 -pub const PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.151, algorithmic cost ~ 2517, 2-norm = 42 +pub const V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1052), glwe_dimension: GlweDimension(1), @@ -312,19 +312,19 @@ pub const PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(12), + pbs_base_log: DecompositionBaseLog(11), pbs_level: DecompositionLevelCount(3), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(7), message_modulus: MessageModulus(4), carry_modulus: CarryModulus(32), max_noise_level: MaxNoiseLevel::new(42), - log2_p_fail: -64.058, + log2_p_fail: -64.151, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.001, algorithmic cost ~ 7229, 2-norm = 85 -pub const PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1114), glwe_dimension: GlweDimension(1), @@ -347,7 +347,7 @@ pub const PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.193, algorithmic cost ~ 76, 2-norm = 1 -pub const PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(857), glwe_dimension: GlweDimension(2), @@ -370,7 +370,7 @@ pub const PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.346, algorithmic cost ~ 106, 2-norm = 2 -pub const PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(833), glwe_dimension: GlweDimension(1), @@ -393,7 +393,7 @@ pub const PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.064, algorithmic cost ~ 260, 2-norm = 4 -pub const PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(935), glwe_dimension: GlweDimension(1), @@ -415,8 +415,8 @@ pub const PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.122, algorithmic cost ~ 833, 2-norm = 9 -pub const PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.166, algorithmic cost ~ 833, 2-norm = 9 +pub const V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -427,19 +427,19 @@ pub const PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(16), + pbs_base_log: DecompositionBaseLog(15), pbs_level: DecompositionLevelCount(2), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(6), message_modulus: MessageModulus(8), carry_modulus: CarryModulus(8), max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -64.122, + log2_p_fail: -64.166, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.037, algorithmic cost ~ 1947, 2-norm = 18 -pub const PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1061), glwe_dimension: GlweDimension(1), @@ -462,7 +462,7 @@ pub const PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.0, algorithmic cost ~ 6009, 2-norm = 36 -pub const PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1118), glwe_dimension: GlweDimension(1), @@ -485,7 +485,7 @@ pub const PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.454, algorithmic cost ~ 106, 2-norm = 1 -pub const PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(833), glwe_dimension: GlweDimension(1), @@ -507,8 +507,8 @@ pub const PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.071, algorithmic cost ~ 250, 2-norm = 2 -pub const PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.077, algorithmic cost ~ 250, 2-norm = 2 +pub const V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(954), glwe_dimension: GlweDimension(1), @@ -519,19 +519,19 @@ pub const PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(23), + pbs_base_log: DecompositionBaseLog(22), pbs_level: DecompositionLevelCount(1), ks_base_log: DecompositionBaseLog(4), ks_level: DecompositionLevelCount(4), message_modulus: MessageModulus(16), carry_modulus: CarryModulus(2), max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.071, + log2_p_fail: -64.077, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.182, algorithmic cost ~ 833, 2-norm = 4 -pub const PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -554,7 +554,7 @@ pub const PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.099, algorithmic cost ~ 1933, 2-norm = 8 -pub const PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1053), glwe_dimension: GlweDimension(1), @@ -577,7 +577,7 @@ pub const PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.033, algorithmic cost ~ 5904, 2-norm = 17 -pub const PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1112), glwe_dimension: GlweDimension(1), @@ -600,7 +600,7 @@ pub const PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.068, algorithmic cost ~ 248, 2-norm = 1 -pub const PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(946), glwe_dimension: GlweDimension(1), @@ -623,7 +623,7 @@ pub const PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.185, algorithmic cost ~ 833, 2-norm = 2 -pub const PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -646,7 +646,7 @@ pub const PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.137, algorithmic cost ~ 1931, 2-norm = 4 -pub const PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1052), glwe_dimension: GlweDimension(1), @@ -669,7 +669,7 @@ pub const PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.004, algorithmic cost ~ 5888, 2-norm = 8 -pub const PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1109), glwe_dimension: GlweDimension(1), @@ -692,7 +692,7 @@ pub const PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.034, algorithmic cost ~ 609, 2-norm = 1 -pub const PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1005), glwe_dimension: GlweDimension(1), @@ -715,7 +715,7 @@ pub const PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.031, algorithmic cost ~ 1929, 2-norm = 2 -pub const PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1051), glwe_dimension: GlweDimension(1), @@ -738,7 +738,7 @@ pub const PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.007, algorithmic cost ~ 5390, 2-norm = 4 -pub const PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1111), glwe_dimension: GlweDimension(1), @@ -760,8 +760,8 @@ pub const PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.032, algorithmic cost ~ 1929, 2-norm = 1 -pub const PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.042, algorithmic cost ~ 1929, 2-norm = 1 +pub const V0_11_PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1051), glwe_dimension: GlweDimension(1), @@ -772,19 +772,19 @@ pub const PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(16), + pbs_base_log: DecompositionBaseLog(15), pbs_level: DecompositionLevelCount(2), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(7), message_modulus: MessageModulus(128), carry_modulus: CarryModulus(1), max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.032, + log2_p_fail: -64.042, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.017, algorithmic cost ~ 4609, 2-norm = 2 -pub const PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1116), glwe_dimension: GlweDimension(1), @@ -807,7 +807,7 @@ pub const PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSPar encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.011, algorithmic cost ~ 4584, 2-norm = 1 -pub const PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1110), glwe_dimension: GlweDimension(1), diff --git a/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs b/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs index ddc834146b..544bb7708f 100644 --- a/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs +++ b/tfhe/src/shortint/parameters/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs @@ -1,8 +1,9 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; -// p-fail = 2^-66.538, algorithmic cost ~ 74, 2-norm = 3 -pub const PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + +// p-fail = 2^-66.829, algorithmic cost ~ 74, 2-norm = 3 +pub const V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1024), glwe_dimension: GlweDimension(4), @@ -13,19 +14,19 @@ pub const PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.845267479601915e-15, )), - pbs_base_log: DecompositionBaseLog(26), + pbs_base_log: DecompositionBaseLog(23), pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(8), + ks_base_log: DecompositionBaseLog(7), ks_level: DecompositionLevelCount(2), message_modulus: MessageModulus(2), carry_modulus: CarryModulus(2), max_noise_level: MaxNoiseLevel::new(3), - log2_p_fail: -66.538, + log2_p_fail: -66.829, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Small, }; // p-fail = 2^-68.803, algorithmic cost ~ 130, 2-norm = 5 -pub const PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1024), glwe_dimension: GlweDimension(1), @@ -47,8 +48,8 @@ pub const PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSPar ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Small, }; -// p-fail = 2^-87.969, algorithmic cost ~ 3355, 2-norm = 9 -pub const PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-140.945, algorithmic cost ~ 3355, 2-norm = 9 +pub const V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(2048), glwe_dimension: GlweDimension(1), @@ -59,19 +60,19 @@ pub const PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSPar glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(14), + pbs_base_log: DecompositionBaseLog(15), pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(20), + ks_base_log: DecompositionBaseLog(24), ks_level: DecompositionLevelCount(1), message_modulus: MessageModulus(8), carry_modulus: CarryModulus(8), max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -87.969, + log2_p_fail: -140.945, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Small, }; -// p-fail = 2^-134.119, algorithmic cost ~ 20401, 2-norm = 17 -pub const PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-138.594, algorithmic cost ~ 20401, 2-norm = 17 +pub const V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(2048), glwe_dimension: GlweDimension(1), @@ -84,12 +85,12 @@ pub const PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSPar )), pbs_base_log: DecompositionBaseLog(11), pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(13), + ks_base_log: DecompositionBaseLog(16), ks_level: DecompositionLevelCount(2), message_modulus: MessageModulus(16), carry_modulus: CarryModulus(16), max_noise_level: MaxNoiseLevel::new(17), - log2_p_fail: -134.119, + log2_p_fail: -138.594, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Small, }; diff --git a/tfhe/src/shortint/parameters/classic/compact_pk/mod.rs b/tfhe/src/shortint/parameters/classic/compact_pk/mod.rs index a2a8887527..6b712dd3a7 100644 --- a/tfhe/src/shortint/parameters/classic/compact_pk/mod.rs +++ b/tfhe/src/shortint/parameters/classic/compact_pk/mod.rs @@ -5,44 +5,44 @@ use crate::shortint::ClassicPBSParameters; pub mod gaussian; pub const ALL_PARAMETER_VEC_COMPACT_PK: [ClassicPBSParameters; 40] = [ - PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, ]; diff --git a/tfhe/src/shortint/parameters/classic/gaussian/mod.rs b/tfhe/src/shortint/parameters/classic/gaussian/mod.rs index 8d0069a81f..f4ecacbf41 100644 --- a/tfhe/src/shortint/parameters/classic/gaussian/mod.rs +++ b/tfhe/src/shortint/parameters/classic/gaussian/mod.rs @@ -4,44 +4,44 @@ use crate::shortint::ClassicPBSParameters; pub mod p_fail_2_minus_64; pub const ALL_PARAMETER_VEC_GAUSSIAN: [ClassicPBSParameters; 40] = [ - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, ]; diff --git a/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs index 90cc6ee0b6..9af60fde8b 100644 --- a/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -2,7 +2,7 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; // p-fail = 2^-64.612, algorithmic cost ~ 39, 2-norm = 1 -pub const PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(720), glwe_dimension: GlweDimension(6), @@ -25,7 +25,7 @@ pub const PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3 -pub const PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(781), glwe_dimension: GlweDimension(4), @@ -48,7 +48,7 @@ pub const PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.415, algorithmic cost ~ 76, 2-norm = 7 -pub const PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(858), glwe_dimension: GlweDimension(2), @@ -71,7 +71,7 @@ pub const PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.088, algorithmic cost ~ 109, 2-norm = 15 -pub const PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(859), glwe_dimension: GlweDimension(1), @@ -94,7 +94,7 @@ pub const PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.069, algorithmic cost ~ 362, 2-norm = 31 -pub const PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(902), glwe_dimension: GlweDimension(1), @@ -117,7 +117,7 @@ pub const PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.068, algorithmic cost ~ 836, 2-norm = 63 -pub const PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(981), glwe_dimension: GlweDimension(1), @@ -140,7 +140,7 @@ pub const PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.054, algorithmic cost ~ 2522, 2-norm = 127 -pub const PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1054), glwe_dimension: GlweDimension(1), @@ -163,7 +163,7 @@ pub const PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.02, algorithmic cost ~ 8616, 2-norm = 255 -pub const PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1114), glwe_dimension: GlweDimension(1), @@ -186,7 +186,7 @@ pub const PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.023, algorithmic cost ~ 45, 2-norm = 1 -pub const PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(775), glwe_dimension: GlweDimension(3), @@ -209,7 +209,7 @@ pub const PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.176, algorithmic cost ~ 76, 2-norm = 2 -pub const PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(857), glwe_dimension: GlweDimension(2), @@ -232,7 +232,7 @@ pub const PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.074, algorithmic cost ~ 106, 2-norm = 5 -pub const PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(834), glwe_dimension: GlweDimension(1), @@ -255,7 +255,7 @@ pub const PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.084, algorithmic cost ~ 362, 2-norm = 10 -pub const PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(902), glwe_dimension: GlweDimension(1), @@ -278,7 +278,7 @@ pub const PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.078, algorithmic cost ~ 833, 2-norm = 21 -pub const PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -300,8 +300,8 @@ pub const PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.058, algorithmic cost ~ 2517, 2-norm = 42 -pub const PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.151, algorithmic cost ~ 2517, 2-norm = 42 +pub const V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1052), glwe_dimension: GlweDimension(1), @@ -312,19 +312,19 @@ pub const PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(12), + pbs_base_log: DecompositionBaseLog(11), pbs_level: DecompositionLevelCount(3), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(7), message_modulus: MessageModulus(4), carry_modulus: CarryModulus(32), max_noise_level: MaxNoiseLevel::new(42), - log2_p_fail: -64.058, + log2_p_fail: -64.151, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.001, algorithmic cost ~ 7229, 2-norm = 85 -pub const PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1114), glwe_dimension: GlweDimension(1), @@ -347,7 +347,7 @@ pub const PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.193, algorithmic cost ~ 76, 2-norm = 1 -pub const PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(857), glwe_dimension: GlweDimension(2), @@ -370,7 +370,7 @@ pub const PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.346, algorithmic cost ~ 106, 2-norm = 2 -pub const PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(833), glwe_dimension: GlweDimension(1), @@ -393,7 +393,7 @@ pub const PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.064, algorithmic cost ~ 260, 2-norm = 4 -pub const PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(935), glwe_dimension: GlweDimension(1), @@ -415,8 +415,8 @@ pub const PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.122, algorithmic cost ~ 833, 2-norm = 9 -pub const PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.166, algorithmic cost ~ 833, 2-norm = 9 +pub const V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -427,19 +427,19 @@ pub const PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(16), + pbs_base_log: DecompositionBaseLog(15), pbs_level: DecompositionLevelCount(2), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(6), message_modulus: MessageModulus(8), carry_modulus: CarryModulus(8), max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -64.122, + log2_p_fail: -64.166, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.037, algorithmic cost ~ 1947, 2-norm = 18 -pub const PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1061), glwe_dimension: GlweDimension(1), @@ -462,7 +462,7 @@ pub const PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.0, algorithmic cost ~ 6009, 2-norm = 36 -pub const PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1118), glwe_dimension: GlweDimension(1), @@ -485,7 +485,7 @@ pub const PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.454, algorithmic cost ~ 106, 2-norm = 1 -pub const PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(833), glwe_dimension: GlweDimension(1), @@ -507,8 +507,8 @@ pub const PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.071, algorithmic cost ~ 250, 2-norm = 2 -pub const PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.077, algorithmic cost ~ 250, 2-norm = 2 +pub const V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(954), glwe_dimension: GlweDimension(1), @@ -519,19 +519,19 @@ pub const PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(23), + pbs_base_log: DecompositionBaseLog(22), pbs_level: DecompositionLevelCount(1), ks_base_log: DecompositionBaseLog(4), ks_level: DecompositionLevelCount(4), message_modulus: MessageModulus(16), carry_modulus: CarryModulus(2), max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.071, + log2_p_fail: -64.077, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.182, algorithmic cost ~ 833, 2-norm = 4 -pub const PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -554,7 +554,7 @@ pub const PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.099, algorithmic cost ~ 1933, 2-norm = 8 -pub const PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1053), glwe_dimension: GlweDimension(1), @@ -577,7 +577,7 @@ pub const PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.033, algorithmic cost ~ 5904, 2-norm = 17 -pub const PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1112), glwe_dimension: GlweDimension(1), @@ -600,7 +600,7 @@ pub const PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.068, algorithmic cost ~ 248, 2-norm = 1 -pub const PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(946), glwe_dimension: GlweDimension(1), @@ -623,7 +623,7 @@ pub const PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.185, algorithmic cost ~ 833, 2-norm = 2 -pub const PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(977), glwe_dimension: GlweDimension(1), @@ -646,7 +646,7 @@ pub const PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.137, algorithmic cost ~ 1931, 2-norm = 4 -pub const PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1052), glwe_dimension: GlweDimension(1), @@ -669,7 +669,7 @@ pub const PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.004, algorithmic cost ~ 5888, 2-norm = 8 -pub const PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1109), glwe_dimension: GlweDimension(1), @@ -692,7 +692,7 @@ pub const PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.034, algorithmic cost ~ 609, 2-norm = 1 -pub const PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1005), glwe_dimension: GlweDimension(1), @@ -715,7 +715,7 @@ pub const PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.031, algorithmic cost ~ 1929, 2-norm = 2 -pub const PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1051), glwe_dimension: GlweDimension(1), @@ -738,7 +738,7 @@ pub const PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.007, algorithmic cost ~ 5390, 2-norm = 4 -pub const PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1111), glwe_dimension: GlweDimension(1), @@ -760,8 +760,8 @@ pub const PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -// p-fail = 2^-64.032, algorithmic cost ~ 1929, 2-norm = 1 -pub const PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +// p-fail = 2^-64.042, algorithmic cost ~ 1929, 2-norm = 1 +pub const V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1051), glwe_dimension: GlweDimension(1), @@ -772,19 +772,19 @@ pub const PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( 2.168404344971009e-19, )), - pbs_base_log: DecompositionBaseLog(16), + pbs_base_log: DecompositionBaseLog(15), pbs_level: DecompositionLevelCount(2), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(7), message_modulus: MessageModulus(128), carry_modulus: CarryModulus(1), max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.032, + log2_p_fail: -64.042, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.017, algorithmic cost ~ 4609, 2-norm = 2 -pub const PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1116), glwe_dimension: GlweDimension(1), @@ -807,7 +807,7 @@ pub const PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; // p-fail = 2^-64.011, algorithmic cost ~ 4584, 2-norm = 1 -pub const PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1110), glwe_dimension: GlweDimension(1), @@ -830,40 +830,40 @@ pub const PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Big, }; pub const WITH_CARRY_PARAMETERS_VEC: [ClassicPBSParameters; 36] = [ - PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, ]; diff --git a/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs b/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs index 3d28d74191..57fa855be1 100644 --- a/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs +++ b/tfhe/src/shortint/parameters/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs @@ -2,7 +2,7 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; // p-fail = 2^-64.05, algorithmic cost ~ 67, 2-norm = 3 -pub const PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(884), glwe_dimension: GlweDimension(4), @@ -25,7 +25,7 @@ pub const PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Small, }; // p-fail = 2^-64.107, algorithmic cost ~ 124, 2-norm = 5 -pub const PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(944), glwe_dimension: GlweDimension(1), @@ -48,7 +48,7 @@ pub const PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Small, }; // p-fail = 2^-64.007, algorithmic cost ~ 1066, 2-norm = 9 -pub const PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1121), glwe_dimension: GlweDimension(1), @@ -71,7 +71,7 @@ pub const PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = encryption_key_choice: EncryptionKeyChoice::Small, }; // p-fail = 2^-64.507, algorithmic cost ~ 13479, 2-norm = 17 -pub const PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = +pub const V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ClassicPBSParameters { lwe_dimension: LweDimension(1254), glwe_dimension: GlweDimension(1), @@ -93,9 +93,9 @@ pub const PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Small, }; -pub const WITH_CARRY_PARAMETERS_VEC_PBS_KS: [ClassicPBSParameters; 4] = [ - PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, +pub const V0_11_WITH_CARRY_PARAMETERS_VEC_PBS_KS: [ClassicPBSParameters; 4] = [ + V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, ]; diff --git a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs index de7baa030c..2388e43ca1 100644 --- a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs @@ -2,22 +2,25 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; -// security = 132 bits, p-fail = 2^-64.138, algorithmic cost ~ 113, 2-norm = 5 pub const PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: ClassicPBSParameters = + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; + +// security = 132 bits, p-fail = 2^-71.625 +pub const V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: ClassicPBSParameters = ClassicPBSParameters { - lwe_dimension: LweDimension(887), + lwe_dimension: LweDimension(879), glwe_dimension: GlweDimension(1), polynomial_size: PolynomialSize(2048), lwe_noise_distribution: DynamicDistribution::new_t_uniform(46), glwe_noise_distribution: DynamicDistribution::new_t_uniform(17), - pbs_base_log: DecompositionBaseLog(22), + pbs_base_log: DecompositionBaseLog(23), pbs_level: DecompositionLevelCount(1), ks_base_log: DecompositionBaseLog(3), ks_level: DecompositionLevelCount(5), message_modulus: MessageModulus(4), carry_modulus: CarryModulus(4), max_noise_level: MaxNoiseLevel::new(5), - log2_p_fail: -64.138, + log2_p_fail: -71.625, ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; diff --git a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/mod.rs index 4e3b5c5315..cf32dbe64e 100644 --- a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/mod.rs +++ b/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/mod.rs @@ -1,2 +1 @@ pub mod ks_pbs; -pub mod pbs_ks; diff --git a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/pbs_ks.rs b/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/pbs_ks.rs deleted file mode 100644 index 943d2f6829..0000000000 --- a/tfhe/src/shortint/parameters/classic/tuniform/p_fail_2_minus_64/pbs_ks.rs +++ /dev/null @@ -1,80 +0,0 @@ -use crate::core_crypto::prelude::*; -use crate::shortint::ciphertext::MaxNoiseLevel; -use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; - -// security = 132 bits, p-fail = 2^-64.301, algorithmic cost ~ 78, 2-norm = 3 -pub const PARAM_MESSAGE_1_CARRY_1_PBS_KS_TUNIFORM_2M64: ClassicPBSParameters = - ClassicPBSParameters { - lwe_dimension: LweDimension(1024), - glwe_dimension: GlweDimension(4), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_t_uniform(42), - glwe_noise_distribution: DynamicDistribution::new_t_uniform(15), - pbs_base_log: DecompositionBaseLog(25), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(7), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(3), - log2_p_fail: -64.301, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Small, - }; -// security = 132 bits, p-fail = 2^-66.624, algorithmic cost ~ 134, 2-norm = 5 -pub const PARAM_MESSAGE_2_CARRY_2_PBS_KS_TUNIFORM_2M64: ClassicPBSParameters = - ClassicPBSParameters { - lwe_dimension: LweDimension(1024), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_t_uniform(42), - glwe_noise_distribution: DynamicDistribution::new_t_uniform(15), - pbs_base_log: DecompositionBaseLog(23), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(5), - log2_p_fail: -66.624, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Small, - }; -// security = 132 bits, p-fail = 2^-64.112, algorithmic cost ~ 3355, 2-norm = 9 -pub const PARAM_MESSAGE_3_CARRY_3_PBS_KS_TUNIFORM_2M64: ClassicPBSParameters = - ClassicPBSParameters { - lwe_dimension: LweDimension(2048), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_t_uniform(15), - glwe_noise_distribution: DynamicDistribution::new_t_uniform(3), - pbs_base_log: DecompositionBaseLog(19), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(23), - ks_level: DecompositionLevelCount(1), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -64.112, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Small, - }; -// security = 132 bits, p-fail = 2^-73.197, algorithmic cost ~ 20401, 2-norm = 17 -pub const PARAM_MESSAGE_4_CARRY_4_PBS_KS_TUNIFORM_2M64: ClassicPBSParameters = - ClassicPBSParameters { - lwe_dimension: LweDimension(2048), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(65536), - lwe_noise_distribution: DynamicDistribution::new_t_uniform(15), - glwe_noise_distribution: DynamicDistribution::new_t_uniform(3), - pbs_base_log: DecompositionBaseLog(13), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(12), - ks_level: DecompositionLevelCount(2), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(17), - log2_p_fail: -73.197, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Small, - }; diff --git a/tfhe/src/shortint/parameters/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs index 2dc7895d8b..2b38c8269a 100644 --- a/tfhe/src/shortint/parameters/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs @@ -18,11 +18,26 @@ pub const V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: } .validate(); -/// This legacy parameter set should be used with the v1 pke zk scheme of TFHE-rs v0.10 and lower -pub const V0_10_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: +/// This parameter set can be used with the v1 pke zk scheme on TFHE-rs v0.11 and after +/// Should be used with +/// V0_11_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1 +pub const V0_11_PARAM_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1: CompactPublicKeyEncryptionParameters = CompactPublicKeyEncryptionParameters { encryption_lwe_dimension: LweDimension(1024), - encryption_noise_distribution: DynamicDistribution::new_t_uniform(42), + encryption_noise_distribution: DynamicDistribution::new_t_uniform(43), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + expansion_kind: CompactCiphertextListExpansionKind::RequiresCasting, +} +.validate(); + +/// This parameter set can be used with the v1 pke zk scheme on TFHE-rs v0.11 and after +/// Should be used with V0_11_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1 +pub const V0_11_PARAM_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1: + CompactPublicKeyEncryptionParameters = CompactPublicKeyEncryptionParameters { + encryption_lwe_dimension: LweDimension(2048), + encryption_noise_distribution: DynamicDistribution::new_t_uniform(17), message_modulus: MessageModulus(4), carry_modulus: CarryModulus(4), ciphertext_modulus: CiphertextModulus::new_native(), diff --git a/tfhe/src/shortint/parameters/key_switching/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/key_switching/p_fail_2_minus_64/ks_pbs.rs index 6d16881519..33fd3a2678 100644 --- a/tfhe/src/shortint/parameters/key_switching/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/key_switching/p_fail_2_minus_64/ks_pbs.rs @@ -31,25 +31,24 @@ pub const V0_11_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2 pub const V0_11_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: ShortintKeySwitchingParameters = ShortintKeySwitchingParameters { ks_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(23), + ks_base_log: DecompositionBaseLog(24), destination_key: EncryptionKeyChoice::Big, }; -// These are the same parameters as they where defined in TFHE-rs 0.10 and before -pub const V0_10_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: - ShortintKeySwitchingParameters = - V0_10_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; - -pub const V0_10_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: +// Parameters to keyswitch from input PKE 2_2 TUniform parameters to 2_2 KS_PBS compute parameters +// arriving under the small key, requires a PBS to get to the big key +pub const V0_11_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1: ShortintKeySwitchingParameters = ShortintKeySwitchingParameters { ks_level: DecompositionLevelCount(5), ks_base_log: DecompositionBaseLog(3), destination_key: EncryptionKeyChoice::Small, }; -pub const V0_10_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: +// Parameters to keyswitch from input PKE 2_2 TUniform parameters to 2_2 KS_PBS compute parameters +// arriving under the big key, requires a PBS to get to the big key +pub const V0_11_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1: ShortintKeySwitchingParameters = ShortintKeySwitchingParameters { ks_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(27), + ks_base_log: DecompositionBaseLog(24), destination_key: EncryptionKeyChoice::Big, }; diff --git a/tfhe/src/shortint/parameters/mod.rs b/tfhe/src/shortint/parameters/mod.rs index 6227fd8cb0..33b34fd7a1 100644 --- a/tfhe/src/shortint/parameters/mod.rs +++ b/tfhe/src/shortint/parameters/mod.rs @@ -31,6 +31,7 @@ pub mod multi_bit; pub mod parameters_wopbs; pub mod parameters_wopbs_message_carry; pub mod parameters_wopbs_only; +pub mod v0_10; pub use super::ciphertext::{Degree, MaxNoiseLevel, NoiseLevel}; use super::server_key::PBSConformanceParameters; @@ -41,7 +42,6 @@ pub use crate::shortint::parameters::classic::compact_pk::*; pub use crate::shortint::parameters::classic::gaussian::p_fail_2_minus_64::ks_pbs::*; pub use crate::shortint::parameters::classic::gaussian::p_fail_2_minus_64::pbs_ks::*; pub use crate::shortint::parameters::classic::tuniform::p_fail_2_minus_64::ks_pbs::*; -pub use crate::shortint::parameters::classic::tuniform::p_fail_2_minus_64::pbs_ks::*; pub use crate::shortint::parameters::list_compression::{ CompressionParameters, COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, }; @@ -52,6 +52,16 @@ pub use compact_public_key_only::{ CastingFunctionsOwned, CastingFunctionsView, CompactCiphertextListExpansionKind, CompactPublicKeyEncryptionParameters, ShortintCompactCiphertextListCastingMode, }; + +pub use crate::shortint::parameters::v0_10::classic::compact_pk::gaussian::p_fail_2_minus_64::ks_pbs::*; +pub use crate::shortint::parameters::v0_10::classic::compact_pk::gaussian::p_fail_2_minus_64::pbs_ks::*; +pub use crate::shortint::parameters::v0_10::classic::gaussian::p_fail_2_minus_64::ks_pbs::*; +pub use crate::shortint::parameters::v0_10::classic::gaussian::p_fail_2_minus_64::pbs_ks::*; +pub use crate::shortint::parameters::v0_10::multi_bit::gaussian::p_fail_2_minus_64::ks_pbs::*; +pub use crate::shortint::parameters::v0_10::classic::tuniform::p_fail_2_minus_64::ks_pbs::*; +pub use crate::shortint::parameters::v0_10::key_switching::p_fail_2_minus_64::ks_pbs::*; +pub use crate::shortint::parameters::v0_10::compact_public_key_only::p_fail_2_minus_64::ks_pbs::*; + #[cfg(tarpaulin)] pub use coverage_parameters::*; pub use key_switching::ShortintKeySwitchingParameters; @@ -671,56 +681,56 @@ pub const ALL_PARAMETER_VEC: [ClassicPBSParameters; 29] = WITH_CARRY_PARAMETERS_ /// Vector containing all parameter sets where the carry space is strictly greater than one pub const WITH_CARRY_PARAMETERS_VEC: [ClassicPBSParameters; 29] = [ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, ]; /// Vector containing all parameter sets where the carry space is strictly greater than one pub const BIVARIATE_PBS_COMPLIANT_PARAMETER_SET_VEC: [ClassicPBSParameters; 17] = [ - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, ]; /// Nomenclature: PARAM_MESSAGE_X_CARRY_Y: the message (respectively carry) modulus is @@ -734,12 +744,12 @@ pub const BIVARIATE_PBS_COMPLIANT_PARAMETER_SET_VEC: [ClassicPBSParameters; 17] /// /// ```rust /// use tfhe::shortint::parameters::{ -/// get_parameters_from_message_and_carry, PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, +/// get_parameters_from_message_and_carry, V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, /// }; /// let message_space = 7; /// let carry_space = 2; /// let param = get_parameters_from_message_and_carry(message_space, carry_space); -/// assert_eq!(param, PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64); +/// assert_eq!(param, V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// ``` pub fn get_parameters_from_message_and_carry( msg_space: usize, diff --git a/tfhe/src/shortint/parameters/multi_bit/gaussian/mod.rs b/tfhe/src/shortint/parameters/multi_bit/gaussian/mod.rs index 25f5fe6f0f..58f1c28ab6 100644 --- a/tfhe/src/shortint/parameters/multi_bit/gaussian/mod.rs +++ b/tfhe/src/shortint/parameters/multi_bit/gaussian/mod.rs @@ -6,62 +6,62 @@ use crate::shortint::parameters::*; pub mod p_fail_2_minus_64; pub const ALL_MULTI_BIT_PARAMETER_VEC: [MultiBitPBSParameters; 63] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/shortint/parameters/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs index 066ffb1b6d..b5b4d0b85f 100644 --- a/tfhe/src/shortint/parameters/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs +++ b/tfhe/src/shortint/parameters/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -1,1464 +1,1879 @@ use crate::core_crypto::prelude::*; use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::multi_bit::MultiBitPBSParameters; use crate::shortint::parameters::{CarryModulus, MessageModulus}; -use crate::shortint::MultiBitPBSParameters; - -// p-fail = 2^-65.348, algorithmic cost ~ 41, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(700), - glwe_dimension: GlweDimension(3), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.58747009344789e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.9524392655548086e-11, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -65.348, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.263, algorithmic cost ~ 59, 2-norm = 3 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(750), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5140301927925663e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(22), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(3), - log2_p_fail: -64.263, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.119, algorithmic cost ~ 68, 2-norm = 7 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(862), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.192351209970737e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(22), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(7), - log2_p_fail: -64.119, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.871, algorithmic cost ~ 127, 2-norm = 15 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(840), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.2044815829012556e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(5), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(15), - log2_p_fail: -64.871, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.172, algorithmic cost ~ 292, 2-norm = 31 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(950), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.803076706754256e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(31), - log2_p_fail: -64.172, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.06, algorithmic cost ~ 887, 2-norm = 63 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(11), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(32), - max_noise_level: MaxNoiseLevel::new(63), - log2_p_fail: -64.06, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.03, algorithmic cost ~ 2853, 2-norm = 127 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1018), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.4859028577569142e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(8), - pbs_level: DecompositionLevelCount(4), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(64), - max_noise_level: MaxNoiseLevel::new(127), - log2_p_fail: -64.03, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.171, algorithmic cost ~ 49, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(766), - glwe_dimension: GlweDimension(3), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.1488024017979662e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.9524392655548086e-11, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(5), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.171, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.615, algorithmic cost ~ 67, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(860), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.269322810630956e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(22), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.615, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.442, algorithmic cost ~ 84, 2-norm = 5 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(888), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.3998779623487315e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(5), - log2_p_fail: -64.442, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.099, algorithmic cost ~ 291, 2-norm = 10 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(948), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.971708676181112e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(10), - log2_p_fail: -64.099, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.298, algorithmic cost ~ 665, 2-norm = 21 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(990), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.408776579232607e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(21), - log2_p_fail: -64.298, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.168, algorithmic cost ~ 2408, 2-norm = 42 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1020), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.4355035400171204e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(11), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(32), - max_noise_level: MaxNoiseLevel::new(42), - log2_p_fail: -64.168, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.709, algorithmic cost ~ 67, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(860), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.269322810630956e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(22), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.709, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.253, algorithmic cost ~ 82, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(910), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 9.577287511785255e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.253, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.115, algorithmic cost ~ 291, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(948), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.971708676181112e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.115, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.02, algorithmic cost ~ 661, 2-norm = 9 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -64.02, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.111, algorithmic cost ~ 2365, 2-norm = 18 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1016), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5380716530060473e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(18), - log2_p_fail: -64.111, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.305, algorithmic cost ~ 82, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(908), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 9.913537993191986e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.305, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.085, algorithmic cost ~ 220, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(926), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 7.266969277511613e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(2), - ks_level: DecompositionLevelCount(9), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.085, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.178, algorithmic cost ~ 661, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.178, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.259, algorithmic cost ~ 2365, 2-norm = 8 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1016), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5380716530060473e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(8), - log2_p_fail: -64.259, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.126, algorithmic cost ~ 189, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(962), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.9048344098472363e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.126, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.207, algorithmic cost ~ 661, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.207, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.114, algorithmic cost ~ 1886, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1018), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.4859028577569142e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.114, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.214, algorithmic cost ~ 661, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.214, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.16, algorithmic cost ~ 1882, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1016), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5380716530060473e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.16, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -// p-fail = 2^-64.261, algorithmic cost ~ 1882, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1016), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5380716530060473e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(20), - message_modulus: MessageModulus(128), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.261, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(2), - deterministic_execution: false, - }; -pub const ALL_MULTI_BIT_PARAMETER_2_VEC: [MultiBitPBSParameters; 28] = [ - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, -]; // p-fail = 2^-67.438, algorithmic cost ~ 45, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(702), - glwe_dimension: GlweDimension(3), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.4657891610923056e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.9524392655548086e-11, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -67.438, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.086, algorithmic cost ~ 61, 2-norm = 3 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(750), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.5140301927925663e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(20), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(3), - log2_p_fail: -64.086, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.377, algorithmic cost ~ 70, 2-norm = 7 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(864), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.117990356129097e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(7), - log2_p_fail: -64.377, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.87, algorithmic cost ~ 127, 2-norm = 15 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(840), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.2044815829012556e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(5), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(15), - log2_p_fail: -64.87, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.453, algorithmic cost ~ 288, 2-norm = 31 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(951), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.7209178960699193e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(31), - log2_p_fail: -64.453, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.606, algorithmic cost ~ 884, 2-norm = 63 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(987), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.5367387617400005e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(32), - max_noise_level: MaxNoiseLevel::new(63), - log2_p_fail: -64.606, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.101, algorithmic cost ~ 3855, 2-norm = 127 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(6), - pbs_level: DecompositionLevelCount(6), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(64), - max_noise_level: MaxNoiseLevel::new(127), - log2_p_fail: -64.101, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.031, algorithmic cost ~ 58, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(765), - glwe_dimension: GlweDimension(3), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.1687951746275051e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.9524392655548086e-11, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(2), - ks_level: DecompositionLevelCount(7), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.031, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-65.038, algorithmic cost ~ 70, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(861), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.230505012256408e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -65.038, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.442, algorithmic cost ~ 80, 2-norm = 5 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(891), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.3292631075564801e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(5), - log2_p_fail: -64.442, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.086, algorithmic cost ~ 287, 2-norm = 10 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(948), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.971708676181112e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(10), - log2_p_fail: -64.086, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.068, algorithmic cost ~ 653, 2-norm = 21 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(996), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.1718912188918548e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(21), - log2_p_fail: -64.068, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.064, algorithmic cost ~ 2859, 2-norm = 42 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(8), - pbs_level: DecompositionLevelCount(4), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(32), - max_noise_level: MaxNoiseLevel::new(42), - log2_p_fail: -64.064, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.73, algorithmic cost ~ 70, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(861), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.230505012256408e-06, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(19), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.73, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.769, algorithmic cost ~ 78, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(912), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 9.252442079345288e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.769, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.113, algorithmic cost ~ 287, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(948), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.971708676181112e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.113, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.437, algorithmic cost ~ 647, 2-norm = 9 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(987), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.5367387617400005e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(9), - log2_p_fail: -64.437, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.139, algorithmic cost ~ 2859, 2-norm = 18 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(8), - pbs_level: DecompositionLevelCount(4), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(16), - max_noise_level: MaxNoiseLevel::new(18), - log2_p_fail: -64.139, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.351, algorithmic cost ~ 78, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(909), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(2048), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 9.743962418842052e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.845267479601915e-15, - )), - pbs_base_log: DecompositionBaseLog(20), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(5), - ks_level: DecompositionLevelCount(3), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.351, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.117, algorithmic cost ~ 287, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(948), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 4.971708676181112e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.117, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.138, algorithmic cost ~ 645, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.138, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.111, algorithmic cost ~ 2360, 2-norm = 8 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(8), - max_noise_level: MaxNoiseLevel::new(8), - log2_p_fail: -64.111, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.194, algorithmic cost ~ 181, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(972), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(4096), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.286032625627172e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(21), - pbs_level: DecompositionLevelCount(1), - ks_base_log: DecompositionBaseLog(4), - ks_level: DecompositionLevelCount(4), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.194, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.146, algorithmic cost ~ 645, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.146, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.145, algorithmic cost ~ 2360, 2-norm = 4 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(4), - max_noise_level: MaxNoiseLevel::new(4), - log2_p_fail: -64.145, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.212, algorithmic cost ~ 645, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(984), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(8192), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.671498718807819e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(3), - ks_level: DecompositionLevelCount(6), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.212, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.153, algorithmic cost ~ 2360, 2-norm = 2 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(10), - pbs_level: DecompositionLevelCount(3), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(2), - max_noise_level: MaxNoiseLevel::new(2), - log2_p_fail: -64.153, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -// p-fail = 2^-64.079, algorithmic cost ~ 1862, 2-norm = 1 -pub const PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: MultiBitPBSParameters = - MultiBitPBSParameters { - lwe_dimension: LweDimension(1014), - glwe_dimension: GlweDimension(1), - polynomial_size: PolynomialSize(16384), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 1.592072050626447e-07, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 2.168404344971009e-19, - )), - pbs_base_log: DecompositionBaseLog(14), - pbs_level: DecompositionLevelCount(2), - ks_base_log: DecompositionBaseLog(1), - ks_level: DecompositionLevelCount(21), - message_modulus: MessageModulus(128), - carry_modulus: CarryModulus(1), - max_noise_level: MaxNoiseLevel::new(1), - log2_p_fail: -64.079, - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, - grouping_factor: LweBskGroupingFactor(3), - deterministic_execution: false, - }; -pub const ALL_MULTI_BIT_PARAMETER_3_VEC: [MultiBitPBSParameters; 28] = [ - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, +// p-fail = 2^-66.132, algorithmic cost ~ 41, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(696), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.8437982930180355e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(17), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -66.132, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-66.189, algorithmic cost ~ 59, 2-norm = 3 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(748), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5671865150356198e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -66.189, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.292, algorithmic cost ~ 67, 2-norm = 7 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.292, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.089, algorithmic cost ~ 89, 2-norm = 15 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(872), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.844927811696596e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.089, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.045, algorithmic cost ~ 290, 2-norm = 31 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(944), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.326942058078918e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.045, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.108, algorithmic cost ~ 665, 2-norm = 63 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(990), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.408776579232607e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.108, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.14, algorithmic cost ~ 2023, 2-norm = 127 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1064), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.719066893831459e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.14, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.056, algorithmic cost ~ 7572, 2-norm = 255 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1100), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.610424457179293e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(7), + pbs_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(128), + max_noise_level: MaxNoiseLevel::new(255), + log2_p_fail: -64.056, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.205, algorithmic cost ~ 45, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(776), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.667508981141782e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(17), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.205, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.655, algorithmic cost ~ 67, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.655, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.609, algorithmic cost ~ 82, 2-norm = 5 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(870), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.909701670065187e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.609, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.09, algorithmic cost ~ 290, 2-norm = 10 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(944), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.326942058078918e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.09, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.152, algorithmic cost ~ 657, 2-norm = 21 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.152, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.046, algorithmic cost ~ 2000, 2-norm = 42 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.046, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.032, algorithmic cost ~ 6514, 2-norm = 85 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1104), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.369659065698222e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(85), + log2_p_fail: -64.032, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.679, algorithmic cost ~ 67, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.679, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.331, algorithmic cost ~ 82, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(906), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0261593945208966e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.331, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.107, algorithmic cost ~ 217, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(912), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.252442079345288e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.107, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.367, algorithmic cost ~ 657, 2-norm = 9 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.367, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.042, algorithmic cost ~ 1540, 2-norm = 18 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1080), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.098233986495092e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.042, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.057, algorithmic cost ~ 5769, 2-norm = 36 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1114), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8356668849263424e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(36), + log2_p_fail: -64.057, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.48, algorithmic cost ~ 82, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(906), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0261593945208966e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.48, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.164, algorithmic cost ~ 188, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(958), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.1838385960350906e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.164, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.406, algorithmic cost ~ 657, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.406, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.039, algorithmic cost ~ 1503, 2-norm = 8 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1054), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.984352743330102e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.039, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.041, algorithmic cost ~ 4755, 2-norm = 17 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1116), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.7394858488703536e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -64.041, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.373, algorithmic cost ~ 186, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.373, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.413, algorithmic cost ~ 657, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.413, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.087, algorithmic cost ~ 1500, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.087, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.055, algorithmic cost ~ 4665, 2-norm = 8 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1112), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.935224755982453e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.055, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.415, algorithmic cost ~ 657, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.415, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.17, algorithmic cost ~ 1500, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.17, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.048, algorithmic cost ~ 4657, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1110), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.038278019865525e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.048, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.191, algorithmic cost ~ 1500, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.191, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.001, algorithmic cost ~ 3604, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1122), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.470077677912143e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.001, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.058, algorithmic cost ~ 3572, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1112), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.935224755982453e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(256), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.058, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +pub const ALL_V0_11_MULTI_BIT_PARAMETER_2_VEC: [MultiBitPBSParameters; 36] = [ + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, +]; // p-fail = 2^-66.117, algorithmic cost ~ 44, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(696), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.8437982930180355e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -66.117, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.641, algorithmic cost ~ 60, 2-norm = 3 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(747), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5944604865450687e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.641, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.341, algorithmic cost ~ 69, 2-norm = 7 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.341, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.242, algorithmic cost ~ 86, 2-norm = 15 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(876), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.7218966356934023e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.242, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.283, algorithmic cost ~ 286, 2-norm = 31 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(945), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.235822292396081e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.283, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.358, algorithmic cost ~ 649, 2-norm = 63 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(990), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.408776579232607e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.358, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.154, algorithmic cost ~ 2001, 2-norm = 127 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1071), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.954666448055802e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.154, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.013, algorithmic cost ~ 7527, 2-norm = 255 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1104), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.369659065698222e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(7), + pbs_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(128), + max_noise_level: MaxNoiseLevel::new(255), + log2_p_fail: -64.013, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.399, algorithmic cost ~ 50, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(741), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.768366225294279e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.399, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.659, algorithmic cost ~ 69, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.659, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.256, algorithmic cost ~ 78, 2-norm = 5 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(909), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.743962418842052e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.256, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.324, algorithmic cost ~ 286, 2-norm = 10 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(945), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.235822292396081e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.324, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.179, algorithmic cost ~ 641, 2-norm = 21 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.179, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.144, algorithmic cost ~ 1967, 2-norm = 42 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.144, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.061, algorithmic cost ~ 6417, 2-norm = 85 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1104), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.369659065698222e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(8), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(85), + log2_p_fail: -64.061, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.68, algorithmic cost ~ 69, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.68, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.327, algorithmic cost ~ 78, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(906), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0261593945208966e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.327, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.008, algorithmic cost ~ 211, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(930), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.782362904013915e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.008, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.372, algorithmic cost ~ 641, 2-norm = 9 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.372, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.025, algorithmic cost ~ 1487, 2-norm = 18 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1080), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.098233986495092e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.025, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.033, algorithmic cost ~ 5666, 2-norm = 36 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1113), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8850164020946995e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(8), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(36), + log2_p_fail: -64.033, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.479, algorithmic cost ~ 78, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(906), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0261593945208966e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.479, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.189, algorithmic cost ~ 178, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(960), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.041929850336937e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.189, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.407, algorithmic cost ~ 641, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.407, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.292, algorithmic cost ~ 1454, 2-norm = 8 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1056), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.713536970443607e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.292, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.052, algorithmic cost ~ 4646, 2-norm = 17 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1119), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.60129637762614e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -64.052, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.32, algorithmic cost ~ 176, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.32, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.414, algorithmic cost ~ 641, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(978), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.962875621642539e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.414, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.231, algorithmic cost ~ 1450, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.231, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.073, algorithmic cost ~ 4548, 2-norm = 8 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1113), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8850164020946995e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.073, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.028, algorithmic cost ~ 472, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(981), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8134175707144757e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(10), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.028, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.315, algorithmic cost ~ 1450, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.315, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.045, algorithmic cost ~ 4536, 2-norm = 4 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1110), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.038278019865525e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.045, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.336, algorithmic cost ~ 1450, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.336, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.059, algorithmic cost ~ 3512, 2-norm = 2 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1116), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.7394858488703536e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.059, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.08, algorithmic cost ~ 3429, 2-norm = 1 +pub const V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1113), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8850164020946995e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(256), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.08, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +pub const ALL_V0_11_MULTI_BIT_PARAMETER_3_VEC: [MultiBitPBSParameters; 36] = [ + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, ]; diff --git a/tfhe/src/shortint/parameters/parameters_wopbs.rs b/tfhe/src/shortint/parameters/parameters_wopbs.rs index 5f55d160ff..f16cab4551 100644 --- a/tfhe/src/shortint/parameters/parameters_wopbs.rs +++ b/tfhe/src/shortint/parameters/parameters_wopbs.rs @@ -40,76 +40,76 @@ pub struct WopbsParameters { } pub const ALL_PARAMETER_VEC_WOPBS: [WopbsParameters; 72] = [ - WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, - WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, - WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS, + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS, ]; diff --git a/tfhe/src/shortint/parameters/parameters_wopbs_message_carry.rs b/tfhe/src/shortint/parameters/parameters_wopbs_message_carry.rs index f6f5467263..d4192994bd 100644 --- a/tfhe/src/shortint/parameters/parameters_wopbs_message_carry.rs +++ b/tfhe/src/shortint/parameters/parameters_wopbs_message_carry.rs @@ -10,7 +10,7 @@ use crate::shortint::parameters::{ // These parameters have security between 123 and 128 bits -pub const WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -36,7 +36,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_5_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -62,7 +62,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_6_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -88,7 +88,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_7_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -114,7 +114,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_4_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_8_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_8_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -140,7 +140,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_8_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -166,7 +166,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(498), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -192,7 +192,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(653), glwe_dimension: GlweDimension(1), polynomial_size: PolynomialSize(2048), @@ -218,7 +218,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(487), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -244,7 +244,7 @@ pub const WOPBS_PARAM_MESSAGE_1_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -270,7 +270,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_4_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -296,7 +296,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_5_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -322,7 +322,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_6_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_7_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_7_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -348,7 +348,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_7_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -374,7 +374,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(500), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -400,7 +400,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(769), glwe_dimension: GlweDimension(1), polynomial_size: PolynomialSize(2048), @@ -426,7 +426,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(487), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -452,7 +452,7 @@ pub const WOPBS_PARAM_MESSAGE_2_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -478,7 +478,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_4_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -504,7 +504,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_5_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(873), glwe_dimension: GlweDimension(1), polynomial_size: PolynomialSize(2048), @@ -530,7 +530,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -556,7 +556,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_6_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -582,7 +582,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(486), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -608,7 +608,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(487), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -634,7 +634,7 @@ pub const WOPBS_PARAM_MESSAGE_3_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(953), glwe_dimension: GlweDimension(1), polynomial_size: PolynomialSize(2048), @@ -660,7 +660,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -686,7 +686,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -712,7 +712,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_5_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -738,7 +738,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(486), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -764,7 +764,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(486), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -790,7 +790,7 @@ pub const WOPBS_PARAM_MESSAGE_4_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -816,7 +816,7 @@ pub const WOPBS_PARAM_MESSAGE_5_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_5_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -842,7 +842,7 @@ pub const WOPBS_PARAM_MESSAGE_5_CARRY_4_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -868,7 +868,7 @@ pub const WOPBS_PARAM_MESSAGE_5_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -894,7 +894,7 @@ pub const WOPBS_PARAM_MESSAGE_5_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(486), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -920,7 +920,7 @@ pub const WOPBS_PARAM_MESSAGE_5_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_6_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -946,7 +946,7 @@ pub const WOPBS_PARAM_MESSAGE_6_CARRY_3_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -972,7 +972,7 @@ pub const WOPBS_PARAM_MESSAGE_6_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -998,7 +998,7 @@ pub const WOPBS_PARAM_MESSAGE_6_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(486), glwe_dimension: GlweDimension(3), polynomial_size: PolynomialSize(512), @@ -1024,7 +1024,7 @@ pub const WOPBS_PARAM_MESSAGE_6_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_7_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(481), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -1050,7 +1050,7 @@ pub const WOPBS_PARAM_MESSAGE_7_CARRY_2_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -1076,7 +1076,7 @@ pub const WOPBS_PARAM_MESSAGE_7_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -1102,7 +1102,7 @@ pub const WOPBS_PARAM_MESSAGE_7_CARRY_0_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_8_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_8_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(493), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), @@ -1128,7 +1128,7 @@ pub const WOPBS_PARAM_MESSAGE_8_CARRY_1_KS_PBS: WopbsParameters = WopbsParameter ciphertext_modulus: CiphertextModulus::new_native(), encryption_key_choice: EncryptionKeyChoice::Big, }; -pub const WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { +pub const LEGACY_WOPBS_PARAM_MESSAGE_8_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { lwe_dimension: LweDimension(497), glwe_dimension: GlweDimension(2), polynomial_size: PolynomialSize(1024), diff --git a/tfhe/src/shortint/parameters/parameters_wopbs_only.rs b/tfhe/src/shortint/parameters/parameters_wopbs_only.rs index 10261bcdf6..26be1b6302 100644 --- a/tfhe/src/shortint/parameters/parameters_wopbs_only.rs +++ b/tfhe/src/shortint/parameters/parameters_wopbs_only.rs @@ -8,939 +8,975 @@ use crate::shortint::parameters::{ CarryModulus, CiphertextModulus, EncryptionKeyChoice, MessageModulus, }; -pub const WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(637), - glwe_dimension: GlweDimension(4), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 6.27510880527384e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(6), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(1), - cbs_base_log: DecompositionBaseLog(11), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(637), - glwe_dimension: GlweDimension(4), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 6.27510880527384e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(6), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(1), - cbs_base_log: DecompositionBaseLog(11), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(8), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(16), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(32), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(64), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(2), - carry_modulus: CarryModulus(128), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(637), - glwe_dimension: GlweDimension(4), - polynomial_size: PolynomialSize(512), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 6.27510880527384e-05, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(16), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(6), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(1), - cbs_base_log: DecompositionBaseLog(11), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(8), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(16), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(32), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(4), - carry_modulus: CarryModulus(64), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(8), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(16), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(8), - carry_modulus: CarryModulus(32), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(589), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00015133150634020836, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(15), - pbs_level: DecompositionLevelCount(2), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(1), - pfks_base_log: DecompositionBaseLog(25), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(7), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(8), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(16), - carry_modulus: CarryModulus(16), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(32), - carry_modulus: CarryModulus(8), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(64), - carry_modulus: CarryModulus(4), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(128), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(128), - carry_modulus: CarryModulus(2), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; -pub const WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS: WopbsParameters = WopbsParameters { - lwe_dimension: LweDimension(568), - glwe_dimension: GlweDimension(2), - polynomial_size: PolynomialSize(1024), - lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 0.00022310338140366212, - )), - glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - pbs_base_log: DecompositionBaseLog(9), - pbs_level: DecompositionLevelCount(4), - ks_level: DecompositionLevelCount(5), - ks_base_log: DecompositionBaseLog(2), - pfks_level: DecompositionLevelCount(2), - pfks_base_log: DecompositionBaseLog(17), - pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( - 3.162026630747649e-16, - )), - cbs_level: DecompositionLevelCount(2), - cbs_base_log: DecompositionBaseLog(9), - message_modulus: MessageModulus(256), - carry_modulus: CarryModulus(1), - ciphertext_modulus: CiphertextModulus::new_native(), - encryption_key_choice: EncryptionKeyChoice::Big, -}; +pub const LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(637), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.27510880527384e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(6), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(1), + cbs_base_log: DecompositionBaseLog(11), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(637), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.27510880527384e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(6), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(1), + cbs_base_log: DecompositionBaseLog(11), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_1_CARRY_3_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_4_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_5_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_6_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_1_CARRY_7_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(128), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_2_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(637), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.27510880527384e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(6), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(1), + cbs_base_log: DecompositionBaseLog(11), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_3_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_4_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_5_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_2_CARRY_6_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(64), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_3_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_4_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_5_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(32), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_4_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(589), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00015133150634020836, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(1), + pfks_base_log: DecompositionBaseLog(25), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(7), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_3_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_5_CARRY_3_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(8), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_6_CARRY_2_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_7_CARRY_1_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(2), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_8_CARRY_0_KS_PBS: WopbsParameters = + WopbsParameters { + lwe_dimension: LweDimension(568), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 0.00022310338140366212, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + pfks_level: DecompositionLevelCount(2), + pfks_base_log: DecompositionBaseLog(17), + pfks_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.162026630747649e-16, + )), + cbs_level: DecompositionLevelCount(2), + cbs_base_log: DecompositionBaseLog(9), + message_modulus: MessageModulus(256), + carry_modulus: CarryModulus(1), + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/mod.rs new file mode 100644 index 0000000000..55c2d9ab42 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/mod.rs @@ -0,0 +1 @@ +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..004a2412ea --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,831 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; +// p-fail = 2^-64.093, algorithmic cost ~ 43, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_1_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(684), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.7280002450549286e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.339775301998614e-07, + )), + pbs_base_log: DecompositionBaseLog(7), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.093, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3 +pub const V0_10_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(781), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.868480365938865e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.01, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.415, algorithmic cost ~ 76, 2-norm = 7 +pub const V0_10_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.415, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.088, algorithmic cost ~ 109, 2-norm = 15 +pub const V0_10_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(859), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.3088161607134664e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.088, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.069, algorithmic cost ~ 362, 2-norm = 31 +pub const V0_10_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(902), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0994794733558207e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.069, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.068, algorithmic cost ~ 836, 2-norm = 63 +pub const V0_10_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(981), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8134175707144757e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.068, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.054, algorithmic cost ~ 2522, 2-norm = 127 +pub const V0_10_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1054), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.984352743330102e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.054, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.02, algorithmic cost ~ 8616, 2-norm = 255 +pub const V0_10_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1114), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8356668849263424e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(7), + pbs_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(128), + max_noise_level: MaxNoiseLevel::new(255), + log2_p_fail: -64.02, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.017, algorithmic cost ~ 60, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_2_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(781), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.868480365938865e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.017, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.176, algorithmic cost ~ 76, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(857), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.389876747499049e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.176, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.074, algorithmic cost ~ 106, 2-norm = 5 +pub const V0_10_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(834), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.5539902359442825e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.074, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.084, algorithmic cost ~ 362, 2-norm = 10 +pub const V0_10_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(902), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0994794733558207e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.084, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.078, algorithmic cost ~ 833, 2-norm = 21 +pub const V0_10_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.078, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.058, algorithmic cost ~ 2517, 2-norm = 42 +pub const V0_10_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(12), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.058, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.001, algorithmic cost ~ 7229, 2-norm = 85 +pub const V0_10_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1114), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8356668849263424e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(85), + log2_p_fail: -64.001, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.193, algorithmic cost ~ 76, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_3_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(857), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.389876747499049e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.193, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.346, algorithmic cost ~ 106, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(833), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.6158408373309336e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.346, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.064, algorithmic cost ~ 260, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(935), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.221794297398788e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.064, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.122, algorithmic cost ~ 833, 2-norm = 9 +pub const V0_10_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.122, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.037, algorithmic cost ~ 1947, 2-norm = 18 +pub const V0_10_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1061), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.07600596055958e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.037, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.0, algorithmic cost ~ 6009, 2-norm = 36 +pub const V0_10_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1118), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.6465671112690942e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(36), + log2_p_fail: -64.0, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.454, algorithmic cost ~ 106, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_4_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(833), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.6158408373309336e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.454, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.071, algorithmic cost ~ 250, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(954), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.482777900525027e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.071, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.182, algorithmic cost ~ 833, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.182, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.099, algorithmic cost ~ 1933, 2-norm = 8 +pub const V0_10_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.099, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.033, algorithmic cost ~ 5904, 2-norm = 17 +pub const V0_10_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1112), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.935224755982453e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -64.033, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.068, algorithmic cost ~ 248, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_5_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(946), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.146261171730886e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.068, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.185, algorithmic cost ~ 833, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.185, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.137, algorithmic cost ~ 1931, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.137, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.004, algorithmic cost ~ 5888, 2-norm = 8 +pub const V0_10_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1109), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0911536076507566e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.004, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.034, algorithmic cost ~ 609, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_6_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1005), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.859518030726978e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.034, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.031, algorithmic cost ~ 1929, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1051), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.40850798120231e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.031, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.007, algorithmic cost ~ 5390, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1111), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.986306893048107e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.007, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.032, algorithmic cost ~ 1929, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_7_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1051), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.40850798120231e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.032, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.017, algorithmic cost ~ 4609, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1116), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.7394858488703536e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.017, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.011, algorithmic cost ~ 4584, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_8_CARRY_0_COMPACT_PK_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1110), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.038278019865525e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(256), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.011, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..4e3b5c5315 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/mod.rs @@ -0,0 +1,2 @@ +pub mod ks_pbs; +pub mod pbs_ks; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs new file mode 100644 index 0000000000..5b97ad9250 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs @@ -0,0 +1,95 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; +// p-fail = 2^-66.538, algorithmic cost ~ 74, 2-norm = 3 +pub const V0_10_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1024), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.339775301998614e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(26), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(8), + ks_level: DecompositionLevelCount(2), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -66.538, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-68.803, algorithmic cost ~ 130, 2-norm = 5 +pub const V0_10_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1024), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.339775301998614e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -68.803, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-87.969, algorithmic cost ~ 3355, 2-norm = 9 +pub const V0_10_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(2048), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(20), + ks_level: DecompositionLevelCount(1), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -87.969, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-134.119, algorithmic cost ~ 20401, 2-norm = 17 +pub const V0_10_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(2048), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(65536), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(13), + ks_level: DecompositionLevelCount(2), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -134.119, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/mod.rs new file mode 100644 index 0000000000..1e195d938e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/compact_pk/mod.rs @@ -0,0 +1 @@ +pub mod gaussian; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/gaussian/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/mod.rs new file mode 100644 index 0000000000..55c2d9ab42 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/mod.rs @@ -0,0 +1 @@ +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..dda276e7ba --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,869 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; +// p-fail = 2^-64.612, algorithmic cost ~ 39, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(720), + glwe_dimension: GlweDimension(6), + polynomial_size: PolynomialSize(256), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.540544392252957e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(17), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.612, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3 +pub const V0_10_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(781), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.868480365938865e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.01, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.415, algorithmic cost ~ 76, 2-norm = 7 +pub const V0_10_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(858), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.348996819227123e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.415, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.088, algorithmic cost ~ 109, 2-norm = 15 +pub const V0_10_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(859), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.3088161607134664e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.088, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.069, algorithmic cost ~ 362, 2-norm = 31 +pub const V0_10_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(902), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0994794733558207e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.069, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.068, algorithmic cost ~ 836, 2-norm = 63 +pub const V0_10_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(981), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8134175707144757e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.068, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.054, algorithmic cost ~ 2522, 2-norm = 127 +pub const V0_10_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1054), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.984352743330102e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.054, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.02, algorithmic cost ~ 8616, 2-norm = 255 +pub const V0_10_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1114), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8356668849263424e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(7), + pbs_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(128), + max_noise_level: MaxNoiseLevel::new(255), + log2_p_fail: -64.02, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.023, algorithmic cost ~ 45, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(775), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.83575402535913e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(17), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.023, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.176, algorithmic cost ~ 76, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(857), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.389876747499049e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.176, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.074, algorithmic cost ~ 106, 2-norm = 5 +pub const V0_10_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(834), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.5539902359442825e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.074, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.084, algorithmic cost ~ 362, 2-norm = 10 +pub const V0_10_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(902), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.0994794733558207e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.084, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.078, algorithmic cost ~ 833, 2-norm = 21 +pub const V0_10_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.078, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.058, algorithmic cost ~ 2517, 2-norm = 42 +pub const V0_10_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(12), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.058, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.001, algorithmic cost ~ 7229, 2-norm = 85 +pub const V0_10_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1114), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.8356668849263424e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(9), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(85), + log2_p_fail: -64.001, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.193, algorithmic cost ~ 76, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(857), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.389876747499049e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.193, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.346, algorithmic cost ~ 106, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(833), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.6158408373309336e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.346, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.064, algorithmic cost ~ 260, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(935), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 6.221794297398788e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.064, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.122, algorithmic cost ~ 833, 2-norm = 9 +pub const V0_10_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.122, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.037, algorithmic cost ~ 1947, 2-norm = 18 +pub const V0_10_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1061), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.07600596055958e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.037, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.0, algorithmic cost ~ 6009, 2-norm = 36 +pub const V0_10_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1118), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.6465671112690942e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(36), + log2_p_fail: -64.0, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.454, algorithmic cost ~ 106, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(833), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.6158408373309336e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.454, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.071, algorithmic cost ~ 250, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(954), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.482777900525027e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.071, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.182, algorithmic cost ~ 833, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.182, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.099, algorithmic cost ~ 1933, 2-norm = 8 +pub const V0_10_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1053), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.123305578333294e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.099, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.033, algorithmic cost ~ 5904, 2-norm = 17 +pub const V0_10_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1112), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.935224755982453e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -64.033, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.068, algorithmic cost ~ 248, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(946), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.146261171730886e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.068, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.185, algorithmic cost ~ 833, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(977), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0144389706858286e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.185, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.137, algorithmic cost ~ 1931, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1052), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.264676629436917e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.137, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.004, algorithmic cost ~ 5888, 2-norm = 8 +pub const V0_10_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1109), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.0911536076507566e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.004, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.034, algorithmic cost ~ 609, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1005), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.859518030726978e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.034, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.031, algorithmic cost ~ 1929, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1051), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.40850798120231e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.031, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.007, algorithmic cost ~ 5390, 2-norm = 4 +pub const V0_10_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1111), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.986306893048107e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(22), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.007, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.032, algorithmic cost ~ 1929, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1051), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 8.40850798120231e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.032, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.017, algorithmic cost ~ 4609, 2-norm = 2 +pub const V0_10_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1116), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.7394858488703536e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.017, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +// p-fail = 2^-64.011, algorithmic cost ~ 4584, 2-norm = 1 +pub const V0_10_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1110), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(32768), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.038278019865525e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(11), + message_modulus: MessageModulus(256), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.011, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; +pub const WITH_CARRY_PARAMETERS_VEC: [ClassicPBSParameters; 36] = [ + V0_10_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64, +]; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..4e3b5c5315 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/mod.rs @@ -0,0 +1,2 @@ +pub mod ks_pbs; +pub mod pbs_ks; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs new file mode 100644 index 0000000000..25d231ab98 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/gaussian/p_fail_2_minus_64/pbs_ks.rs @@ -0,0 +1,101 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::{CarryModulus, ClassicPBSParameters, MessageModulus}; +// p-fail = 2^-64.05, algorithmic cost ~ 67, 2-norm = 3 +pub const V0_10_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(884), + glwe_dimension: GlweDimension(4), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.4999005934396873e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.05, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-64.107, algorithmic cost ~ 124, 2-norm = 5 +pub const V0_10_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(944), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 5.326942058078918e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(23), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.107, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-64.007, algorithmic cost ~ 1066, 2-norm = 9 +pub const V0_10_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1121), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.5130647937194597e-08, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(12), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.007, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +// p-fail = 2^-64.507, algorithmic cost ~ 13479, 2-norm = 17 +pub const V0_10_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(1254), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(65536), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.532938831904281e-09, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(8), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(17), + log2_p_fail: -64.507, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Small, + }; +pub const V0_10_WITH_CARRY_PARAMETERS_VEC_PBS_KS: [ClassicPBSParameters; 4] = [ + V0_10_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64, + V0_10_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64, +]; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/mod.rs new file mode 100644 index 0000000000..6a760df77f --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/mod.rs @@ -0,0 +1,3 @@ +pub mod compact_pk; +pub mod gaussian; +pub mod tuniform; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/tuniform/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/mod.rs new file mode 100644 index 0000000000..55c2d9ab42 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/mod.rs @@ -0,0 +1 @@ +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..639a94a273 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,22 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::{CarryModulus, ClassicPBSParameters, MaxNoiseLevel, MessageModulus}; + +// security = 132 bits, p-fail = 2^-64.138, algorithmic cost ~ 113, 2-norm = 5 +pub const V0_10_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: ClassicPBSParameters = + ClassicPBSParameters { + lwe_dimension: LweDimension(887), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_t_uniform(46), + glwe_noise_distribution: DynamicDistribution::new_t_uniform(17), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.138, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + }; diff --git a/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..cf32dbe64e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/classic/tuniform/p_fail_2_minus_64/mod.rs @@ -0,0 +1 @@ +pub mod ks_pbs; diff --git a/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/mod.rs b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/mod.rs new file mode 100644 index 0000000000..55c2d9ab42 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/mod.rs @@ -0,0 +1 @@ +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..d83f0e3aef --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,19 @@ +use crate::core_crypto::commons::parameters::{ + CiphertextModulus, DynamicDistribution, LweDimension, +}; +use crate::shortint::parameters::{ + CarryModulus, CompactCiphertextListExpansionKind, CompactPublicKeyEncryptionParameters, + MessageModulus, +}; + +/// This legacy parameter set were used with the v1 pke zk scheme on TFHE-rs v0.10 and lower +pub const V0_10_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1: + CompactPublicKeyEncryptionParameters = CompactPublicKeyEncryptionParameters { + encryption_lwe_dimension: LweDimension(1024), + encryption_noise_distribution: DynamicDistribution::new_t_uniform(42), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + ciphertext_modulus: CiphertextModulus::new_native(), + expansion_kind: CompactCiphertextListExpansionKind::RequiresCasting, +} +.validate(); diff --git a/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..cf32dbe64e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/compact_public_key_only/p_fail_2_minus_64/mod.rs @@ -0,0 +1 @@ +pub mod ks_pbs; diff --git a/tfhe/src/shortint/parameters/v0_10/key_switching/mod.rs b/tfhe/src/shortint/parameters/v0_10/key_switching/mod.rs new file mode 100644 index 0000000000..55c2d9ab42 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/key_switching/mod.rs @@ -0,0 +1 @@ +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..e0d12960e7 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,22 @@ +use crate::shortint::parameters::{ + DecompositionBaseLog, DecompositionLevelCount, EncryptionKeyChoice, + ShortintKeySwitchingParameters, +}; + +pub const V0_10_PARAM_KEYSWITCH_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: + ShortintKeySwitchingParameters = + V0_10_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; + +pub const V0_10_PARAM_KEYSWITCH_PKE_TO_SMALL_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: + ShortintKeySwitchingParameters = ShortintKeySwitchingParameters { + ks_level: DecompositionLevelCount(5), + ks_base_log: DecompositionBaseLog(3), + destination_key: EncryptionKeyChoice::Small, +}; + +pub const V0_10_PARAM_KEYSWITCH_PKE_TO_BIG_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: + ShortintKeySwitchingParameters = ShortintKeySwitchingParameters { + ks_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(27), + destination_key: EncryptionKeyChoice::Big, +}; diff --git a/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..cf32dbe64e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/key_switching/p_fail_2_minus_64/mod.rs @@ -0,0 +1 @@ +pub mod ks_pbs; diff --git a/tfhe/src/shortint/parameters/v0_10/mod.rs b/tfhe/src/shortint/parameters/v0_10/mod.rs new file mode 100644 index 0000000000..94ce0d066b --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/mod.rs @@ -0,0 +1,8 @@ +//! FHE Parameters as they were defined in TFHE-rs 0.10 and before. +//! +//! These parameters may be used for backward compatibility. + +pub mod classic; +pub mod compact_public_key_only; +pub mod key_switching; +pub mod multi_bit; diff --git a/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/mod.rs b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/mod.rs new file mode 100644 index 0000000000..dfeb25959b --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/mod.rs @@ -0,0 +1,3 @@ +//! #Warning experimental + +pub mod p_fail_2_minus_64; diff --git a/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs new file mode 100644 index 0000000000..c797f7796c --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/ks_pbs.rs @@ -0,0 +1,1464 @@ +use crate::core_crypto::prelude::*; +use crate::shortint::ciphertext::MaxNoiseLevel; +use crate::shortint::parameters::{CarryModulus, MessageModulus}; +use crate::shortint::MultiBitPBSParameters; + +// p-fail = 2^-65.348, algorithmic cost ~ 41, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(700), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.58747009344789e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -65.348, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.263, algorithmic cost ~ 59, 2-norm = 3 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(750), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5140301927925663e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.263, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.119, algorithmic cost ~ 68, 2-norm = 7 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(862), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.192351209970737e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.119, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.871, algorithmic cost ~ 127, 2-norm = 15 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(840), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.2044815829012556e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.871, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.172, algorithmic cost ~ 292, 2-norm = 31 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(950), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.803076706754256e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.172, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.06, algorithmic cost ~ 887, 2-norm = 63 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.06, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.03, algorithmic cost ~ 2853, 2-norm = 127 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1018), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.4859028577569142e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(8), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.03, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.171, algorithmic cost ~ 49, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(766), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.1488024017979662e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.171, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.615, algorithmic cost ~ 67, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(860), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.269322810630956e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.615, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.442, algorithmic cost ~ 84, 2-norm = 5 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(888), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.3998779623487315e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.442, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.099, algorithmic cost ~ 291, 2-norm = 10 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.099, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.298, algorithmic cost ~ 665, 2-norm = 21 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(990), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.408776579232607e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.298, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.168, algorithmic cost ~ 2408, 2-norm = 42 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1020), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.4355035400171204e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(11), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.168, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.709, algorithmic cost ~ 67, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(860), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.269322810630956e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(22), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.709, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.253, algorithmic cost ~ 82, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(910), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.577287511785255e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.253, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.115, algorithmic cost ~ 291, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.115, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.02, algorithmic cost ~ 661, 2-norm = 9 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.02, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.111, algorithmic cost ~ 2365, 2-norm = 18 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1016), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5380716530060473e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.111, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.305, algorithmic cost ~ 82, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(908), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.913537993191986e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.305, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.085, algorithmic cost ~ 220, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(926), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 7.266969277511613e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(9), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.085, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.178, algorithmic cost ~ 661, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.178, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.259, algorithmic cost ~ 2365, 2-norm = 8 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1016), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5380716530060473e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.259, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.126, algorithmic cost ~ 189, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(962), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.9048344098472363e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.126, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.207, algorithmic cost ~ 661, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.207, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.114, algorithmic cost ~ 1886, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1018), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.4859028577569142e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.114, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.214, algorithmic cost ~ 661, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.214, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.16, algorithmic cost ~ 1882, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1016), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5380716530060473e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.16, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +// p-fail = 2^-64.261, algorithmic cost ~ 1882, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1016), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5380716530060473e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(20), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.261, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(2), + deterministic_execution: false, +}; +pub const ALL_V0_10_MULTI_BIT_PARAMETER_2_VEC: [MultiBitPBSParameters; 28] = [ + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_2_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, +]; // p-fail = 2^-67.438, algorithmic cost ~ 45, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(702), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.4657891610923056e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -67.438, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.086, algorithmic cost ~ 61, 2-norm = 3 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(750), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.5140301927925663e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(20), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(3), + log2_p_fail: -64.086, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.377, algorithmic cost ~ 70, 2-norm = 7 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(864), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.117990356129097e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(7), + log2_p_fail: -64.377, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.87, algorithmic cost ~ 127, 2-norm = 15 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(840), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.2044815829012556e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(5), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(15), + log2_p_fail: -64.87, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.453, algorithmic cost ~ 288, 2-norm = 31 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(951), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.7209178960699193e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(31), + log2_p_fail: -64.453, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.606, algorithmic cost ~ 884, 2-norm = 63 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(987), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.5367387617400005e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(63), + log2_p_fail: -64.606, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.101, algorithmic cost ~ 3855, 2-norm = 127 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(6), + pbs_level: DecompositionLevelCount(6), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(2), + carry_modulus: CarryModulus(64), + max_noise_level: MaxNoiseLevel::new(127), + log2_p_fail: -64.101, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.031, algorithmic cost ~ 58, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(765), + glwe_dimension: GlweDimension(3), + polynomial_size: PolynomialSize(512), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.1687951746275051e-05, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.9524392655548086e-11, + )), + pbs_base_log: DecompositionBaseLog(16), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(2), + ks_level: DecompositionLevelCount(7), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.031, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-65.038, algorithmic cost ~ 70, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(861), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.230505012256408e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -65.038, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.442, algorithmic cost ~ 80, 2-norm = 5 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(891), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.3292631075564801e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(5), + log2_p_fail: -64.442, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.086, algorithmic cost ~ 287, 2-norm = 10 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(10), + log2_p_fail: -64.086, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.068, algorithmic cost ~ 653, 2-norm = 21 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(996), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.1718912188918548e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(21), + log2_p_fail: -64.068, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.064, algorithmic cost ~ 2859, 2-norm = 42 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(8), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(4), + carry_modulus: CarryModulus(32), + max_noise_level: MaxNoiseLevel::new(42), + log2_p_fail: -64.064, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.73, algorithmic cost ~ 70, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(861), + glwe_dimension: GlweDimension(2), + polynomial_size: PolynomialSize(1024), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.230505012256408e-06, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(19), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.73, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.769, algorithmic cost ~ 78, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(912), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.252442079345288e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.769, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.113, algorithmic cost ~ 287, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.113, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.437, algorithmic cost ~ 647, 2-norm = 9 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(987), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.5367387617400005e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(9), + log2_p_fail: -64.437, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.139, algorithmic cost ~ 2859, 2-norm = 18 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(8), + pbs_level: DecompositionLevelCount(4), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(8), + carry_modulus: CarryModulus(16), + max_noise_level: MaxNoiseLevel::new(18), + log2_p_fail: -64.139, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.351, algorithmic cost ~ 78, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(909), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(2048), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 9.743962418842052e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.845267479601915e-15, + )), + pbs_base_log: DecompositionBaseLog(20), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(5), + ks_level: DecompositionLevelCount(3), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.351, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.117, algorithmic cost ~ 287, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(948), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 4.971708676181112e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.117, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.138, algorithmic cost ~ 645, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.138, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.111, algorithmic cost ~ 2360, 2-norm = 8 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(16), + carry_modulus: CarryModulus(8), + max_noise_level: MaxNoiseLevel::new(8), + log2_p_fail: -64.111, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.194, algorithmic cost ~ 181, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(972), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(4096), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 3.286032625627172e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(21), + pbs_level: DecompositionLevelCount(1), + ks_base_log: DecompositionBaseLog(4), + ks_level: DecompositionLevelCount(4), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.194, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.146, algorithmic cost ~ 645, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(15), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.146, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.145, algorithmic cost ~ 2360, 2-norm = 4 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(32), + carry_modulus: CarryModulus(4), + max_noise_level: MaxNoiseLevel::new(4), + log2_p_fail: -64.145, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.212, algorithmic cost ~ 645, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(984), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(8192), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.671498718807819e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(3), + ks_level: DecompositionLevelCount(6), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.212, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.153, algorithmic cost ~ 2360, 2-norm = 2 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(10), + pbs_level: DecompositionLevelCount(3), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(64), + carry_modulus: CarryModulus(2), + max_noise_level: MaxNoiseLevel::new(2), + log2_p_fail: -64.153, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +// p-fail = 2^-64.079, algorithmic cost ~ 1862, 2-norm = 1 +pub const V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64: + MultiBitPBSParameters = MultiBitPBSParameters { + lwe_dimension: LweDimension(1014), + glwe_dimension: GlweDimension(1), + polynomial_size: PolynomialSize(16384), + lwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 1.592072050626447e-07, + )), + glwe_noise_distribution: DynamicDistribution::new_gaussian_from_std_dev(StandardDev( + 2.168404344971009e-19, + )), + pbs_base_log: DecompositionBaseLog(14), + pbs_level: DecompositionLevelCount(2), + ks_base_log: DecompositionBaseLog(1), + ks_level: DecompositionLevelCount(21), + message_modulus: MessageModulus(128), + carry_modulus: CarryModulus(1), + max_noise_level: MaxNoiseLevel::new(1), + log2_p_fail: -64.079, + ciphertext_modulus: CiphertextModulus::new_native(), + encryption_key_choice: EncryptionKeyChoice::Big, + grouping_factor: LweBskGroupingFactor(3), + deterministic_execution: false, +}; +pub const ALL_V0_10_MULTI_BIT_PARAMETER_3_VEC: [MultiBitPBSParameters; 28] = [ + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_10_PARAM_MULTI_BIT_GROUP_3_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64, +]; diff --git a/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/mod.rs b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/mod.rs new file mode 100644 index 0000000000..cf32dbe64e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/multi_bit/gaussian/p_fail_2_minus_64/mod.rs @@ -0,0 +1 @@ +pub mod ks_pbs; diff --git a/tfhe/src/shortint/parameters/v0_10/multi_bit/mod.rs b/tfhe/src/shortint/parameters/v0_10/multi_bit/mod.rs new file mode 100644 index 0000000000..1e195d938e --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/multi_bit/mod.rs @@ -0,0 +1 @@ +pub mod gaussian; diff --git a/tfhe/src/shortint/server_key/add.rs b/tfhe/src/shortint/server_key/add.rs index 5b8524e76b..36c2882ee9 100644 --- a/tfhe/src/shortint/server_key/add.rs +++ b/tfhe/src/shortint/server_key/add.rs @@ -20,7 +20,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -39,7 +39,7 @@ impl ServerKey { /// let two = cks.decrypt(&ct_res); /// assert_eq!(msg + msg, two); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -75,7 +75,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -98,7 +98,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((msg2 + msg1) % modulus, two); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.unchecked_encrypt(msg1); @@ -144,7 +144,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -162,7 +162,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(msg1 + msg2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Same thing using the small key for encryption /// let msg1 = 1; @@ -195,7 +195,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -213,7 +213,7 @@ impl ServerKey { /// let two = cks.decrypt(&ct_left); /// assert_eq!(msg + msg, two); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct_left = cks.encrypt(msg); /// let ct_right = cks.encrypt(msg); @@ -239,7 +239,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -255,7 +255,7 @@ impl ServerKey { /// sks.is_add_possible(ct_left.noise_degree(), ct_right.noise_degree()) /// .unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg); @@ -287,7 +287,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -305,7 +305,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, msg + msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -337,7 +337,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -355,7 +355,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_left); /// assert_eq!(clear_res, msg + msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_left = cks.encrypt(msg); @@ -386,7 +386,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -405,7 +405,7 @@ impl ServerKey { /// let two = cks.decrypt(&ct_res); /// assert_eq!(msg + msg, two); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -451,7 +451,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -474,7 +474,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((msg2 + msg1) % modulus, two); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.unchecked_encrypt(msg1); diff --git a/tfhe/src/shortint/server_key/bitwise_op.rs b/tfhe/src/shortint/server_key/bitwise_op.rs index b361785e78..07aaa8b7c6 100644 --- a/tfhe/src/shortint/server_key/bitwise_op.rs +++ b/tfhe/src/shortint/server_key/bitwise_op.rs @@ -19,7 +19,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -38,7 +38,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(msg, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -74,7 +74,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -97,7 +97,7 @@ impl ServerKey { /// /// assert_eq!((msg2 & msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct1 = cks.unchecked_encrypt(msg1); /// let ct2 = cks.encrypt(msg2); @@ -136,7 +136,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -152,7 +152,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 & clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let ct_1 = cks.encrypt(clear_1); /// let ct_2 = cks.encrypt(clear_2); @@ -177,7 +177,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -193,7 +193,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_left); /// assert_eq!(clear_1 & clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct_left = cks.encrypt(clear_1); /// let ct_right = cks.encrypt(clear_2); @@ -219,7 +219,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -237,7 +237,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -273,7 +273,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -291,7 +291,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_left); /// assert_eq!(clear_res, msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_left = cks.encrypt(msg); @@ -326,7 +326,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -345,7 +345,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(msg, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -374,7 +374,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -397,7 +397,7 @@ impl ServerKey { /// /// assert_eq!((msg2 & msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct1 = cks.unchecked_encrypt(msg1); /// let mut ct2 = cks.encrypt(msg2); @@ -429,7 +429,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -448,7 +448,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -484,7 +484,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -507,7 +507,7 @@ impl ServerKey { /// /// assert_eq!((msg2 ^ msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct1 = cks.unchecked_encrypt(msg1); /// let ct2 = cks.encrypt(msg2); @@ -546,7 +546,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -563,7 +563,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 ^ clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(clear_1); @@ -589,7 +589,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -606,7 +606,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_left); /// assert_eq!(clear_1 ^ clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_left = cks.encrypt(clear_1); @@ -633,7 +633,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -651,7 +651,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, 0); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -686,7 +686,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -704,7 +704,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_left); /// assert_eq!(clear_res, 0); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_left = cks.encrypt(msg); @@ -739,7 +739,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -758,7 +758,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -787,7 +787,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -810,7 +810,7 @@ impl ServerKey { /// /// assert_eq!((msg2 ^ msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct1 = cks.unchecked_encrypt(msg1); /// let mut ct2 = cks.encrypt(msg2); @@ -842,7 +842,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -861,7 +861,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(msg, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -897,7 +897,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -920,7 +920,7 @@ impl ServerKey { /// /// assert_eq!((msg2 | msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let mut ct1 = cks.unchecked_encrypt(msg1); /// let ct2 = cks.encrypt(msg2); @@ -959,7 +959,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -977,7 +977,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_left | clear_right, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(clear_left); @@ -1003,7 +1003,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -1021,7 +1021,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_left); /// assert_eq!(clear_left | clear_right, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_left = cks.encrypt(clear_left); @@ -1048,7 +1048,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1066,7 +1066,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -1102,7 +1102,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1120,7 +1120,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_left); /// assert_eq!(clear_res, msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_left = cks.encrypt(msg); @@ -1155,7 +1155,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1174,7 +1174,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(msg, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -1203,7 +1203,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1226,7 +1226,7 @@ impl ServerKey { /// /// assert_eq!((msg2 | msg1) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.unchecked_encrypt(msg1); diff --git a/tfhe/src/shortint/server_key/comp_op.rs b/tfhe/src/shortint/server_key/comp_op.rs index 7af12dfc9e..0218b2856e 100644 --- a/tfhe/src/shortint/server_key/comp_op.rs +++ b/tfhe/src/shortint/server_key/comp_op.rs @@ -24,7 +24,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -43,7 +43,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -84,7 +84,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -102,7 +102,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!((msg_1 > msg_2) as u64, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -136,7 +136,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -153,7 +153,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 > msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -186,7 +186,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -205,7 +205,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -237,7 +237,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -256,7 +256,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -297,7 +297,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -315,7 +315,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!((msg_1 >= msg_2) as u64, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -352,7 +352,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -371,7 +371,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -401,7 +401,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -418,7 +418,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 >= msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -457,7 +457,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -476,7 +476,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -517,7 +517,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -536,7 +536,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!((msg_1 < msg_2) as u64, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -571,7 +571,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -588,7 +588,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 < msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -621,7 +621,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -640,7 +640,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -672,7 +672,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -691,7 +691,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -732,7 +732,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -750,7 +750,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!((msg_1 <= msg_2) as u64, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -788,7 +788,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -805,7 +805,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 <= msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -838,7 +838,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -857,7 +857,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -893,7 +893,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -912,7 +912,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -953,7 +953,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -971,7 +971,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, 1); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -1005,7 +1005,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1022,7 +1022,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 == msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -1055,7 +1055,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1074,7 +1074,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -1106,7 +1106,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1125,7 +1125,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct1 = cks.encrypt(msg); @@ -1166,7 +1166,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1184,7 +1184,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, 1); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_left = cks.encrypt(msg_1); @@ -1218,7 +1218,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1235,7 +1235,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&res); /// assert_eq!((msg_1 != msg_2) as u64, clear_res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.encrypt(msg_1); @@ -1268,7 +1268,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1287,7 +1287,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(0, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct1 = cks.encrypt(msg); @@ -1315,7 +1315,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1332,7 +1332,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 == scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); @@ -1370,7 +1370,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1387,7 +1387,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 != scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); @@ -1426,7 +1426,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1443,7 +1443,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 >= scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); @@ -1485,7 +1485,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1502,7 +1502,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 <= scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); @@ -1539,7 +1539,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1556,7 +1556,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 > scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); @@ -1592,7 +1592,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); @@ -1609,7 +1609,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(res, (msg_1 < scalar as u64) as u64); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt our message /// let mut ct_left = cks.encrypt(msg_1); diff --git a/tfhe/src/shortint/server_key/div_mod.rs b/tfhe/src/shortint/server_key/div_mod.rs index 86dbc86f65..13a8f780c5 100644 --- a/tfhe/src/shortint/server_key/div_mod.rs +++ b/tfhe/src/shortint/server_key/div_mod.rs @@ -23,7 +23,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -43,7 +43,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_1 = cks.encrypt(clear_1); @@ -84,7 +84,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -104,7 +104,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_1); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); @@ -148,7 +148,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -168,7 +168,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_1 = cks.encrypt(clear_1); @@ -201,7 +201,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -221,7 +221,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_1); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); @@ -255,7 +255,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -275,7 +275,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); @@ -309,7 +309,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -329,7 +329,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_1); /// assert_eq!(clear_1 / clear_2, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); diff --git a/tfhe/src/shortint/server_key/mod.rs b/tfhe/src/shortint/server_key/mod.rs index 49963536da..0fc59daeb2 100644 --- a/tfhe/src/shortint/server_key/mod.rs +++ b/tfhe/src/shortint/server_key/mod.rs @@ -690,7 +690,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// { @@ -719,7 +719,7 @@ impl ServerKey { /// } /// { /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let msg = 3; /// @@ -858,7 +858,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// { @@ -887,7 +887,7 @@ impl ServerKey { /// } /// { /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let msg = 3; /// diff --git a/tfhe/src/shortint/server_key/mul.rs b/tfhe/src/shortint/server_key/mul.rs index 580b31dc6c..606d6ebacd 100644 --- a/tfhe/src/shortint/server_key/mul.rs +++ b/tfhe/src/shortint/server_key/mul.rs @@ -17,7 +17,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -44,7 +44,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((clear_1 * clear_2) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_1 = cks.encrypt(clear_1); @@ -82,7 +82,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -103,7 +103,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((clear_1 * clear_2) % modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); @@ -143,7 +143,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -171,7 +171,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((clear_1 * clear_2) / modulus, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_1 = cks.encrypt(clear_1); @@ -256,7 +256,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -272,7 +272,7 @@ impl ServerKey { /// sks.is_mul_possible(ct_1.noise_degree(), ct_2.noise_degree()) /// .unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_1 = cks.encrypt(msg); @@ -303,7 +303,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -320,7 +320,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res % modulus, 2); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_1 = cks.encrypt(2); @@ -357,7 +357,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -374,7 +374,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res % modulus, 2); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.encrypt(2); @@ -410,7 +410,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -440,7 +440,7 @@ impl ServerKey { /// (msg_1 * msg_2) / cks.parameters.message_modulus().0 /// ); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_1 = cks.encrypt(msg_1); @@ -487,7 +487,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -507,7 +507,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!((clear_2 * clear_1), res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let ct_1 = cks.encrypt(clear_1); @@ -543,10 +543,10 @@ impl ServerKey { /// ///```rust /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// /// let msg = 2; /// @@ -607,7 +607,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -627,7 +627,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res % modulus, (msg_1 * msg_2) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_1 = cks.encrypt(msg_1); @@ -669,7 +669,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -701,7 +701,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, (msg1 * msg2) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.unchecked_encrypt(msg1); @@ -750,7 +750,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -782,7 +782,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, (msg1 * msg2) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_left = cks.unchecked_encrypt(msg1); @@ -831,11 +831,12 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// /// let msg1 = 5; /// let msg2 = 3; @@ -852,7 +853,7 @@ impl ServerKey { /// assert_eq!(res % modulus, (msg1 * msg2) % modulus); /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); @@ -908,11 +909,12 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// /// let msg1 = 5; /// let msg2 = 3; @@ -929,7 +931,7 @@ impl ServerKey { /// assert_eq!(res % modulus, (msg1 * msg2) % modulus); /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); @@ -966,7 +968,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -986,7 +988,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, ((msg1 * msg2) / modulus) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); @@ -1034,7 +1036,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1054,7 +1056,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, ((msg1 * msg2) / modulus) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let ct_1 = cks.unchecked_encrypt(msg1); @@ -1085,11 +1087,12 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + /// V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64); /// /// let msg1 = 5; /// let msg2 = 3; @@ -1106,7 +1109,7 @@ impl ServerKey { /// assert_eq!(res % modulus, (msg1 * msg2) % modulus); /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); @@ -1155,7 +1158,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1175,7 +1178,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, ((msg1 * msg2) / modulus) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); @@ -1206,7 +1209,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1238,7 +1241,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, (msg1 * msg2) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_left = cks.unchecked_encrypt(msg1); @@ -1298,7 +1301,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -1318,7 +1321,7 @@ impl ServerKey { /// let modulus = sks.message_modulus.0; /// assert_eq!(res, ((msg1 * msg2) / modulus) % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages: /// let mut ct_1 = cks.unchecked_encrypt(msg1); diff --git a/tfhe/src/shortint/server_key/neg.rs b/tfhe/src/shortint/server_key/neg.rs index 9e6017445e..c2e0977fe2 100644 --- a/tfhe/src/shortint/server_key/neg.rs +++ b/tfhe/src/shortint/server_key/neg.rs @@ -24,7 +24,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -43,7 +43,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -80,7 +80,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -99,7 +99,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -132,7 +132,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -151,7 +151,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(modulus - msg, three); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -185,7 +185,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -203,7 +203,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(modulus - msg, cks.decrypt(&ct)); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -251,7 +251,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -265,7 +265,7 @@ impl ServerKey { /// // Check if we can perform a negation /// sks.is_neg_possible(ct.noise_degree()).unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -292,7 +292,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -310,7 +310,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -341,7 +341,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -359,7 +359,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -387,7 +387,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -406,7 +406,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -439,7 +439,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -458,7 +458,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(clear_res, modulus - msg); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); diff --git a/tfhe/src/shortint/server_key/scalar_add.rs b/tfhe/src/shortint/server_key/scalar_add.rs index 2ffc569325..88b0bb3625 100644 --- a/tfhe/src/shortint/server_key/scalar_add.rs +++ b/tfhe/src/shortint/server_key/scalar_add.rs @@ -23,7 +23,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -46,7 +46,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!((msg + scalar as u64) % modulus, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -85,7 +85,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -107,7 +107,7 @@ impl ServerKey { /// clear /// ); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -139,7 +139,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -154,7 +154,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct_res); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(1); @@ -182,7 +182,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -197,7 +197,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(1); @@ -224,7 +224,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -236,7 +236,7 @@ impl ServerKey { /// // Verification if the scalar addition can be computed: /// sks.is_scalar_add_possible(ct.noise_degree(), 3).unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(2); @@ -264,7 +264,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -279,7 +279,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(1); @@ -312,7 +312,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -327,7 +327,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(1); @@ -360,7 +360,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -383,7 +383,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(2, clear % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -419,7 +419,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -438,7 +438,7 @@ impl ServerKey { /// let clear = cks.decrypt_message_and_carry(&ct); /// assert_eq!(6, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); diff --git a/tfhe/src/shortint/server_key/scalar_div_mod.rs b/tfhe/src/shortint/server_key/scalar_div_mod.rs index fc84d9f9b4..3f52438b86 100644 --- a/tfhe/src/shortint/server_key/scalar_div_mod.rs +++ b/tfhe/src/shortint/server_key/scalar_div_mod.rs @@ -48,7 +48,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key @@ -67,7 +67,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_res); /// assert_eq!(clear_1 / (clear_2 as u64), res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt one message /// let ct_1 = cks.encrypt(clear_1); @@ -140,7 +140,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -158,7 +158,7 @@ impl ServerKey { /// let dec = cks.decrypt(&ct_res); /// assert_eq!(1, dec); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// let ct = cks.encrypt(msg); /// diff --git a/tfhe/src/shortint/server_key/scalar_mul.rs b/tfhe/src/shortint/server_key/scalar_mul.rs index e3d47a8d82..45cb4576d9 100644 --- a/tfhe/src/shortint/server_key/scalar_mul.rs +++ b/tfhe/src/shortint/server_key/scalar_mul.rs @@ -21,7 +21,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -41,7 +41,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(msg * scalar as u64 % modulus, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -75,7 +75,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -97,7 +97,7 @@ impl ServerKey { /// clear /// ); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -130,7 +130,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -145,7 +145,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct_res); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(1); @@ -176,7 +176,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -191,7 +191,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(1); @@ -216,7 +216,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -235,7 +235,7 @@ impl ServerKey { /// let res = cks.decrypt(&ct_1); /// assert_eq!(clear_2 * clear_1, res); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt two messages /// let mut ct_1 = cks.encrypt(clear_1); @@ -267,7 +267,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -279,7 +279,7 @@ impl ServerKey { /// // Verification if the scalar multiplication can be computed: /// sks.is_scalar_mul_possible(ct.noise_degree(), 3).unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(2); @@ -315,7 +315,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -330,7 +330,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(1); @@ -364,7 +364,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -379,7 +379,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(1); @@ -410,7 +410,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -433,7 +433,7 @@ impl ServerKey { /// let modulus = cks.parameters.message_modulus().0; /// assert_eq!(3, clear % modulus); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -467,7 +467,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -486,7 +486,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); diff --git a/tfhe/src/shortint/server_key/scalar_sub.rs b/tfhe/src/shortint/server_key/scalar_sub.rs index 0dde5b1bce..3bab91aaf8 100644 --- a/tfhe/src/shortint/server_key/scalar_sub.rs +++ b/tfhe/src/shortint/server_key/scalar_sub.rs @@ -23,7 +23,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -46,7 +46,7 @@ impl ServerKey { /// /// assert_eq!(msg - scalar as u64, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -85,7 +85,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -104,7 +104,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(msg - scalar as u64, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -133,7 +133,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -149,7 +149,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct_res); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(5); @@ -178,7 +178,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -193,7 +193,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(3, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(5); @@ -255,7 +255,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -267,7 +267,7 @@ impl ServerKey { /// // Verification if the scalar subtraction can be computed: /// sks.is_scalar_sub_possible(ct.noise_degree(), 3).unwrap(); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(5); @@ -293,7 +293,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -308,7 +308,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct_res); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(5); @@ -338,7 +338,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -353,7 +353,7 @@ impl ServerKey { /// let clear_res = cks.decrypt(&ct); /// assert_eq!(clear_res, 3); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(5); @@ -383,7 +383,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -406,7 +406,7 @@ impl ServerKey { /// /// assert_eq!(msg - scalar as u64, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -438,7 +438,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -457,7 +457,7 @@ impl ServerKey { /// let clear = cks.decrypt(&ct); /// assert_eq!(msg - scalar as u64, clear); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); diff --git a/tfhe/src/shortint/server_key/shift.rs b/tfhe/src/shortint/server_key/shift.rs index f6efa409f5..f8b10cc5f3 100644 --- a/tfhe/src/shortint/server_key/shift.rs +++ b/tfhe/src/shortint/server_key/shift.rs @@ -22,7 +22,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -49,7 +49,7 @@ impl ServerKey { /// let dec = cks.decrypt(&ct_res); /// assert_eq!(msg >> shift, dec); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -92,7 +92,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -117,7 +117,7 @@ impl ServerKey { /// let dec = cks.decrypt(&ct); /// assert_eq!(msg >> shift, dec); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -150,7 +150,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -177,7 +177,7 @@ impl ServerKey { /// let dec = cks.decrypt(&ct_res); /// assert_eq!(msg >> shift, dec); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -211,7 +211,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -236,7 +236,7 @@ impl ServerKey { /// let dec = cks.decrypt(&ct); /// assert_eq!(msg >> shift, dec); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -281,7 +281,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -307,7 +307,7 @@ impl ServerKey { /// /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -352,7 +352,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -378,7 +378,7 @@ impl ServerKey { /// /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -413,7 +413,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -444,7 +444,7 @@ impl ServerKey { /// assert_eq!(msg << shift, msg_and_carry); /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct = cks.encrypt(msg); @@ -481,7 +481,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -510,7 +510,7 @@ impl ServerKey { /// assert_eq!(msg << shift, msg_and_carry); /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); @@ -547,7 +547,7 @@ impl ServerKey { ///```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -564,7 +564,7 @@ impl ServerKey { /// /// assert!(res.is_err()); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct1 = cks.encrypt(msg); @@ -600,7 +600,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// /// // Generate the client key and the server key: @@ -636,7 +636,7 @@ impl ServerKey { /// assert_eq!(msg << shift, msg_and_carry); /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let ct1 = cks.encrypt(msg); @@ -696,7 +696,7 @@ impl ServerKey { /// ```rust /// use tfhe::shortint::gen_keys; /// use tfhe::shortint::parameters::{ - /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, + /// PARAM_MESSAGE_2_CARRY_2_KS_PBS, V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, /// }; /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// @@ -724,7 +724,7 @@ impl ServerKey { /// assert_eq!(msg << shift, msg_and_carry); /// assert_eq!((msg << shift) % modulus, msg_only); /// - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64); /// /// // Encrypt a message /// let mut ct = cks.encrypt(msg); diff --git a/tfhe/src/shortint/server_key/tests/parameterized_test.rs b/tfhe/src/shortint/server_key/tests/parameterized_test.rs index 094f97f146..ff7008df66 100644 --- a/tfhe/src/shortint/server_key/tests/parameterized_test.rs +++ b/tfhe/src/shortint/server_key/tests/parameterized_test.rs @@ -20,40 +20,40 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 }); }; } @@ -74,9 +74,9 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 }); }; } @@ -143,19 +143,19 @@ create_parameterized_test!( #[cfg(not(tarpaulin))] #[test] fn test_shortint_compressed_public_key_smart_add_param_message_1_carry_1_ks_pbs() { - shortint_compressed_public_key_smart_add(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + shortint_compressed_public_key_smart_add(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); } #[cfg(not(tarpaulin))] #[test] fn test_shortint_public_key_smart_add_param_message_1_carry_1_ks_pbs() { - shortint_public_key_smart_add(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + shortint_public_key_smart_add(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); } #[cfg(not(tarpaulin))] #[test] fn test_shortint_public_key_smart_add_param_message_2_carry_2_ks_pbs() { - shortint_public_key_smart_add(PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); + shortint_public_key_smart_add(V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64); } fn shortint_encrypt_decrypt

(param: P) diff --git a/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs b/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs index 8cb9b26f2a..231c3e3e22 100644 --- a/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs +++ b/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs @@ -41,28 +41,28 @@ macro_rules! create_parameterized_test_bivariate_pbs_compliant{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 }); }; } @@ -83,9 +83,9 @@ macro_rules! create_parameterized_test_bivariate_pbs_compliant{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, - PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64 }); }; } @@ -96,13 +96,13 @@ macro_rules! create_parameterized_test_bivariate_pbs_compliant{ #[cfg(not(tarpaulin))] #[test] fn test_shortint_compressed_public_key_smart_add_param_message_1_carry_1_ks_pbs() { - shortint_compressed_public_key_smart_add(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + shortint_compressed_public_key_smart_add(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); } #[cfg(not(tarpaulin))] #[test] fn test_shortint_public_key_smart_add_param_message_1_carry_1_ks_pbs() { - shortint_public_key_smart_add(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + shortint_public_key_smart_add(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); } #[cfg(not(tarpaulin))] diff --git a/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs b/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs index b5269a94b3..f08c23ade0 100644 --- a/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs +++ b/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs @@ -35,38 +35,38 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 }); }; } @@ -87,8 +87,8 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64 }); }; } diff --git a/tfhe/src/shortint/wopbs/mod.rs b/tfhe/src/shortint/wopbs/mod.rs index c218738078..a7fcbf6ea2 100644 --- a/tfhe/src/shortint/wopbs/mod.rs +++ b/tfhe/src/shortint/wopbs/mod.rs @@ -256,13 +256,13 @@ mod experimental { /// /// ```rust /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS; - /// use tfhe::shortint::parameters::PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS; + /// use tfhe::shortint::parameters::V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64; /// use tfhe::shortint::wopbs::*; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS); + /// let (cks, sks) = gen_keys(V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS); /// ``` pub fn new_wopbs_key( cks: &ClientKey, @@ -342,14 +342,14 @@ mod experimental { /// /// ```rust /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS; /// use tfhe::shortint::wopbs::*; /// /// // Generate the client key and the server key: /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); - /// let message_modulus = WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS.message_modulus.0; + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let message_modulus = LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS.message_modulus.0; /// let m = 2; /// let ct = cks.encrypt(m); /// let lut = wopbs_key.generate_lut(&ct, |x| x * x % message_modulus); @@ -416,12 +416,12 @@ mod experimental { /// /// ```rust /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; /// use tfhe::shortint::wopbs::WopbsKey; /// use tfhe::shortint::parameters::MessageModulus; /// /// // Generate the client key and the server key: - /// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); + /// let (cks, sks) = gen_keys(LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); /// let message_modulus = MessageModulus(5); /// let m = 2; @@ -456,15 +456,15 @@ mod experimental { /// ```rust /// use rand::Rng; /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS; /// use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS; /// use tfhe::shortint::wopbs::*; /// /// // Generate the client key and the server key: /// let (cks, sks) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS); - /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); + /// let wopbs_key = WopbsKey::new_wopbs_key(&cks, &sks, &LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS); /// let mut rng = rand::thread_rng(); - /// let message_modulus = WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS.message_modulus.0; + /// let message_modulus = LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS.message_modulus.0; /// let ct = cks.encrypt(rng.gen::() % message_modulus as u64); /// let lut = vec![1_u64 << 59; wopbs_key.param.polynomial_size.0].into(); /// let ct_res = wopbs_key.programmable_bootstrapping(&sks, &ct, &lut); @@ -579,11 +579,11 @@ mod experimental { /// /// ```rust /// use tfhe::shortint::gen_keys; - /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; + /// use tfhe::shortint::parameters::parameters_wopbs_message_carry::LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS; /// use tfhe::shortint::parameters::MessageModulus; /// use tfhe::shortint::wopbs::*; /// - /// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); + /// let (cks, sks) = gen_keys(LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS); /// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks); /// let msg = 2; /// let modulus = MessageModulus(5); diff --git a/tfhe/src/shortint/wopbs/test.rs b/tfhe/src/shortint/wopbs/test.rs index 352a5e34e2..3468f4fc57 100644 --- a/tfhe/src/shortint/wopbs/test.rs +++ b/tfhe/src/shortint/wopbs/test.rs @@ -1,9 +1,10 @@ use crate::shortint::keycache::KEY_CACHE_WOPBS; use crate::shortint::parameters::parameters_wopbs::*; use crate::shortint::parameters::{ - MessageModulus, PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, - PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, + MessageModulus, V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, + V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, }; use crate::shortint::wopbs::WopbsKey; use crate::shortint::{gen_keys, ClassicPBSParameters}; @@ -26,10 +27,10 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - (PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS), - (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), - (PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS), - (PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS) + (V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS), + (V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), + (V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS), + (V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS) }); }; } @@ -49,10 +50,10 @@ macro_rules! create_parameterized_wopbs_only_test{ ($name:ident)=> { create_parameterized_wopbs_only_test!($name { - WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS + LEGACY_WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS }); }; } @@ -73,7 +74,7 @@ macro_rules! create_parameterized_test{ ($name:ident)=> { create_parameterized_test!($name { - (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS) + (V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS) }); }; } @@ -93,7 +94,7 @@ macro_rules! create_parameterized_wopbs_only_test{ ($name:ident)=> { create_parameterized_wopbs_only_test!($name { - WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS + LEGACY_WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); }; } @@ -104,10 +105,10 @@ create_parameterized_test!(generate_lut_modulus); create_parameterized_wopbs_only_test!(generate_lut_modulus_not_power_of_two); #[cfg(not(tarpaulin))] create_parameterized_wopbs_only_test!(generate_lut_wop_only { - WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, - WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, - WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS + LEGACY_WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, + LEGACY_WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS, + LEGACY_WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_4_CARRY_4_KS_PBS }); fn generate_lut(params: (ClassicPBSParameters, WopbsParameters)) { diff --git a/tfhe/web_wasm_parallel_tests/package-lock.json b/tfhe/web_wasm_parallel_tests/package-lock.json index 2a93a31477..997c67d43e 100644 --- a/tfhe/web_wasm_parallel_tests/package-lock.json +++ b/tfhe/web_wasm_parallel_tests/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "tfhe-wasm-par", "version": "1.0.0", - "license": "ISC", + "license": "BSD-3-Clause-Clear", "dependencies": { "comlink": "^4.4.1", "wasm-feature-detect": "^1.6.2" diff --git a/tfhe/web_wasm_parallel_tests/worker.js b/tfhe/web_wasm_parallel_tests/worker.js index c048277458..4090e73b24 100644 --- a/tfhe/web_wasm_parallel_tests/worker.js +++ b/tfhe/web_wasm_parallel_tests/worker.js @@ -47,7 +47,7 @@ function append_param_name(bench_results, params_name) { async function compressedPublicKeyTest() { let params_name_small = - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small).build(); @@ -79,7 +79,7 @@ async function compressedPublicKeyTest() { async function publicKeyTest() { let params_name_small = - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64; let params_small = new ShortintParameters(params_name_small); let config = TfheConfigBuilder.with_custom_parameters(params_small).build(); @@ -160,7 +160,7 @@ async function compactPublicKeyBench32BitOnConfig(config) { async function compactPublicKeyBench32BitBig() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -173,7 +173,7 @@ async function compactPublicKeyBench32BitBig() { async function compactPublicKeyBench32BitSmall() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -476,7 +476,7 @@ async function compactPublicKeyZeroKnowledgeTest() { async function compressedCompactPublicKeyTest256BitBig() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -486,7 +486,7 @@ async function compressedCompactPublicKeyTest256BitBig() { async function compressedCompactPublicKeyTest256BitSmall() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -557,7 +557,7 @@ async function compactPublicKeyBench256BitOnConfig(config) { async function compactPublicKeyBench256BitBig() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -570,7 +570,7 @@ async function compactPublicKeyBench256BitBig() { async function compactPublicKeyBench256BitSmall() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -617,7 +617,7 @@ async function compressedServerKeyBenchConfig(config) { async function compressedServerKeyBenchMessage1Carry1() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params) @@ -630,7 +630,7 @@ async function compressedServerKeyBenchMessage1Carry1() { async function compressedServerKeyBenchMessage2Carry2() { const block_params = new ShortintParameters( - ShortintParametersName.PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, + ShortintParametersName.V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, ); let config = TfheConfigBuilder.default() .use_custom_parameters(block_params)