Hello, I am trying to setup a cryptocontext for CKKS but I am struggling with security levels.
In particular, this is the context I am creating:
CCParams<CryptoContextCKKSRNS> parameters;
SecurityLevel securityLevel = lbcrypto::HEStd_128_classic;
parameters.SetSecretKeyDist(UNIFORM_TERNARY);
parameters.SetSecurityLevel(securityLevel);
parameters.SetBatchSize(1 << 14);
ScalingTechnique rescaleTech = FLEXIBLEAUTO;
usint dcrtBits = 58;
usint firstMod = 42;
parameters.SetScalingModSize(dcrtBits);
parameters.SetScalingTechnique(rescaleTech);
parameters.SetFirstModSize(firstMod);
usint depth =
levelsUsedBeforeBootstrap + FHECKKSRNS::GetBootstrapDepth(8, {3, 3}, UNIFORM_TERNARY);
cout << endl << "Ciphertexts depth: " << depth << endl;
parameters.SetMultiplicativeDepth(depth);
context = GenCryptoContext(parameters);
cout << "Ring size " << log2(context->GetRingDimension());
The problem is that I obtain these ring dimensions:
HESTD_128_classic -> ring: 2^17
HESTD_192_classic -> ring: 2^17
HESTD_256_classic -> ring: 2^17
HESTD_128_quantum -> ring: 2^16
HESTD_192_quantum -> ring: 2^17
HESTD_256_quantum -> ring: 2^16
These values seem weird to me, especially the HESTD_192_quantum
one (or the other two quantum!). Plus, in previous versions with the same context I used to get 2^16 when using HESTD_128_classic
.
Thank you