Class RLWECiphertextImpl

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::RLWECiphertextImpl : public lbcrypto::Serializable

Inheritence diagram for lbcrypto::RLWECiphertextImpl:

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

Collaboration diagram for lbcrypto::RLWECiphertextImpl:

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

Class that stores an RLWE ciphertext; a vector of ring elements.

Public Functions

RLWECiphertextImpl() = default
inline explicit RLWECiphertextImpl(const std::vector<NativePoly> &elements)

Constructs an RLWE ciphertext from its ring elements

Parameters

elements – the RLWE pair (a, b) as a vector of two ring elements, elements[0] = a and elements[1] = b, where b = a * s + e + encoded message for the RLWE secret key s

inline explicit RLWECiphertextImpl(std::vector<NativePoly> &&elements) noexcept

Constructs an RLWE ciphertext from its ring elements, moving them

Parameters

elements – the RLWE pair (a, b) as a vector of two ring elements, elements[0] = a and elements[1] = b, where b = a * s + e + encoded message for the RLWE secret key s

inline RLWECiphertextImpl(const RLWECiphertextImpl &rhs)
inline RLWECiphertextImpl(RLWECiphertextImpl &&rhs) noexcept
inline RLWECiphertextImpl &operator=(const RLWECiphertextImpl &rhs)
inline RLWECiphertextImpl &operator=(RLWECiphertextImpl &&rhs) noexcept
inline const std::vector<NativePoly> &GetElements() const
inline std::vector<NativePoly> &GetElements()
inline void SetFormat(const Format format)

Switches all ring elements between COEFFICIENT and EVALUATION representation using NTT

Parameters

format – the representation to switch the ring elements to

inline bool operator==(const RLWECiphertextImpl &other) const
Parameters

other – the RLWE ciphertext to compare with

Returns

true if both ciphertexts have equal ring elements

inline bool operator!=(const RLWECiphertextImpl &other) const
Parameters

other – the RLWE ciphertext to compare with

Returns

true if the ring elements differ

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()