Template Class ParameterGenerationBase

Template Parameter Order

  1. class Element

Class Documentation

template<class Element>
class lbcrypto::ParameterGenerationBase

Abstract interface for parameter generation algorithm.

Template Parameters

Element – a ring element.

Public Functions

inline virtual ~ParameterGenerationBase()
inline virtual bool ParamsGenBFVRNS(std::shared_ptr<CryptoParametersBase<Element>> cryptoParams, uint32_t evalAddCount, uint32_t multiplicativeDepth, uint32_t keySwitchCount, size_t dcrtBits, uint32_t n, uint32_t numPartQ) const

Method for computing all derived parameters based on chosen primitive parameters

Parameters
  • *cryptoParams – the crypto parameters object to be populated with parameters.

  • evalAddCount – number of EvalAdds assuming no EvalMult and KeySwitch operations are performed.

  • multiplicativeDepth – number of EvalMults assuming no EvalAdd and KeySwitch operations are performed.

  • keySwitchCount – number of KeySwitch operations assuming no EvalAdd and EvalMult operations are performed.

  • dcrtBits – number of bits in each CRT modulus*

  • n – ring dimension in case the user wants to use a custom ring dimension

  • numPartQ – number of partitions of Q for HYBRID key switching

inline virtual bool ParamsGenCKKSRNS(std::shared_ptr<CryptoParametersBase<Element>> cryptoParams, usint cyclOrder, usint numPrimes, usint scalingModSize, usint firstModSize, uint32_t numPartQ, COMPRESSION_LEVEL mPIntBootCiphertextCompressionLevel) const

Method for computing all derived parameters based on chosen primitive parameters.

Parameters
  • *cryptoParams – the crypto parameters object to be populated with parameters.

  • cyclOrder – the cyclotomic order.

  • numPrimes – number of modulus towers to support.

  • scalingModSize – the bit-width for plaintexts and DCRTPoly’s.

  • firstModSize – the bit-size of the first modulus

  • numPartQ – number of partitions of Q for HYBRID key switching

inline virtual bool ParamsGenBGVRNS(std::shared_ptr<CryptoParametersBase<DCRTPoly>> cryptoParams, uint32_t evalAddCount, uint32_t keySwitchCount, usint cyclOrder, usint numPrimes, usint firstModSize, usint dcrtBits, uint32_t numPartQ, usint multihopQBound) const

Method for computing all derived parameters based on chosen primitive parameters. This is intended for BGVrns

Parameters
  • *cryptoParams – the crypto parameters object to be populated with parameters.

  • evalAddCount – number of EvalAdds per level.

  • keySwitchCount – number of KeySwitch operations per level.

  • cyclOrder – the cyclotomic order.

  • numPrimes – number of modulus towers to support.

  • firstModSize – the bit-size of the first modulus

  • dcrtBits – the bit-width of moduli

  • numPartQ – number of partitions of Q for HYBRID key switching

  • multihopQBound – bound for the HRA-secure mode of PRE

template<class Archive>
inline void save(Archive &ar, std::uint32_t const version) const
template<class Archive>
inline void load(Archive &ar, std::uint32_t const version)
inline std::string SerializedObjectName() const