More details on EvalFHEWToCKKS and EvalCKKSToFHEW

I took a look at your switch algorithms EvalFHEWToCKKS and EvalCKKSToFHEW in the repository. Comparing them with the switch algorithm in the PEGASUS paper, I see some differences such as: using Chebychev polynomial interpolation for evaluating the modular function, and also using linear transform for partial decryption differently than in PEGASUS (where they used the tiling technique). Could you share a paper/resource, beyond the explanation in SCHEME_SWITCHING_CAPABILITY, about these scheme switching algorithms you implemented? Thank you in advance.

The implementation in OpenFHE follows the blueprint of the PEGASUS paper, and the modifications take advantage of the optimizations already implemented in OpenFHE. We use Chebyshev interpolation for the trigonometric approximation of the modular reduction function for numerical stability reasons. For the partial homomorphic decoding, we use a similar linear transform method, optimized to take advantage of double hoisting. Apart from these, in CKKStoFHEW, we do modulus switching to preserve security, and in FHEWtoCKKS, we do various corrections based on whether the messages are bits or larger integers.

We do not have a separate public resource for these algorithms. However, I suggest looking at the algorithms in ckksrns-schemeswitching.cpp, since there are many comments explaining the steps.

1 Like

Dear Andreea,

Thank you for your explanation; everything is clear to me now.

I also read the comments in the algorithm you mentioned, and those were helpful as well in understanding your implementation.