Hello,
I have a question regarding the usage of ModReduce after EvalMult.
In the basic usage of ckks, there is no ModReduce after Evalmult link
while, in the usage in the threshold ckks, ModReduce is used after EvalMult link
From what I understand, modReduce is used to reduce the error from evalmult, is this correct and when should we use ModReduce and when we don’t have to?
Thanks so much for your help!
Generally speaking, CKKS requires ModReduce (aka Rescale) after every EvalMult. After EvalMult, the scale of the message gets roughly squared (and the error also increases), and then we need to call ModReduce to go back to original scale of the message (the error gets also scaled down). For a more advanced description, I recommend reading the Introduction of https://eprint.iacr.org/2020/1118.pdf
OpenFHE includes four different variants of CKKS. See CKKS Scheme in Section 2.1.1 of https://eprint.iacr.org/2022/915.pdf for their description. Note that three of these modes do ModReduce automatically. So you do not need to include these calls explicitly. This is why the basic CKKS example does not have a call to ModReduce or Rescale.
1 Like