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

**URL:** <https://openfhe.discourse.group/t/for-the-singlekey-architecture-i-only-achieve-a-128-security-level-with-a-ring-dimension-of-31k/1279>\
**Category:** Library Questions\
**Created:** [May 18, 2024, 10:34pm UTC](https://openfhe.discourse.group/t/for-the-singlekey-architecture-i-only-achieve-a-128-security-level-with-a-ring-dimension-of-31k/1279 "2024-05-18T22:34:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moghit02](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@moghit02](https://openfhe.discourse.group/u/moghit02)\
**Post date:** [May 18, 2024, 10:34pm UTC](https://openfhe.discourse.group/t/for-the-singlekey-architecture-i-only-achieve-a-128-security-level-with-a-ring-dimension-of-31k/1279/1 "2024-05-18T22:34:37Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [May 19, 2024, 12:28am UTC](https://openfhe.discourse.group/t/for-the-singlekey-architecture-i-only-achieve-a-128-security-level-with-a-ring-dimension-of-31k/1279/2 "2024-05-19T00:28:07Z")

</div>

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](https://eprint.iacr.org/2022/162.pdf)).
