Template Class ElemParams

Inheritance Relationships

Base Type

Template Parameter Order

  1. typename IntegerType

Class Documentation

template<typename IntegerType>
class lbcrypto::ElemParams : public lbcrypto::Serializable

Inheritence diagram for lbcrypto::ElemParams:

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::ElemParams< IntegerType >" tooltip="lbcrypto::ElemParams< IntegerType >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for lbcrypto::ElemParams:

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::ElemParams< IntegerType >" tooltip="lbcrypto::ElemParams< IntegerType >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Public Functions

constexpr ElemParams() = default
virtual ~ElemParams() = default
inline ElemParams(uint32_t order, const IntegerType &ctModulus)

Simple constructor method that takes as input root of unity, big root of unity, cyclotomic order and the ciphertext modulus and big ciphertext Modulus. This is used for bit-packing operations.

Parameters
  • order – the cyclotomic order wrapped by the parameter set.

  • ctModulus – the ciphertext modulus wrapped by the parameter set.

  • rUnity – the root of unity.

  • bigCtModulus – the big ciphertext modulus used for bit packing operations.

  • bigRUnity – the big root of unity used for bit packing operations.

inline ElemParams(uint32_t order, const IntegerType &ctModulus, const IntegerType &rUnity)
inline ElemParams(uint32_t order, const IntegerType &ctModulus, const IntegerType &rUnity, const IntegerType &bigCtModulus, const IntegerType &bigRUnity)
inline ElemParams(const ElemParams &rhs)

Copy constructor using assignment to copy wrapped elements.

Parameters

rhs – the input ElemParams copied.

Returns

the resulting parameter set with parameters copied.

inline ElemParams(ElemParams &&rhs) noexcept

Copy constructor using move semnantics to copy wrapped elements.

Parameters

rhs – the input ElemParams copied.

Returns

the resulting copy of the parameter set.

inline ElemParams &operator=(const ElemParams &rhs)

Assignment operator using assignment operations of wrapped elements.

Parameters

rhs – the ElemParams instance to copy.

inline ElemParams &operator=(ElemParams &&rhs) noexcept
inline uint32_t GetCyclotomicOrder() const

Simple getter method for cyclotomic order.

Returns

The cyclotomic order.

inline uint32_t GetRingDimension() const

Simple ring dimension getter method. The ring dimension is the evaluation of the totient function of the cyclotomic order.

Returns

the ring dimension.

inline const IntegerType &GetModulus() const

Simple getter method for the ciphertext modulus, not the big ciphertext modulus.

Returns

The ciphertext modulus, not the big ciphertext modulus.

inline const IntegerType &GetBigModulus() const

Simpler getter method for the big ciphertext modulus. This is not relevant for all applications.

Returns

The big ciphertext modulus.

inline const IntegerType &GetRootOfUnity() const

Simple getter method for the root of unity, not the big root of unity.

Returns

The root of unity, not the big root of unity.

inline const IntegerType &GetBigRootOfUnity() const

Simple getter method for the big root of unity.

Returns

The the big root of unity.

inline virtual bool operator==(const ElemParams<IntegerType> &other) const

Equality operator that tests the equality of all wrapped values.

Parameters

other – the other ElemenParams to compare to.

Returns

True if all elements are equal, and False otherwise.

inline bool operator!=(const ElemParams<IntegerType> &other) const

Inequality operator that tests the equality of all wrapped values.

Parameters

other – the other ElemenParams to compare to.

Returns

False if all elements are equal, and True otherwise.

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 virtual std::string SerializedObjectName() const override

Public Static Functions

static inline uint32_t SerializedVersion()

Protected Functions

inline virtual std::ostream &doprint(std::ostream &out) const

Pretty print operator for the ElemParams type.

Parameters

out – the ElemParams to output

Returns

the resulting output stream.

Protected Attributes

uint32_t m_ringDimension = {0}
uint32_t m_cyclotomicOrder = {0}
IntegerType m_ciphertextModulus = {0}
IntegerType m_rootOfUnity = {0}
IntegerType m_bigCiphertextModulus = {0}
IntegerType m_bigRootOfUnity = {0}

Friends

inline friend std::ostream &operator<<(std::ostream &out, const ElemParams &item)

Output strem operator.

Parameters
  • out – the preceding output stream.

  • item – what to add to the output stream.

Returns

the appended output stream.