I have a question for understanding TFHE-rs 's parameter setting

Greetings! I I am Seunghwan Lee, a Ph.D. candidate at Hanyang University in South Korea.

I have read the following CHMERA paper which discusses the isomorphism between approximated torus structure and Z/64Z or Z/32Z
(ref: CHIMERA: Combining Ring-LWE-based Fully Homomorphic Encryption Schemes)

Based on that fact, it states that every TFHE setting can be described as an FHEW setting. Consequently, I would like to inquire if it is possible to obtain FHEW-type parameters from TFHE-rs parameters through this isomorphism.

For example, I have observed the parameters mentioned below:

pub const DEFAULT_PARAMETERS: BooleanParameters = BooleanParameters {
lwe_dimension: LweDimension(777),
glwe_dimension: GlweDimension(3),
polynomial_size: PolynomialSize(512),
lwe_modular_std_dev: StandardDev(0.000003725679281679651),
glwe_modular_std_dev: StandardDev(0.0000000000034525330484572114),
pbs_base_log: DecompositionBaseLog(18),
pbs_level: DecompositionLevelCount(1),
ks_base_log: DecompositionBaseLog(4),
ks_level: DecompositionLevelCount(3),

Based on my understanding, the default ciphertext dimension is 777, and the modulus is 2^32. However, I am uncertain about the FHEW version of std_dev; my assumption is that it should be std_dev multiplied by 2^32, but I seek clarification on this matter.

Additionally, I believe that the ***_base_log parameters represent the gadget basis. Consequently, I would like to confirm whether the ***_level parameter corresponds to the remaining number of decomposition elements.

For instance, if Ks_base_log is set to 4 and KS_level is set to 3, and considering that the modulus is 2^32, each ciphertext would be decomposed into 8 ciphertexts. As a result, it is my understanding that 5 ciphertexts with lower significant gadget information would be discarded. Could you kindly confirm if my interpretation is accurate?

Thank you for your attention. I wish you a pleasant evening!

hello @kr3951

I’m not sure about the std_dev question (not sure how FHEW settings are computed/related to TFHE ones, I’ll ask)

For the base log and level, we decompose into levels of base_log bits, so for the case of the ks_level of 3 and ks_base_log of 4 we would decompose the 3 * 4 MSBs (most significant bits) and discard 20 bits, each level carrying 4 bits of information, hope it clarifies things for the levels :slight_smile: