# Understanding CKKS Moduli

**URL:** <https://openfhe.discourse.group/t/understanding-ckks-moduli/1782>\
**Category:** FHE Questions\
**Created:** [December 16, 2024, 9:52pm UTC](https://openfhe.discourse.group/t/understanding-ckks-moduli/1782 "2024-12-16T21:52:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malioboro](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@malioboro](https://openfhe.discourse.group/u/malioboro)\
**Post date:** [December 16, 2024, 9:52pm UTC](https://openfhe.discourse.group/t/understanding-ckks-moduli/1782/1 "2024-12-16T21:52:19Z")

</div>

I print my fresh ciphertext moduli that has depth 5, and it shows:

```auto
Element 0 params:
  q0 = 2147352577
  q1 = 1071513601
  q2 = 1070727169
  q3 = 1077477377
  q4 = 1073479681
  q5 = 1073872897
  q6 = 786433
Element 1 params:
  q0 = 2147352577
  q1 = 1071513601
  q2 = 1070727169
  q3 = 1077477377
  q4 = 1073479681
  q5 = 1073872897
  q6 = 786433

```

My question:

- why is q6 much smaller than others?
- I remember a few months ago, someone who has a better understanding of FHE than me told me that the CKKS moduli should start small and then increase ( I am not sure what his reference is). But the moduli here is decreasing instead of increasing. I am unsure now what he was talking about or if there is any different consideration in OpenFHE. Can someone please help explain this?

Thank you

---

<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:** [December 16, 2024, 10:12pm UTC](https://openfhe.discourse.group/t/understanding-ckks-moduli/1782/2 "2024-12-16T22:12:30Z")

</div>

[This](https://openfhe.discourse.group/t/question-about-the-composition-of-the-modular-chain/1759) should answer your question.

The moduli q\_1 to q\_5 alternate between values above and below the value 2^{scaleModSize}, with one modulus larger and one smaller.

---

<div class="post-metadata">

**Author:** ![malioboro](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@malioboro](https://openfhe.discourse.group/u/malioboro)\
**Post date:** [December 18, 2024, 9:36pm UTC](https://openfhe.discourse.group/t/understanding-ckks-moduli/1782/3 "2024-12-18T21:36:44Z")

</div>

Thank you! for my understanding of the referenced discussion:

- q\_6 is the special auxiliary modulus, which is why it has smaller bit
- with depth=5 CKKS moduli is q\_0 \dots q\_5
