Template Class KeySwitchBase

Template Parameter Order

  1. class Element

Class Documentation

template<class Element>
class lbcrypto::KeySwitchBase

Abstract class for LBC keyswitching.

Template Parameters

Element – a secret key type instantiation

Public Functions

inline KeySwitchBase()
inline virtual ~KeySwitchBase()
inline virtual EvalKey<Element> KeySwitchGenInternal(const PrivateKey<Element> oldPrivateKey, const PrivateKey<Element> newPrivateKey) const

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.

inline virtual EvalKey<Element> KeySwitchGenInternal(const PrivateKey<Element> oldPrivateKey, const PrivateKey<Element> newPrivateKey, const EvalKey<Element> evalKey) const
inline virtual EvalKey<Element> KeySwitchGenInternal(const PrivateKey<Element> oldPrivateKey, const PublicKey<Element> newPublicKey) const
virtual Ciphertext<Element> KeySwitch(ConstCiphertext<Element> ciphertext, const EvalKey<Element> evalKey) const
inline virtual void KeySwitchInPlace(Ciphertext<Element> &ciphertext, const EvalKey<Element> evalKey) const
inline virtual Ciphertext<Element> KeySwitchExt(ConstCiphertext<Element> ciphertext, bool addFirst) const
inline virtual Ciphertext<Element> KeySwitchDown(ConstCiphertext<Element> ciphertext) const
inline virtual Element KeySwitchDownFirstElement(ConstCiphertext<Element> ciphertext) const
inline virtual std::shared_ptr<std::vector<Element>> KeySwitchCore(const Element &a, const EvalKey<Element> evalKey) const
inline virtual std::shared_ptr<std::vector<Element>> EvalKeySwitchPrecomputeCore(const Element &c, std::shared_ptr<CryptoParametersBase<Element>> cryptoParamsBase) const
inline virtual std::shared_ptr<std::vector<Element>> EvalFastKeySwitchCore(const std::shared_ptr<std::vector<Element>> digits, const EvalKey<Element> evalKey, const std::shared_ptr<ParmType> paramsQl) const
inline virtual std::shared_ptr<std::vector<Element>> EvalFastKeySwitchCoreExt(const std::shared_ptr<std::vector<Element>> digits, const EvalKey<Element> evalKey, const std::shared_ptr<ParmType> paramsQl) const