Can openfhe support multiple bit wide modules?

Hello, I have a problem right now. We set scalingModSize and firstModSize at the beginning of the program. So the bit width of the module is fixed. Can openfhe support multiple bit wide modules?

Hi @Yivon ,

What scheme are you working with? Typically we only support one modulus size for all multiplicative levels (for better usability). The first (decryption) modulus can be different in CKKS and BGV.

I am using the CKKS. How can I achieve a variety of modulus bit widths? Similar to the SEAL library, variable length modular bit width can be achieved.

For CKKS, OpenFHE allows the user to set the first modulus (for decryption) and specify the bitwidth for remaining moduli (used for multiplication). This is done both for better usability as well as for reducing the approximation error in RNS variants of CKKS. The user does not need to keep track of the current scaling factor (which, as far as I know, a requirement in SEAL), and the scale management is done automatically by OpenFHE. So the main parameters exposed to the user in this case are scaling factor size (size of multiplicative-level moduli) and actual multiplicative depth. The internal algorithms for this are described in Approximate Homomorphic Encryption with Reduced Approximation Error (the algorithms for choosing the moduli are discussed there in detail).