Template Class EvalKeyRelinImpl

Inheritance Relationships

Base Type

Template Parameter Order

  1. class Element

Class Documentation

template<class Element>
class lbcrypto::EvalKeyRelinImpl : public lbcrypto::EvalKeyImpl<Element>

Inheritence diagram for lbcrypto::EvalKeyRelinImpl:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="lbcrypto::EvalKeyRelinImpl< Element >" tooltip="lbcrypto::EvalKeyRelinImpl< Element >" fillcolor="#BFBFBF"]
    "5" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "2" [label="lbcrypto::EvalKeyImpl< Element >" tooltip="lbcrypto::EvalKeyImpl< Element >"]
    "4" [label="lbcrypto::CryptoObject< Element >" tooltip="lbcrypto::CryptoObject< Element >"]
    "3" [label="lbcrypto::Key< Element >" tooltip="lbcrypto::Key< Element >"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "3" -> "5" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for lbcrypto::EvalKeyRelinImpl:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="lbcrypto::EvalKeyRelinImpl< Element >" tooltip="lbcrypto::EvalKeyRelinImpl< Element >" fillcolor="#BFBFBF"]
    "5" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"]
    "2" [label="lbcrypto::EvalKeyImpl< Element >" tooltip="lbcrypto::EvalKeyImpl< Element >"]
    "4" [label="lbcrypto::CryptoObject< Element >" tooltip="lbcrypto::CryptoObject< Element >"]
    "3" [label="lbcrypto::Key< Element >" tooltip="lbcrypto::Key< Element >"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
    "3" -> "5" [dir=forward tooltip="public-inheritance"]
}

Concrete class for Relinearization keys of RLWE scheme.

Template Parameters

Element – a ring element.

Public Functions

inline explicit EvalKeyRelinImpl(const CryptoContext<Element> &cc)

Basic constructor for setting the crypto context

Parameters

cc – the crypto context the key belongs to

EvalKeyRelinImpl() = default
virtual ~EvalKeyRelinImpl() = default
inline EvalKeyRelinImpl(const EvalKeyRelinImpl<Element> &rhs)

Copy constructor

Parameters

rhs – key to copy from

inline EvalKeyRelinImpl(EvalKeyRelinImpl<Element> &&rhs) noexcept

Move constructor

Parameters

rhs – key to move from

inline operator bool() const

Checks whether the key is usable: it has a crypto context and both key vectors A and B are non-empty.

Returns

true if the key has a crypto context and non-empty A and B vectors

inline EvalKeyRelinImpl<Element> &operator=(const EvalKeyRelinImpl<Element> &rhs)

Assignment Operator.

Parameters

rhs – key to copy from

Returns

the resulting EvalKeyRelinImpl

inline EvalKeyRelinImpl<Element> &operator=(EvalKeyRelinImpl<Element> &&rhs) noexcept

Move Assignment Operator.

Parameters

rhs – key to move from

Returns

the resulting EvalKeyRelinImpl

inline virtual void SetAVector(const std::vector<Element> &a) override

Setter function to store Relinearization Element Vector A. Overrides base class implementation.

Parameters

a – is the Element vector to be copied.

inline virtual void SetAVector(std::vector<Element> &&a) noexcept override

Setter function to store Relinearization Element Vector A. Overrides base class implementation.

Parameters

a – is the Element vector to be moved.

inline virtual const std::vector<Element> &GetAVector() const override

Getter function to access Relinearization Element Vector A. Overrides base class implementation.

Returns

Element vector A.

inline virtual void SetBVector(const std::vector<Element> &b) override

Setter function to store Relinearization Element Vector B. Overrides base class implementation.

Parameters

b – is the Element vector to be copied.

inline virtual void SetBVector(std::vector<Element> &&b) noexcept override

Setter function to store Relinearization Element Vector B. Overrides base class implementation.

Parameters

b – is the Element vector to be moved.

inline virtual const std::vector<Element> &GetBVector() const override

Getter function to access Relinearization Element Vector B. Overrides base class implementation.

Returns

Element vector B.

inline virtual void ClearKeys() override

Releases the key material: clears both key vectors A and B.

inline virtual bool key_compare(const EvalKeyImpl<Element> &rhs) const override

Compares this key with another evaluation key, which must be an EvalKeyRelinImpl. Keys are equal if they share the crypto context (by pointer) and key tag and have equal A and B vectors.

Parameters

rhs – the evaluation key to compare with

Returns

true if the keys are equal

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

Returns the name identifying the derived class in serialized form; every serializable class provides it.

Returns

the serialized object name

Public Static Functions

static inline uint32_t SerializedVersion()