Class ParameterGenerationRNS

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class lbcrypto::ParameterGenerationRNS : public lbcrypto::ParameterGenerationBase<DCRTPoly>

Inheritence diagram for lbcrypto::ParameterGenerationRNS:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="lbcrypto::ParameterGenerationRNS" tooltip="lbcrypto::ParameterGenerationRNS" fillcolor="#BFBFBF"] "5" [label="lbcrypto::ParameterGenerationCKKSRNS" tooltip="lbcrypto::ParameterGenerationCKKSRNS"] "3" [label="lbcrypto::ParameterGenerationBFVRNS" tooltip="lbcrypto::ParameterGenerationBFVRNS"] "4" [label="lbcrypto::ParameterGenerationBGVRNS" tooltip="lbcrypto::ParameterGenerationBGVRNS"] "2" [label="lbcrypto::ParameterGenerationBase< DCRTPoly >" tooltip="lbcrypto::ParameterGenerationBase< DCRTPoly >"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "4" -> "1" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for lbcrypto::ParameterGenerationRNS:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="lbcrypto::ParameterGenerationRNS" tooltip="lbcrypto::ParameterGenerationRNS" fillcolor="#BFBFBF"] "2" [label="lbcrypto::ParameterGenerationBase< DCRTPoly >" tooltip="lbcrypto::ParameterGenerationBase< DCRTPoly >"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Abstract interface for parameter generation algorithm.

Template Parameters

Element – a ring element.

Subclassed by lbcrypto::ParameterGenerationBFVRNS, lbcrypto::ParameterGenerationBGVRNS, lbcrypto::ParameterGenerationCKKSRNS

Public Functions

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

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

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

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 override

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.

  • digitSize – the digit size

  • secretKeyDist

  • ksTech – the key switching technique used (e.g., BV or GHS)

  • firstModSize – the bit-size of the first modulus

  • dcrtBits – the bit-width of moduli.

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

Protected Types

enum DCRT_MODULUS

Values:

enumerator DEFAULT_EXTRA_MOD_SIZE
enumerator MIN_SIZE
enumerator MAX_SIZE