# Question about the composition of the modular chain

**URL:** https://openfhe.discourse.group/t/question-about-the-composition-of-the-modular-chain/1759
**Category:** Library Questions
**Tags:** questions, openfhe-help
**Created:** [December 2, 2024, 9:39am UTC](https://openfhe.discourse.group/t/question-about-the-composition-of-the-modular-chain/1759 "2024-12-02T09:39:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Haow\_P](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Haow\_P](https://openfhe.discourse.group/u/Haow_P)
#### Post date: [December 2, 2024, 9:39am UTC](https://openfhe.discourse.group/t/question-about-the-composition-of-the-modular-chain/1759/1 "2024-12-02T09:39:19Z")

</div>

Hello @Caesar ! I was a little confused about the composition of the modular chain. I set the multDepth=22, scalingModSize = 40, firstModSize = 60, and I used the function print\_moduli\_chain to output the modular chain, the output showed that q\_0,q\_1,…q\_22 is 40bit, q\_23 is 19bit, and q\_24,q\_25,…,q\_29 is 60bit. I want to know why q\_23 is 19bit and why there are six 60bit modules.

---

<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 4, 2024, 4:54pm UTC](https://openfhe.discourse.group/t/question-about-the-composition-of-the-modular-chain/1759/2 "2024-12-04T16:54:05Z")

</div>

The moduli q\_0 \ldots q\_{22} are the main moduli in a CKKS ciphertext coefficient chosen at a size that matches `scalingModSize` (except q\_0 of size `firstModSize`). Think of them as functional moduli.

The modulus q\_{23} is a special auxiliary modulus used in CKKS with `ScalingTechnique = FLEXIBLEAUTOEXT`, the default technique in OpenFHE for CKKS. This modulus was introduced in this [work](https://eprint.iacr.org/2020/1118.pdf) and it is used to reduce the internal noise in CKKS ciphertexts.

The 60-bit moduli are also auxiliary and are used in key switching, hybrid key switching in your case, the default in OpenFHE.
