Hello OpenFHE team and thank you for your great library.
I was doing some test with BGV to know the value that is automatically chosen for the Ring Dimension depending on the Multiplicative Depth and the Plaintext Modulus. For most value, I have no issue but sometimes, I get a strange exception :
“openfhe-development/src/pke/lib/scheme/bgvrns/bgvrns-parametergeneration.cpp:l.642:ParamsGenBGVRNSInternal(): The ring dimension found using estimated logQ(P) [16384] does does not meet security requirements. Report this problem to OpenFHE developers and set the ring dimension manually to 32768.
Aborted (core dumped)”
A code that result in this error is the following :
CCParams< CryptoContextBGVRNS > parameters;
parameters.SetPlaintextModulus(786433);
parameters.SetMultiplicativeDepth(6);CryptoContext cc = GenCryptoContext(parameters);
cc->Enable(PKE);
cc->Enable(KEYSWITCH);
cc->Enable(LEVELEDSHE);
cc->Enable(ADVANCEDSHE);cout << cc-> GetRingDimension() << endl;
I want to add that this error only occurs for Multiplicative Depth 6 but I found other Modulus that leads to the same exepction.(mostly values around 19-20 bits). Also, I did the same test for BFV before that and never got that mistake.
I tought it would be important to share this mistake because the exception told me to do so.