Hello everyone, I have a question on the Adjust operation before the cross-level addition or multiplication operations in CKKS. As It incurs several rescale operations (on the ciphertext with the higher #limbs), I am thinking about the ways to avoid it. Suppose we know all the operations on the ciphertexts and we know, for example, ciphertext1 will undergo 2 multiplications with ciphertext2 and then be summed with ciphertext3. Can we communicate with the user to encrypt the cipher texts 1 and 2 with L #limbs and 3 with (L-2) #limbs? If not, what are the other possible ways to avoid the adjust operation?
Yes, it is possible to create a plaintext at a certain level and depth, and then encrypt it as such. Please check the MakeCKKSPackedPlaintext method and its parameters openfhe-development/src/pke/include/cryptocontext.h at main · openfheorg/openfhe-development · GitHub. You can also uncomment the code here to see more information openfhe-development/src/pke/examples/advanced-real-numbers.cpp at main · openfheorg/openfhe-development · GitHub.
Thank you so much! Do you think there would be any security concerns regarding the communication with the user? Also, do you think there are other methods to avoid the Adjust operations?
The privacy of the underlying plaintext is still preserved if this is what you are asking. If the user knows the computations to be performed, then no extra information is revealed if they are asked to create plaintexts at specific levels.
The adjust operations cannot be avoided if the ciphertexts are not at the same level (and with the same scaling factor). So to get them at the same level, you either directly create the ciphertexts at the required levels, or reduce the levels of the ciphertexts before you need to compute on them.