For the SingleKey Architecture, I only achieve a 128 security level with a ring dimension of 31k

Hello everyone,

I have 2 questions.

I’m trying to achieve 128-bit security for my purposes, and I’ve fixed HEstd_128 classic. However, whenever I execute my program with any ring dimension, I get this error message. Could it be that there are cases where a certain security level can be achieved solely through a single ring dimension? Since runtime with 131k would take too long, I wanted to know for research purposes if it’s possible to somehow estimate the precision of a calculation.

terminate called after throwing an instance of 'lbcrypto::OpenFHEException'
  what():  /home/openfhe-development/src/pke/lib/scheme/ckksrns/ckksrns-parametergeneration.cpp:l.105:ParamsGenCKKSRNS(): The specified ring dimension (1024) does not comply with HE standards recommendation (131072). 

Question 2:
Is it possible to make a general statement regarding the ring dimension and the associated precision? Sometimes, when increasing the ring dimension, I get worse results than with lower ones. I know that increasing the scaleModSize improves precision, but how is precision related to the ring dimension? I would be very grateful for an answer.

Question 1. The minimum ring dimension that can satisfy a certain security level depends primarily on the multiplicative depth. It seems the multiplicative depth in your use case is large necessitating a ring dimension of 128K to achieve a 128-bit security level. Try to reduce the multiplicative depth which would allow for a smaller ring dimension while maintaining the desired security level. You can use bootstrapping to evaluate deep circuits if needed.

Question 2. This is not straightforward to answer. In a nutshell, the ring dimension does affect the precision as it affects the noise growth for certain CKKS operations (See Table 3 in this paper).