Template Class CryptoParametersBase
Defined in File base-cryptoparameters.h
Page Contents
Inheritance Relationships
Base Type
public lbcrypto::Serializable(Class Serializable)
Derived Types
public lbcrypto::CryptoParametersRLWE< DCRTPoly >(Template Class CryptoParametersRLWE)public lbcrypto::CryptoParametersRLWE< Element >(Template Class CryptoParametersRLWE)
Template Parameter Order
typename Element
Class Documentation
-
template<typename Element>
class lbcrypto::CryptoParametersBase : public lbcrypto::Serializable Inheritence diagram for lbcrypto::CryptoParametersBase:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
"5" [label="lbcrypto::CryptoParametersBFVRNS" tooltip="lbcrypto::CryptoParametersBFVRNS"]
"8" [label="lbcrypto::CryptoParametersRLWE< Element >" tooltip="lbcrypto::CryptoParametersRLWE< Element >"]
"1" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >" fillcolor="#BFBFBF"]
"6" [label="lbcrypto::CryptoParametersBGVRNS" tooltip="lbcrypto::CryptoParametersBGVRNS"]
"4" [label="lbcrypto::CryptoParametersRNS" tooltip="lbcrypto::CryptoParametersRNS"]
"7" [label="lbcrypto::CryptoParametersCKKSRNS" tooltip="lbcrypto::CryptoParametersCKKSRNS"]
"3" [label="lbcrypto::CryptoParametersRLWE< DCRTPoly >" tooltip="lbcrypto::CryptoParametersRLWE< DCRTPoly >"]
"5" -> "4" [dir=forward tooltip="public-inheritance"]
"8" -> "1" [dir=forward tooltip="public-inheritance"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"6" -> "4" [dir=forward tooltip="public-inheritance"]
"4" -> "3" [dir=forward tooltip="public-inheritance"]
"7" -> "4" [dir=forward tooltip="public-inheritance"]
"3" -> "1" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-f6f922d3d3ddfefc54831db5a0989fe210f75385.png)
Collaboration diagram for lbcrypto::CryptoParametersBase:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
"1" [label="lbcrypto::CryptoParametersBase< Element >" tooltip="lbcrypto::CryptoParametersBase< Element >" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../_images/graphviz-c6a0858f621029dfa0db85752f580721927adfe2.png)
main implementation class to capture essential cryptoparameters of any LBC system
- Template Parameters
Element – a ring element.
Subclassed by lbcrypto::CryptoParametersRLWE< DCRTPoly >, lbcrypto::CryptoParametersRLWE< Element >
Public Functions
-
CryptoParametersBase() = default
-
virtual ~CryptoParametersBase() = default
-
inline virtual PlaintextModulus GetPlaintextModulus() const
Returns the value of plaintext modulus p
- Returns
the plaintext modulus.
-
inline uint32_t GetBatchSize() const
-
inline const std::shared_ptr<typename Element::Params> GetElementParams() const
Returns the reference to IL params
- Returns
the ring element parameters.
-
inline uint32_t GetRingDimension() const
-
inline const EncodingParams GetEncodingParams() const
Returns the reference to encoding params
- Returns
the encoding parameters.
-
inline void SetPlaintextModulus(PlaintextModulus plaintextModulus)
Sets the value of plaintext modulus p
-
inline void SetBatchSize(uint32_t batchSize)
-
inline bool operator==(const CryptoParametersBase<Element> &rhs) const
-
inline bool operator!=(const CryptoParametersBase<Element> &rhs) const
-
inline virtual uint32_t GetDigitSize() const
-
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
Sets the reference to element params
-
inline virtual void SetEncodingParams(EncodingParams encodingParams)
Sets the reference to encoding params
-
inline virtual std::string SerializedObjectName() const override
Public Static Functions
-
static inline uint32_t SerializedVersion()
Protected Functions
-
inline explicit CryptoParametersBase(const PlaintextModulus &plaintextModulus)
-
inline virtual bool CompareTo(const CryptoParametersBase<Element> &rhs) const
CompareTo() is a method to compare two CryptoParametersBase objects. It is called by operator==()
- Parameters
rhs – - the other CryptoParametersBase object to compare to.
- Returns
whether the two CryptoParametersBase objects are equivalent.
-
inline virtual void PrintParameters(std::ostream &out) const
Protected Attributes
-
EncodingParams m_encodingParams
Friends
-
inline friend std::ostream &operator<<(std::ostream &out, const CryptoParametersBase &item)
Overload to allow printing of parameters to an iostream NOTE that the implementation relies on calling the virtual PrintParameters method
- Parameters
out – - the stream to print to
item – - reference to the item to print
- Returns
the stream