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:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
"1" [label="lbcrypto::CryptoParametersRLWE< Element >" tooltip="lbcrypto::CryptoParametersRLWE< Element >" fillcolor="#BFBFBF"]
"2" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-1fc391985aa7aea43b1eefda8c9ac48a516d308c.png)
Collaboration diagram for lbcrypto::CryptoParametersRLWE:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
"1" [label="lbcrypto::CryptoParametersRLWE< Element >" tooltip="lbcrypto::CryptoParametersRLWE< Element >" fillcolor="#BFBFBF"]
"2" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-1fc391985aa7aea43b1eefda8c9ac48a516d308c.png)
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
-
~CryptoParametersRLWE() override = default
Virtual 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 GetDigitSize() const override
Returns the value of digit size.
- Returns
the digit size.
-
inline virtual double GetNoiseEstimate() const
-
inline virtual uint32_t GetMultiplicativeDepth() const
-
inline virtual uint32_t GetEvalAddCount() const
-
inline virtual uint32_t GetKeySwitchCount() const
-
inline virtual uint32_t GetPRENumHops() const
-
inline virtual uint32_t GetMaxRelinSkDeg() const override
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 SetDigitSize(uint32_t digitSize)
Sets the value of digit size
- Parameters
digitSize –
-
inline void SetNoiseEstimate(double noiseEstimate)
-
inline void SetMultiplicativeDepth(uint32_t multiplicativeDepth)
-
inline void SetEvalAddCount(uint32_t evalAddCount)
-
inline void SetKeySwitchCount(uint32_t keySwitchCount)
-
inline void SetPRENumHops(uint32_t PRENumHops)
-
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 std::string SerializedObjectName() const override
Protected Functions
-
inline virtual bool CompareTo(const CryptoParametersBase<Element> &rhs) const override
CompareTo() is a method to compare two CryptoParametersRLWE objects. It is called by CryptoParametersBase::operator==()
- Parameters
rhs – - the other CryptoParametersRLWE object to compare to.
- Returns
whether the two CryptoParametersRLWE objects are equivalent.
-
inline virtual void PrintParameters(std::ostream &os) const override
Protected Attributes
-
float m_distributionParameter = 0
-
double m_floodingDistributionParameter = 0
-
float m_assuranceMeasure = 0
-
PlaintextModulus m_noiseScale = 1
-
uint32_t m_digitSize = 1
-
double m_noiseEstimate = {0}
-
uint32_t m_multiplicativeDepth = {1}
-
uint32_t m_evalAddCount = {0}
-
uint32_t m_keySwitchCount = {0}
-
uint32_t m_PRENumHops = {0}
-
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
-
uint32_t m_thresholdNumOfParties = 1