From 3667154b9ea3341fdf38955ebb5905afa6d5e810 Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Mon, 6 Jan 2025 11:49:09 +0100 Subject: [PATCH] chore(shortint): update compression parameters --- .../shortint/parameters/list_compression.rs | 9 ++++++--- .../parameters/v0_10/list_compression.rs | 18 ++++++++++++++++++ tfhe/src/shortint/parameters/v0_10/mod.rs | 1 + 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 tfhe/src/shortint/parameters/v0_10/list_compression.rs diff --git a/tfhe/src/shortint/parameters/list_compression.rs b/tfhe/src/shortint/parameters/list_compression.rs index 2d582faf93..6e34507b11 100644 --- a/tfhe/src/shortint/parameters/list_compression.rs +++ b/tfhe/src/shortint/parameters/list_compression.rs @@ -23,14 +23,17 @@ pub struct CompressionParameters { } pub const COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: CompressionParameters = + V0_11_COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64; + +pub const V0_11_COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: CompressionParameters = CompressionParameters { br_level: DecompositionLevelCount(1), br_base_log: DecompositionBaseLog(23), - packing_ks_level: DecompositionLevelCount(4), - packing_ks_base_log: DecompositionBaseLog(4), + packing_ks_level: DecompositionLevelCount(2), + packing_ks_base_log: DecompositionBaseLog(6), packing_ks_polynomial_size: PolynomialSize(256), packing_ks_glwe_dimension: GlweDimension(4), lwe_per_glwe: LweCiphertextCount(256), storage_log_modulus: CiphertextModulusLog(12), - packing_ks_key_noise_distribution: DynamicDistribution::new_t_uniform(42), + packing_ks_key_noise_distribution: DynamicDistribution::new_t_uniform(43), }; diff --git a/tfhe/src/shortint/parameters/v0_10/list_compression.rs b/tfhe/src/shortint/parameters/v0_10/list_compression.rs new file mode 100644 index 0000000000..7f47eecb64 --- /dev/null +++ b/tfhe/src/shortint/parameters/v0_10/list_compression.rs @@ -0,0 +1,18 @@ +use crate::core_crypto::prelude::{CiphertextModulusLog, LweCiphertextCount}; +use crate::shortint::parameters::{ + CompressionParameters, DecompositionBaseLog, DecompositionLevelCount, DynamicDistribution, + GlweDimension, PolynomialSize, +}; + +pub const V0_10_COMP_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: CompressionParameters = + CompressionParameters { + br_level: DecompositionLevelCount(1), + br_base_log: DecompositionBaseLog(23), + packing_ks_level: DecompositionLevelCount(4), + packing_ks_base_log: DecompositionBaseLog(4), + packing_ks_polynomial_size: PolynomialSize(256), + packing_ks_glwe_dimension: GlweDimension(4), + lwe_per_glwe: LweCiphertextCount(256), + storage_log_modulus: CiphertextModulusLog(12), + packing_ks_key_noise_distribution: DynamicDistribution::new_t_uniform(42), + }; diff --git a/tfhe/src/shortint/parameters/v0_10/mod.rs b/tfhe/src/shortint/parameters/v0_10/mod.rs index 94ce0d066b..ff93f2a819 100644 --- a/tfhe/src/shortint/parameters/v0_10/mod.rs +++ b/tfhe/src/shortint/parameters/v0_10/mod.rs @@ -5,4 +5,5 @@ pub mod classic; pub mod compact_public_key_only; pub mod key_switching; +pub mod list_compression; pub mod multi_bit;