Class KeySwitchHYBRID

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::KeySwitchHYBRID : public lbcrypto::KeySwitchRNS

Inheritence diagram for lbcrypto::KeySwitchHYBRID:

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

Collaboration diagram for lbcrypto::KeySwitchHYBRID:

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

Hybrid Keyswitching as described in [ Homomorphic Evaluation of the AES Circuit(GHS Scheme)](https://eprint.iacr.org/2012/099.pdf) Uses a mix of BV and GHS keyswitching for efficient key-switching.

Public Functions

inline KeySwitchHYBRID()
inline virtual ~KeySwitchHYBRID()
virtual EvalKey<DCRTPoly> KeySwitchGenInternal(const PrivateKey<DCRTPoly> oldPrivateKey, const PrivateKey<DCRTPoly> newPrivateKey) const override

Method for KeySwitchGen

Parameters
  • &originalPrivateKey – Original private key used for encryption.

  • &newPrivateKey – New private key to generate the keyswitch hint.

  • *KeySwitchHint – is where the resulting keySwitchHint will be placed.

virtual EvalKey<DCRTPoly> KeySwitchGenInternal(const PrivateKey<DCRTPoly> oldPrivateKey, const PrivateKey<DCRTPoly> newPrivateKey, const EvalKey<DCRTPoly> evalKey) const override
virtual EvalKey<DCRTPoly> KeySwitchGenInternal(const PrivateKey<DCRTPoly> oldPrivateKey, const PublicKey<DCRTPoly> newPublicKey) const override
virtual void KeySwitchInPlace(Ciphertext<DCRTPoly> &ciphertext, const EvalKey<DCRTPoly> evalKey) const override
virtual Ciphertext<DCRTPoly> KeySwitchExt(ConstCiphertext<DCRTPoly> ciphertext, bool addFirst) const override
virtual Ciphertext<DCRTPoly> KeySwitchDown(ConstCiphertext<DCRTPoly> ciphertext) const override
virtual DCRTPoly KeySwitchDownFirstElement(ConstCiphertext<DCRTPoly> ciphertext) const override
virtual std::shared_ptr<std::vector<DCRTPoly>> KeySwitchCore(const DCRTPoly &a, const EvalKey<DCRTPoly> evalKey) const override
virtual std::shared_ptr<std::vector<DCRTPoly>> EvalKeySwitchPrecomputeCore(const DCRTPoly &c, std::shared_ptr<CryptoParametersBase<DCRTPoly>> cryptoParamsBase) const override
std::shared_ptr<std::vector<DCRTPoly>> EvalFastKeySwitchCore(const std::shared_ptr<std::vector<DCRTPoly>> digits, const EvalKey<DCRTPoly> evalKey, const std::shared_ptr<ParmType> paramsQl) const override
std::shared_ptr<std::vector<DCRTPoly>> EvalFastKeySwitchCoreExt(const std::shared_ptr<std::vector<DCRTPoly>> digits, const EvalKey<DCRTPoly> evalKey, const std::shared_ptr<ParmType> paramsQl) const override
template<class Archive>
inline void save(Archive &ar) const
template<class Archive>
inline void load(Archive &ar)
inline virtual std::string SerializedObjectName() const override