Why is log Q so small

I set Ring Dimension to 32768 (in CKKS)
And write code to get Q: cc->GetModulus().GetLengthForBase(2)
I get loqQ:230
Why is log Q so small

How do you set the ring dimension? Manually? The ring dimension should be chosen by the library depending on other application parameters such as precision and multiplicative depth.

The multiplicative depth may be low, allowing for a smaller ciphertext coefficient modulus Q.

To help you better, please provide a full working example.

How do you set the ring dimension? Manually?
I am changing it to automatic now
multDepth = 3, scaleModSize = 50; batchSize = 32;
cc->GetRingDimension() show 16384 and cc->GetModulus().GetLengthForBase(2)=230
If i change multDepth to 10, i get loqQ:580

If i change ring dimension manually, i get: cc->GetModulus().GetLengthForBase(2)=230 too

uint32_t multDepth = 3;
SecurityLevel sl = HEStd_NotSet;
parameters.SetSecurityLevel(sl);
parameters.SetRingDim(32768);

Can i not change Ring Dimension, if i want to know cipher modulus?

In short, \log{}Q is small because the multiplicative depth is small.

I suggest you do not set the security level as HEStd_NotSet and not set the ring dimension manually because this will deteriorate the security level of your application unless you know what you are doing.

Last small Question
i find this example(openfhe-development/src/pke/examples/SHE_table.cpp at security-guidelines · openfheorg/openfhe-development · GitHub)
i am confused about meaning of loq Q, log P, log PQ
i thinked that loq Q is Ciphertext modulus
but what is loq PQ?

P is an auxiliary modulus used in key switching. When considering the security analysis of the RLWE scheme, the ciphertext coefficient modulus is considered to be Q \cdot P, i.e., comprising both moduli. If you use OpenFHE as shown in the usage examples, you do not need to worry about these parameters; they will be set automatically by the library, optimized to achieve the application requirements and the desired security level.

1 Like