I’m doing some more complex FHE calculations with CKKS, and I sometimes get this error:
openfhe-development-1.2.3/src/pke/lib/encoding/ckkspackedencoding.cpp:l.541:Decode(): The decryption failed because the approximation error is too high. Check the parameters.
My question is, what parameters can I change to make this error go away?
For example, if I have
int ring_dim = 1 << 16;
int num_slots = ring_dim / 2;
// Set up encryption parameters for CKKS
CCParams<CryptoContextCKKSRNS> parameters;
parameters.SetSecurityLevel(HEStd_NotSet);
parameters.SetMultiplicativeDepth(20);
parameters.SetScalingModSize(40);
parameters.SetRingDim(ring_dim);
parameters.SetBatchSize(num_slots);
what else could I try increasing (and how)? I’ve also dabbled with modifying the scale parameter, but that hasn’t worked for me either.