homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.14k stars 765 forks source link

A question about computing security level #372

Open WeiBenqiang opened 4 years ago

WeiBenqiang commented 4 years ago
  //! @brief An estimate for the security-level
  double securityLevel() const
  {
    long phim = zMStar.getPhiM();
    IndexSet primes = ctxtPrimes | specialPrimes;
    if (primes.card() == 0) {
      throw LogicError(
          "Security level cannot be determined as modulus chain is empty.");
    }
    double bitsize = logOfProduct(primes) / log(2.0);
    return (7.2 * phim / bitsize - 110);
  }

Why we need ctxtPrimes | specialPrimes, not just ctxtPrimes,according to image

fionser commented 4 years ago

Q is the largest modulus used for generating secret-key related stuffs, e.g., switching keys.

sarah0813 commented 4 years ago

hi, But why the notation \sigma is missing in the function securityLevel()?

zzwplus commented 2 years ago

May I ask which paper this formula comes from?