Template Function lbcrypto::genCryptoContextBGVRNSInternal

Function Documentation

template<typename ContextGeneratorType, typename Element>
ContextGeneratorType::ContextType lbcrypto::genCryptoContextBGVRNSInternal(const CCParams<ContextGeneratorType> &parameters)

Builds a BGV crypto context from the parameters: creates the crypto parameters object (with the noise scale set to the plaintext modulus), computes the number of HYBRID digits, creates the scheme object with the requested key switching technique, runs the BGV parameter generation for multiplicativeDepth + 1 primes and registers the context with the factory. MUST NOT be used without the wrapper CryptoContextBGVRNS::genCryptoContext(), which validates the parameters first.

Template Parameters
  • ContextGeneratorType – the context generator class (CryptoContextBGVRNS).

  • Element – the ring element type (DCRTPoly).

Parameters

parameters – the BGV parameters.

Returns

the generated crypto context.