Class LeveledSHEBFVRNS

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::LeveledSHEBFVRNS : public lbcrypto::LeveledSHERNS

Inheritence diagram for lbcrypto::LeveledSHEBFVRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="lbcrypto::LeveledSHEBase< DCRTPoly >" tooltip="lbcrypto::LeveledSHEBase< DCRTPoly >"]
    "1" [label="lbcrypto::LeveledSHEBFVRNS" tooltip="lbcrypto::LeveledSHEBFVRNS" fillcolor="#BFBFBF"]
    "2" [label="lbcrypto::LeveledSHERNS" tooltip="lbcrypto::LeveledSHERNS"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for lbcrypto::LeveledSHEBFVRNS:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="lbcrypto::LeveledSHEBase< DCRTPoly >" tooltip="lbcrypto::LeveledSHEBase< DCRTPoly >"]
    "1" [label="lbcrypto::LeveledSHEBFVRNS" tooltip="lbcrypto::LeveledSHEBFVRNS" fillcolor="#BFBFBF"]
    "2" [label="lbcrypto::LeveledSHERNS" tooltip="lbcrypto::LeveledSHERNS"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
}

Public Functions

virtual ~LeveledSHEBFVRNS() = default
void EvalAddInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override

Virtual function to define the interface for homomorphic addition of ciphertexts.

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

void EvalSubInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override

Virtual function to define the interface for homomorphic addition of ciphertexts.

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

virtual Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext.

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

virtual Ciphertext<DCRTPoly> EvalSquare(ConstCiphertext<DCRTPoly> &ciphertext) const override

Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext.

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2, const EvalKey<DCRTPoly> evalKey) const override
void EvalMultInPlace(Ciphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2, const EvalKey<DCRTPoly> evalKey) const override
Ciphertext<DCRTPoly> EvalSquare(ConstCiphertext<DCRTPoly> &ciphertext, const EvalKey<DCRTPoly> evalKey) const override
void EvalSquareInPlace(Ciphertext<DCRTPoly> &ciphertext1, const EvalKey<DCRTPoly> evalKey) const override
void EvalMultCoreInPlace(Ciphertext<DCRTPoly> &ciphertext, NativeInteger scalar) const
virtual Ciphertext<DCRTPoly> EvalMultMutable(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for multiplicative homomorphic evaluation of ciphertext. This is the mutable version - input ciphertexts may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

Ciphertext<DCRTPoly> EvalMultMutable(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2, const EvalKey<DCRTPoly> evalKey) const override
virtual Ciphertext<DCRTPoly> EvalMultMutable(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override

Virtual function to define the interface for multiplication of ciphertext by plaintext. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

void EvalMultMutableInPlace(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2, const EvalKey<DCRTPoly> evalKey) const override
virtual void EvalMultMutableInPlace(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override

Virtual function to define the interface for multiplication of ciphertext by plaintext. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

virtual Ciphertext<DCRTPoly> EvalAddMutable(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertexts may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

virtual Ciphertext<DCRTPoly> EvalAddMutable(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override

Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

virtual void EvalAddMutableInPlace(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override
virtual void EvalAddMutableInPlace(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override

Virtual function to define the interface for homomorphic addition of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

virtual Ciphertext<DCRTPoly> EvalSubMutable(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

virtual Ciphertext<DCRTPoly> EvalSubMutable(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override

Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

virtual void EvalSubMutableInPlace(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for homomorphic subtraction of ciphertexts. This is the mutable version - input ciphertext may change (automatically rescaled, or towers dropped).

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

virtual void EvalSubMutableInPlace(Ciphertext<DCRTPoly> &ciphertext, Plaintext &plaintext) const override
Ciphertext<DCRTPoly> EvalAutomorphism(ConstCiphertext<DCRTPoly> &ciphertext, uint32_t i, const std::map<uint32_t, EvalKey<DCRTPoly>> &evalKeyMap, CALLER_INFO_ARGS_HDR) const override
Ciphertext<DCRTPoly> EvalFastRotation(ConstCiphertext<DCRTPoly> &ciphertext, const uint32_t index, const uint32_t m, const std::shared_ptr<std::vector<DCRTPoly>> digits) const override
std::shared_ptr<std::vector<DCRTPoly>> EvalFastRotationPrecompute(ConstCiphertext<DCRTPoly> &ciphertext) const override
virtual uint32_t FindAutomorphismIndex(uint32_t index, uint32_t m) const override
virtual Ciphertext<DCRTPoly> Compress(ConstCiphertext<DCRTPoly> &ciphertext, size_t towersLeft, size_t noiseScaleDeg) const override
template<class Archive>
inline void save(Archive &ar) const
template<class Archive>
inline void load(Archive &ar)
inline std::string SerializedObjectName() const
void EvalAddInPlace(Ciphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for in-place homomorphic addition of ciphertexts.

Parameters
  • ciphertext1 – the input/output ciphertext.

  • ciphertext2 – the input ciphertext.

void EvalAddInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override

Virtual function to define the interface for homomorphic addition of ciphertexts.

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

void EvalSubInPlace(Ciphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2) const override

Virtual function to define the interface for homomorphic subtraction of ciphertexts.

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

void EvalSubInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override
Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2) const override
Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override
void EvalMultInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override
Ciphertext<DCRTPoly> EvalSquare(ConstCiphertext<DCRTPoly> &ciphertext) const override