in src/hit/common.cpp [127:151]
int poly_degree_to_max_mod_bits(int poly_modulus_degree) {
switch (poly_modulus_degree) {
case 1024:
return 27;
case 2048:
return 54;
case 4096:
return 109;
case 8192:
return 218;
case 16384:
return 438;
case 32768:
return 881;
case 65536:
// extrapolating a best-fit line for the above data points:
// mod_bits <= 0.0269*poly_modulus_degree-1.4428
// SEAL will throw an exception when poly degree is 131072 or larger
// (which corresponds to the 262144th cyclotomic ring)
return 1761;
default:
LOG_AND_THROW_STREAM("poly_modulus_degree " << poly_modulus_degree << " not supported");
}
}