Why do my parameters not comply with 128 bit security?

Hello all,

I am trying to get a grasp on how model parameters play together with security levels. So I have a key generation main-file, with which I can play around. I am now curious why my parameters with

multDepth = 6
scalModsSize = 25
firstModSize = 30
ringDim = 8192

do not comply with 128 bit security. As it states here if I want to have that security with the desired ring dimension \log (q) should be lower than 220. But for this example it is:
\log (q) \approx 199.893
if I get q via the method context->GetModulus(). I also watched this talk where it says that Pallisade calculates q automatically, but how does it or rather OpenFHE now do it?
(edit) I am using CKKS

Thanks in advance and cheers

There are other auxiliary moduli used in specific settings. For example, if you use the Hybrid Key Switching (HKS) technique (that is parameters.SetKeySwitchTechnique(HYBRID)), the coefficient modulus will be ~\log{}(1/dnum*q), where dnum is a parameter of HKS - default 3. Hence, the overall modulus will be larger than the threshold you refer to above.

You can try a different key switching method (BV) that does not require additional auxiliary modules, but it will be slower.

You can also use FIXEDMANUAL/FIXEDAUTO scaling techniques (parameters.SetScalingTechnique(FIXEDMANUAL);) to reduce the moduli size a bit.