# CKKS Ciphertext data structure

I’m trying to understand how its represented a ciphertext of CKKS in memory, or the data structure in OpenFHE.

Here is what I understand using the flag FLEXIBLEAUTO, correct me if I’m wrong. I also add some questions.

1. There is an example using FIXEDMANUAL flag?
2. Given a polynomial degree N and a multiplicative depth K. This means that will be have a coefficient module q similar the producer of K prime numbers similar to the scaling factor? If so How many bits are in each prime number? How is this scaling factor?
3. The encoding in the CRT representation there will be an array of K polynomials with coefficients of the bits like the scaling factor??
4. The same but in the ciphertext will be 2 polynomials that in CRT each one will be two of this K polynomials that i say in 3?
5. The Ciphertext data structure is an array of Polynomials represented in a CRT form. Correct?
6. What is the data structure of a Polynomials in CRT form (its also applys NTT form no?), is a array of arrays (matrix)? In which each element correspond to one of the primes of the CRT? and inside this array has size equal to the polynomial degree and each element is the correspond coefficient in order?
7. There is something else that in missing? There is a better way to understand all this? Is a little hard to figure out this only with code.

There are many questions here. To get familiar with the math for the scaling CKKS methods implemented in OpenFHE, I suggest reading the paper that proposed/described these methods: Approximate Homomorphic Encryption with Reduced Approximation Error. The terminology used in the paper was slightly different. Here is the mapping table:

• RE-CKKS-DE → FLEXIBLEAUTOEXT in OpenFHE
• CKKS-DE → FLEXIBLEAUTO in OpenFHE
• CKKS-IA → FIXEDMANUAL in OpenFHE