Class LeveledSHECKKSRNS

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::LeveledSHECKKSRNS : public lbcrypto::LeveledSHERNS

Inheritence diagram for lbcrypto::LeveledSHECKKSRNS:

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::LeveledSHECKKSRNS" tooltip="lbcrypto::LeveledSHECKKSRNS" 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::LeveledSHECKKSRNS:

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::LeveledSHECKKSRNS" tooltip="lbcrypto::LeveledSHECKKSRNS" 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 ~LeveledSHECKKSRNS() = default
virtual Ciphertext<DCRTPoly> EvalAdd(ConstCiphertext<DCRTPoly> &ciphertext, double operand) const override
virtual void EvalAddInPlace(Ciphertext<DCRTPoly> &ciphertext, double operand) const override
virtual Ciphertext<DCRTPoly> EvalAdd(ConstCiphertext<DCRTPoly> &ciphertext, std::complex<double> operand) const override
virtual void EvalAddInPlace(Ciphertext<DCRTPoly> &ciphertext, std::complex<double> operand) const override
virtual Ciphertext<DCRTPoly> EvalSub(ConstCiphertext<DCRTPoly> &ciphertext, double operand) const override
virtual void EvalSubInPlace(Ciphertext<DCRTPoly> &ciphertext, double operand) const override
virtual Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext, double operand) const override
virtual void EvalMultInPlace(Ciphertext<DCRTPoly> &ciphertext, double operand) const override
void EvalMultInPlace(Ciphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override
virtual Ciphertext<DCRTPoly> EvalMult(ConstCiphertext<DCRTPoly> &ciphertext, std::complex<double> operand) const override
virtual void EvalMultInPlace(Ciphertext<DCRTPoly> &ciphertext, std::complex<double> operand) const override
virtual Ciphertext<DCRTPoly> MultByInteger(ConstCiphertext<DCRTPoly> &ciphertext, uint64_t integer) const override
virtual void MultByIntegerInPlace(Ciphertext<DCRTPoly> &ciphertext, uint64_t integer) const override
virtual Ciphertext<DCRTPoly> EvalFastRotationExt(ConstCiphertext<DCRTPoly> &ciphertext, uint32_t index, const std::shared_ptr<std::vector<DCRTPoly>> digits, bool addFirst, const std::map<uint32_t, EvalKey<DCRTPoly>> &evalKeys) const override
virtual uint32_t FindAutomorphismIndex(uint32_t index, uint32_t m) const override
virtual void ModReduceInternalInPlace(Ciphertext<DCRTPoly> &ciphertext, size_t levels) const override

Method for scaling in-place.

cipherText will have modulus reduction performed in-place.

Parameters
  • cipherText – is the ciphertext to perform modreduce on.

  • levels – the number of towers to drop.

virtual void LevelReduceInternalInPlace(Ciphertext<DCRTPoly> &ciphertext, size_t levels) const override

Method for in-place Level Reduction in the CKKS scheme. It just drops “levels” number of the towers of the ciphertext without changing the underlying plaintext.

Parameters
  • cipherText1 – is the ciphertext to be level reduced in-place

  • levels – the number of towers to drop.

void EvalMultCoreInPlace(Ciphertext<DCRTPoly> &ciphertext, double operand) const
void EvalMultCoreInPlace(Ciphertext<DCRTPoly> &ciphertext, std::complex<double> operand) const
virtual void AdjustLevelsAndDepthInPlace(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override
virtual void AdjustLevelsAndDepthToOneInPlace(Ciphertext<DCRTPoly> &ciphertext1, Ciphertext<DCRTPoly> &ciphertext2) const override
std::vector<DCRTPoly::Integer> GetElementForEvalAddOrSub(ConstCiphertext<DCRTPoly> &ciphertext, double operand) const
std::vector<DCRTPoly::Integer> GetElementForEvalMult(ConstCiphertext<DCRTPoly> &ciphertext, double operand) const
template<class Archive>
inline void save(Archive &ar) const
template<class Archive>
inline void load(Archive &ar)
inline std::string SerializedObjectName() const
Ciphertext<DCRTPoly> EvalAdd(ConstCiphertext<DCRTPoly> &ciphertext1, ConstCiphertext<DCRTPoly> &ciphertext2) const override

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

Parameters
  • ciphertext1 – the input ciphertext.

  • ciphertext2 – the input ciphertext.

Returns

the new ciphertext.

Ciphertext<DCRTPoly> EvalAdd(ConstCiphertext<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.

Returns

the new ciphertext.

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.

Ciphertext<DCRTPoly> EvalSub(ConstCiphertext<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.

Returns

the new ciphertext.

Ciphertext<DCRTPoly> EvalSub(ConstCiphertext<DCRTPoly> &ciphertext, ConstPlaintext &plaintext) const override

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

Parameters
  • ciphertext – the input ciphertext.

  • plaintext – the input plaintext.

Returns

the new ciphertext.

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