CKKS dcrtBits and firstMod

is there a reference where I can check how the dcrtBits and firstMod values affects ciphertexts and calculations in CKKS?
I do not have a technical knowledge of the scheme, but I can’t find a reference to check
thank you

Hi @marc-alonso

It depends on the CKKS mode. The main paper for the CKKS modes implemented in OpenFHE is Approximate Homomorphic Encryption with Reduced Approximation Error It has noise expressions that can be used to determine dctBits (labeled as p there) and some tables with parameters, too. CKKS-IA there corresponds to FIXEDMANUAL/AUTO, CKKS-DE to FLEXIBLEAUTO, and RE-CKKS-DE to FLEXIBLEAUTOEXT.

firstMod should typically be slightly larger than dcrtBits to support numbers than are larger than unity. For example, often firstMod can be 60 while dcrtBits is 50 to support messages of the order up to 1024 or so. By default the message is scaled around unity. I gave here a simplified description. In reality the numbers depend on sparsity of the ciphertext/encoded plaintext and other factors related to the CKKS encoding.

Thank you very much for your response!!

So, theorically, when working with values always in [-1, 1], can I reduce those values in order to build ligher ciphertexts?

Only firstMod depends on the range (one modulus). drtBits specifies the precision (size of all other moduli). So you can change only firstMod.