Parameter settings in BFV, BGV, and CKKS

I will go one by one

  • ScalingModSize (Q_i): 50

Based on the number you gave, it is probably 60 (not 50). Otherwise, log2 would be smaller (about 169).

For CKKS scheme, why is log_2(getModulus) equals to 178.977 instead of 218 as the HE standard shows? Do the parameter settings to ScalingModSize and FirstModSize cause this value?

\log Q is a functional parameter not a security parameter. It is determined by the circuit depth. 218 is the upper bound on \log Q to support N. As soon as \log Q higher, you need to get to the next ring dimension (16K).

For BFV scheme in Seal, parameter poly_modulus_degree (Q) can be set with the corresponding N to a specific security level. For OpenFHE, how can I set Q for BFV scheme?

Q is set based on the multiplicative depth. First, you determine what depth you need, and then enter it. OpenFHE automatically finds the right value of N by default.

  1. For BGV scheme, when applyling keySwitchTechnique as BV, the ScalingModSize is required to be set and its value needs to be less than 60. However, the program stops at GenCryptoContext(parameters) without giving error message, my settings are:

ScalingModSize is not used in BGV. It is computed automatically. We added some validators for this in the dev branch of OpenFHE. These changes will soon be merged to main as part of the v1.2.0 release.

May I ask what’s the benefit of increasing N under the same security level?

When Q is increased to support a larger depth, N needs to also increase to still satisfy the 128-bit security level.

I suggest watching the following webinars for a more comprehensive introduction to how parameters are set in FHE: