RNS-CKKS parameter setting

SetScalingModSize gets the scalar value as an input parameter. But, I want to make a different modulus bit size for different levels. Can I do that?
For example, SEAL supports the variable bit size of modulus by getting the list of bit size of modulus like {50,40,50,51,…,62} for their initial parameter settings.

Hi @lee2h

In OpenFHE, we use the same size for all moduli except for the top (in the case of FLEXIBLEAUTOEXT mode) and bottom (for decryption) ones. The main reasons are to make CKKS easier to use (it is essentially as user-friendly as BFV in OpenFHE) and reduce the approximation error. For instance, OpenFHE supports modes where rescaling is done automatically, i.e., hiding the issues with the scaling error related to rescaling from the user. The algorithms and motivation for the CKKS RNS variants implemented in OpenFHE are described in Approximate Homomorphic Encryption with Reduced Approximation Error. A high-level description of the CKKS RNS variants/modes supported by OpenFHE is provided in section 2.1.1 of OpenFHE: Open-Source Fully Homomorphic Encryption Library

1 Like

@ypolyakov

Thank you for your answer.
I’ll check your suggested papers.