About CKKS Encoding Method: Gap Between the Original Paper and the Implementation

Hello.
I have some questions about the encoding method in the CKKS scheme.
I feel that there are some gaps between the original encoding mechanism and the OpenFHE implementations.
Thus, I want to verify if my interpretation is correct and understand the reason for such implementations.

First, I am considering the following condition:

Then, my interpretation of the encoding implemented in the OpenFHE library (ckkspackedencoding.cpp) is as follows:

Is my interpretation roughly correct?

In the original paper,
I understood that the interpolation through inverse FFT uses not only the N/2 root of unity but also the N/2 conjugated root of unity.
Based on my understanding of the implementation, wasn’t the original paper intending to make P(X) a 2N-1 degree polynomial instead of an N/2-1 degree polynomial?
(It seems that the encoding implementations do not include the conjugated root of unity.)

My last question is about the reason for the implementation.
Why should the imaginary parts of IFFT coefficients b_l be used for generating P’(X)?

I have difficulty understanding the process of creating a polynomial with real coefficients (not complex number) through the inverse FFT.

( Or is it just for tracking the precision? Without the need for calculating precision, can I generate P’(X) as an N/2-1 degree polynomial with integer coefficients?)

Thank you for reading.

Sorry. I think I now understand the implementation.
(This is just the implementation of encoding using a special FFT.?)

I think the CKKS OpenFHE implementation is closer to this paper than to the original one

1 Like

Yes

The complex number vector obtained after FFTSpecialInv is mapped to a vector of real numbers (so they could be rounded to integers). The first half corresponds to real components of complex numbers. The second half corresponds to the imaginary components of complex numbers.

1 Like

Thank you for your reply!
Are there any papers that discuss the BGV/BFV schemes implemented in OpenFHE too?

Take a look at the OpenFHE paper https://eprint.iacr.org/2022/915.pdf on pages 4 and 5, the references for the different procedures for BGV and BFV are given there.

1 Like