I wonder about the size and form of Plaintext in CKKS Encoding for real number, taking small N for example:
Form of Plaintext:
Thank you for your help!
First, in CKKS the number of slots is always N/2 where N is poly_modulus_degree
. When you encode a vector shorter than that, the rest of the slots are simply set to zero. Therefore, in your case the plaintext slot values would be [1.1, 2.2, 0.0, 0.0]
, with a scale of 4. There is an important special case, however: when you encode a single value, then all the slots will hold that value.
However, this is not at all what the actual plaintext data looks like. There isn't an easy way to read the slot values from the plaintext coefficient data: none of the options you suggest match with what is happening in CKKS encoding:
modulo coeff_modulus
(really this is in the RNS representation, i.e., modulo each coeff_modulus
prime);Without scaling, step 4. would introduce so much error that the process would become totally irreversible.