Class KeySwitchBV

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::KeySwitchBV : public lbcrypto::KeySwitchRNS

Inheritence diagram for lbcrypto::KeySwitchBV:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="lbcrypto::KeySwitchBV" tooltip="lbcrypto::KeySwitchBV" 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::KeySwitchBV:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="lbcrypto::KeySwitchBV" tooltip="lbcrypto::KeySwitchBV" 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"] }

Implements BV key switching method from [Fully Homomorphic Encryption from Ring-LWE and Security for Key Dependent Messages (BVScheme)]( https://www.wisdom.weizmann.ac.il/~zvikab/localpapers/IdealHom.pdf ) See the Appendix of https://eprint.iacr.org/2021/204 for more detailed description. Requires the computation of a quadratic number of NTTs.

Public Functions

inline KeySwitchBV()
inline virtual ~KeySwitchBV()
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 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
template<class Archive>
inline void save(Archive &ar) const
template<class Archive>
inline void load(Archive &ar)
inline virtual std::string SerializedObjectName() const override