CKKS modulus switching and scaling

Hi,

We are porting a CKKS code written for Microsoft SEAL to OpenFHE. In particular, we are following this example where the goal is to compute a polynomial function (PIx^3 + 0.4x + 1),

Our question is related to porting lines 200 to 286 of this SEAL code to OpenFHE. In particular we have two questions:

  • Is the OpenFHE function SetScalingFactor() in ciphertext.h equivalent to the scale() function in SEAL? If not, Is there a way to change the scale of encrypted value in OpenFHE?

  • Is there a way to do traditional CKKS modulus switching for plaintexts in OpenFHE?

Thank you

Hi @hooman,

I am not too familiar with the API of SEAL, but I would recommend looking at the OpenFHE polynomial example at openfhe-development/polynomial-evaluation.cpp at main · openfheorg/openfhe-development · GitHub

By default, OpenFHE hides the CKKS complexity from the user and makes polynomial evaluation an easy task. The user does not need to know the internals of CKKS. Note OpenFHE will also automatically use the Paterson-Stockmeyer algorithm for larger-degree polynomials.

@hooman

Has your question been resolved? If so please mark Yuriy’s answer as the solution. Thanks!