Template Class CryptoParametersRLWE
Defined in File rlwe-cryptoparameters.h
Inheritance Relationships
Base Type
public lbcrypto::CryptoParametersBase< Element >
(Template Class CryptoParametersBase)
Template Parameter Order
class Element
Class Documentation
-
template<class Element>
class lbcrypto::CryptoParametersRLWE : public lbcrypto::CryptoParametersBase<Element> Inheritence diagram for lbcrypto::CryptoParametersRLWE:
Collaboration diagram for lbcrypto::CryptoParametersRLWE:
Template for crypto parameters.
- Template Parameters
Element – a ring element.
Public Functions
-
CryptoParametersRLWE() = default
Default Constructor
-
inline CryptoParametersRLWE(const CryptoParametersRLWE &rhs)
Copy constructor.
Constructor that initializes values - uses HomomorphicEncryption.org standard security levels
- Parameters
¶ms – element parameters.
&encodingParams – encoding-specific parameters
distributionParameter – noise distribution parameter.
assuranceMeasure – assurance level.
stdLevel – security level.
digitSize – the size of the digit size.
maxRelinSkDeg – the maximum power of secret key for which the relinearization key is generated
secretKeyDist – mode for secret polynomial, defaults to GAUSSIAN.
noiseScale – used in HRA-secure PRE
-
inline virtual ~CryptoParametersRLWE()
Destructor
-
inline float GetDistributionParameter() const
Returns the value of standard deviation r for discrete Gaussian distribution
- Returns
the standard deviation r.
-
inline double GetFloodingDistributionParameter() const
Returns the value of standard deviation r for discrete Gaussian distribution with flooding
- Returns
the flooding standard deviation r.
-
inline float GetAssuranceMeasure() const
Returns the values of assurance measure alpha
- Returns
the assurance measure.
-
inline PlaintextModulus GetNoiseScale() const
Returns the value of noise scale.
- Returns
the noise scale.
-
inline virtual uint32_t GetMaxRelinSkDeg() const
Returns the value of the maximum power of secret key for which the relinearization key is generated
- Returns
maximum power of secret key
-
inline SecretKeyDist GetSecretKeyDist() const
Gets the secretKeyDist setting: GAUSSIAN or UNIFORM_TERNARY
- Returns
the secretKeyDist setting.
-
inline ProxyReEncryptionMode GetPREMode() const
Gets the pre security mode setting: INDCPA, FIXED_NOISE_HRA, NOISE_FLOODING_HRA or MODULUS_SWITCHING_HRA.
- Returns
the pre security mode setting.
-
inline MultipartyMode GetMultipartyMode() const
Gets the multiparty security mode setting.
- Returns
the multiparty security mode setting.
-
inline ExecutionMode GetExecutionMode() const
Gets the execution mode setting.
- Returns
the execution mode setting.
-
inline DecryptionNoiseMode GetDecryptionNoiseMode()
Gets the decryption noise mode setting.
- Returns
the decryption noise mode setting.
-
inline SecurityLevel GetStdLevel() const
Gets the standard security level
- Returns
the security level.
-
inline const Element::DggType &GetDiscreteGaussianGenerator() const
Returns reference to Discrete Gaussian Generator
- Returns
reference to Discrete Gaussian Generaror.
-
inline Element::DggType &GetFloodingDiscreteGaussianGenerator()
Returns reference to Discrete Gaussian Generator with flooding for PRE
- Returns
reference to Discrete Gaussian Generaror with flooding for PRE. The Std dev for this generator changes based on the PRE mode, so it is not const
-
inline double GetStatisticalSecurity() const
Gets the statistical security level
- Returns
the statistical security level.
-
inline double GetNumAdversarialQueries() const
Gets the number of adversarial queries
- Returns
the number of adversarial queries.
-
inline uint32_t GetThresholdNumOfParties() const
Gets the threshold number of parties
- Returns
the threshold number of parties.
-
inline void SetDistributionParameter(float distributionParameter)
Sets the value of standard deviation r for discrete Gaussian distribution
- Parameters
distributionParameter –
-
inline void SetFloodingDistributionParameter(double distributionParameter)
Sets the value of flooding standard deviation r for discrete Gaussian distribution with flooding
- Parameters
distributionParameter –
-
inline void SetAssuranceMeasure(float assuranceMeasure)
Sets the values of assurance measure alpha
- Parameters
assuranceMeasure –
-
inline void SetStdLevel(SecurityLevel securityLevel)
Sets the standard security level
- Parameters
standard – security level
-
inline void SetNoiseScale(PlaintextModulus noiseScale)
Sets the value of noise scale
- Parameters
noiseScale –
-
inline void SetMaxRelinSkDeg(uint32_t maxRelinSkDeg)
Sets the value of the maximum power of secret key for which the relinearization key is generated
- Parameters
maxRelinSkDeg –
-
inline void SetSecretKeyDist(SecretKeyDist secretKeyDist)
Configures the secretKeyDist for generating the secret key polynomial
- Parameters
secretKeyDist – is GAUSSIAN or UNIFORM_TERNARY
-
inline void SetPREMode(ProxyReEncryptionMode PREMode)
Configures the security mode for pre
- Parameters
PREMode – is INDCPA, FIXED_NOISE_HRA, NOISE_FLOODING_HRA or MODULUS_SWITCHING_HRA.
-
inline void SetMultipartyMode(MultipartyMode multipartyMode)
Configures the security mode for multiparty
- Parameters
multipartyMode – Security mode for multiparty decryption.
-
inline void SetExecutionMode(ExecutionMode executionMode)
Configures the execution for CKKS noise flooding
- Parameters
executionMode – Execution mode.
-
inline void SetDecryptionNoiseMode(DecryptionNoiseMode decryptionNoiseMode)
Configures the decryption noise mode for CKKS noise flooding
- Parameters
decryptionNoiseMode – Decryption noise mode.
-
inline void SetStatisticalSecurity(uint32_t statisticalSecurity)
Configures the decryption noise mode for CKKS noise flooding and PRE
- Parameters
statisticalSecurity. –
-
inline void SetNumAdversarialQueries(uint32_t numAdversarialQueries)
Configures the decryption noise mode for CKKS noise flooding and PRE
- Parameters
numAdversarialQueries. –
-
inline void SetThresholdNumOfParties(uint32_t thresholdNumOfParties)
Configures the number of parties in thresholdFHE
- Parameters
thresholdNumOfParties. –
-
inline virtual bool operator==(const CryptoParametersBase<Element> &rhs) const
== operator to compare to this instance of CryptoParametersRLWE object.
- Parameters
&rhs – CryptoParameters to check equality against.
-
inline virtual void PrintParameters(std::ostream &os) const
-
inline virtual std::string SerializedObjectName() const
Protected Attributes
-
float m_distributionParameter = 0
-
double m_floodingDistributionParameter = 0
-
float m_assuranceMeasure = 0
-
PlaintextModulus m_noiseScale = 1
-
uint32_t m_maxRelinSkDeg = 2
-
SecretKeyDist m_secretKeyDist = GAUSSIAN
-
SecurityLevel m_stdLevel = HEStd_NotSet
-
ProxyReEncryptionMode m_PREMode = NOT_SET
-
MultipartyMode m_multipartyMode = FIXED_NOISE_MULTIPARTY
-
ExecutionMode m_executionMode = EXEC_EVALUATION
-
DecryptionNoiseMode m_decryptionNoiseMode = FIXED_NOISE_DECRYPT
-
double m_statisticalSecurity = 30
-
double m_numAdversarialQueries = 1