Can different RNS techniques be used during CKKS computation?

I notice that there are two RNS techniques, denoted as BEHZ-RNS and HPS-RNS,

It seems that in Microsoft SEAL, they only use HPS-RNS for key switching part?

I would like to know:
How does it work in OpenFHE and why?

Great thanks for your help!

Hi @yhh

The BEHZ and HPS RNS variants are for BFV. Currently OpenFHE supports 4 different modes (the two new modes are described in Revisiting Homomorphic Encryption Schemes for Finite Fields) All four modes are described at a high level in the BFV scheme section of the OpenFHE design paper OpenFHE: Open-Source Fully Homomorphic Encryption Library. I think the explanation given there should answer your question about how and why.

In hybrid key switching, we do use fast basis extension (see Revisiting Homomorphic Encryption Schemes for Finite Fields for further information on it), which is a subroutine used in both BEHZ and HPS variants, but not the full set of RNS procedures used in BFV multiplication and decryption. Note that the key switching implementation in OpenFHE is shared for CKKS, BGV, and BFV.