From 13a73e4cd8f96565eb4a377a1b36aaa1b270a96b Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Thu, 5 Dec 2024 10:52:21 +0100 Subject: [PATCH] chore(zk)!: update paramters for zk v2 --- .../p_fail_2_minus_64/ks_pbs.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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 02783d7a17..4799951403 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 @@ -6,13 +6,26 @@ use crate::shortint::parameters::{ MessageModulus, }; +/// This parameter set should be used when doing zk proof of public key encryption pub const PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64: CompactPublicKeyEncryptionParameters = CompactPublicKeyEncryptionParameters { - encryption_lwe_dimension: LweDimension(1024), - encryption_noise_distribution: DynamicDistribution::new_t_uniform(42), + 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(), expansion_kind: CompactCiphertextListExpansionKind::RequiresCasting, } .validate(); + +/// This legacy parameter set should be used with the v1 pke zk scheme +pub const PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZK_V1: + 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();