# Crashes when firstModSize and scalingModSize are equal in CKKS

**URL:** <https://openfhe.discourse.group/t/crashes-when-firstmodsize-and-scalingmodsize-are-equal-in-ckks/1287>\
**Category:** Library Questions\
**Created:** [May 23, 2024, 2:40am UTC](https://openfhe.discourse.group/t/crashes-when-firstmodsize-and-scalingmodsize-are-equal-in-ckks/1287 "2024-05-23T02:40:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![andreea.alexandru](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/andreea.alexandru/32/378_2.png) [@andreea.alexandru](https://openfhe.discourse.group/u/andreea.alexandru)\
**Post date:** [May 23, 2024, 6:46pm UTC](https://openfhe.discourse.group/t/crashes-when-firstmodsize-and-scalingmodsize-are-equal-in-ckks/1287/2 "2024-05-23T18:46:15Z")

</div>

In general, it is recommended to set FirstModSize larger than ScalingModSize, see other posts on the forum for the meaning of these moduli: [Setting security parameters according to 128 bit security (very small CKKS scaling factor) - #5 by ypolyakov](https://openfhe.discourse.group/t/setting-security-parameters-according-to-128-bit-security-very-small-ckks-scaling-factor/396/5), [What is the differences among firstModSize, scalingModSize and scalingFactor? - #2 by Caesar](https://openfhe.discourse.group/t/what-is-the-differences-among-firstmodsize-scalingmodsize-and-scalingfactor/344/2), [EvalAdd does not add in some cases - #7 by ypolyakov](https://openfhe.discourse.group/t/evaladd-does-not-add-in-some-cases/517/7).

This is the same issue as in [Crashes with specific parameter setting in CKKS](https://openfhe.discourse.group/t/crashes-with-specific-parameter-setting-in-ckks/1252), since there is currently a missing check for equality of the different moduli. We are aware of it and an [issue](https://github.com/openfheorg/openfhe-development/issues/766) has been created.

---

_[View the full topic](https://openfhe.discourse.group/t/crashes-when-firstmodsize-and-scalingmodsize-are-equal-in-ckks/1287)._
