Hi, I’m new to OpenFHE, so I’m experimenting with some of the parameters. I’m just wondering what SetNumLargeDigits does?
Sample code
CCParams<CryptoContextCKKSRNS> parameters;
parameters.SetSecurityLevel(HEStd_128_classic);
parameters.SetRingDim(1 << 16);
parameters.SetBatchSize(1 << 15);
// parameters.SetNumLargeDigits(3); // Gives back a "The specified ring dimension (65536) does not comply with HE standards recommendation (131072)." error. It seems related to the 128 bit security.
// parameters.SetNumLargeDigits(7); // Gives back a "HYBRID key switching parameters: Can't appropriately distribute 30 towers into 7 digits. Please select different number of digits." Related to the multiplicative depth of 29 and also the default KeySwitch Technique
// parameters.SetNumLargeDigits(15); // Doesn't error out
parameters.SetScalingModSize(52);
parameters.SetScalingTechnique(FLEXIBLEAUTO);
parameters.SetFirstModSize(55);
parameters.SetMultiplicativeDepth(29);
CryptoContext<DCRTPoly> cryptoContext = GenCryptoContext(parameters);
I tried different parameters for it, and it seems to have a big effect on whether it errors out. I’ve shown what errors I see above. Could someone explain the observations and how it affects performance?
Thanks in advance.