PALISADE Lattice Crypto Library  1.11.9
A lattice crypto library for software engineers by software engineers.
Public Member Functions | List of all members
lbcrypto::LPAlgorithmSHEBGVrns< Element > Class Template Reference

#include <bgvrns.h>

Inheritance diagram for lbcrypto::LPAlgorithmSHEBGVrns< Element >:
Inheritance graph
[legend]
Collaboration diagram for lbcrypto::LPAlgorithmSHEBGVrns< Element >:
Collaboration graph
[legend]

Public Member Functions

 LPAlgorithmSHEBGVrns ()
 
virtual ~LPAlgorithmSHEBGVrns ()
 
vector< shared_ptr< ConstCiphertext< Element > > > AdjustLevels (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
void AdjustLevelsEq (Ciphertext< Element > &ciphertext1, Ciphertext< Element > &ciphertext2) const
 
std::pair< shared_ptr< ConstCiphertext< Element > >, Element > AdjustLevels (ConstCiphertext< Element > ciphertext, ConstPlaintext plaintext) const
 
void AdjustLevelsEq (Ciphertext< Element > &ciphertext, Plaintext plaintext) const
 
Ciphertext< Element > EvalAddCore (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
void EvalAddCoreInPlace (Ciphertext< Element > &ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
virtual Ciphertext< Element > EvalAddMutable (Ciphertext< Element > &ciphertext1, Ciphertext< Element > &ciphertext2) const override
 
void EvalAddInPlace (Ciphertext< Element > &ciphertext1, ConstCiphertext< Element > ciphertext2) const override
 
Ciphertext< Element > EvalAddCore (ConstCiphertext< Element > ciphertext, Element ptElement) const
 
Ciphertext< Element > EvalAdd (ConstCiphertext< Element > ciphertext, ConstPlaintext plaintext) const override
 
virtual Ciphertext< Element > EvalAddMutable (Ciphertext< Element > &ciphertext, Plaintext plaintext) const override
 
virtual Ciphertext< Element > EvalLinearWSum (vector< Ciphertext< Element >> ciphertexts, vector< double > constants) const override
 
virtual Ciphertext< Element > EvalLinearWSumMutable (vector< Ciphertext< Element >> ciphertexts, vector< double > constants) const override
 
Ciphertext< Element > EvalSubCore (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
Ciphertext< Element > EvalSub (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const override
 
virtual Ciphertext< Element > EvalSubMutable (Ciphertext< Element > &ciphertext1, Ciphertext< Element > &ciphertext2) const override
 
Ciphertext< Element > EvalSubCore (ConstCiphertext< Element > ciphertext, Element ptElement) const
 
Ciphertext< Element > EvalSub (ConstCiphertext< Element > ciphertext1, ConstPlaintext plaintext) const override
 
virtual Ciphertext< Element > EvalSubMutable (Ciphertext< Element > &ciphertext1, Plaintext plaintext) const override
 
Ciphertext< Element > EvalMultCore (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
Ciphertext< Element > EvalMult (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const override
 
virtual Ciphertext< Element > EvalMultMutable (Ciphertext< Element > &ciphertext1, Ciphertext< Element > &ciphertext2) const override
 
Ciphertext< Element > EvalMultCore (ConstCiphertext< Element > ciphertext, Element ptxt) const
 
Ciphertext< Element > EvalMult (ConstCiphertext< Element > ciphertext, ConstPlaintext plaintext) const override
 
virtual Ciphertext< Element > EvalMultMutable (Ciphertext< Element > &ciphertext, Plaintext plaintext) const override
 
Ciphertext< Element > EvalMult (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2, const LPEvalKey< Element > ek) const override
 
Ciphertext< Element > EvalMultMutable (Ciphertext< Element > &ciphertext1, Ciphertext< Element > &ciphertext2, const LPEvalKey< Element > ek) const override
 
Ciphertext< Element > EvalMultAndRelinearize (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2, const vector< LPEvalKey< Element >> &ek) const override
 
Ciphertext< Element > Relinearize (ConstCiphertext< Element > ciphertext, const vector< LPEvalKey< Element >> &ek) const override
 
void RelinearizeInPlace (Ciphertext< Element > &ciphertext, const vector< LPEvalKey< Element >> &ek) const override
 
Ciphertext< Element > EvalNegate (ConstCiphertext< Element > ct) const override
 
LPEvalKey< Element > KeySwitchHybridGen (const LPPrivateKey< Element > oldKey, const LPPrivateKey< Element > newKey, const LPEvalKey< DCRTPoly > ek=nullptr) const
 
void KeySwitchHybridInPlace (const LPEvalKey< Element > keySwitchHint, Ciphertext< Element > &ciphertext) const
 
LPEvalKey< Element > KeySwitchGHSGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ek=nullptr) const
 
void KeySwitchGHSInPlace (const LPEvalKey< Element > keySwitchHint, Ciphertext< Element > &ciphertext) const
 
LPEvalKey< Element > KeySwitchBVGen (const LPPrivateKey< Element > oldKey, const LPPrivateKey< Element > newKey, const LPEvalKey< DCRTPoly > ek=nullptr) const
 
void KeySwitchBVInPlace (const LPEvalKey< Element > keySwitchHint, Ciphertext< Element > &ciphertext) const
 
virtual LPEvalKey< Element > KeySwitchGen (const LPPrivateKey< Element > oldKey, const LPPrivateKey< Element > newKey) const override
 
void KeySwitchInPlace (const LPEvalKey< Element > keySwitchHint, Ciphertext< Element > &ciphertext) const override
 
LPEvalKey< Element > EvalMultKeyGen (const LPPrivateKey< Element > privateKey) const override
 
vector< LPEvalKey< Element > > EvalMultKeysGen (const LPPrivateKey< Element > privateKey) const override
 
Ciphertext< Element > EvalAutomorphism (ConstCiphertext< Element > ciphertext, usint i, const std::map< usint, LPEvalKey< Element >> &evalKeys, CALLER_INFO_ARGS_HDR) const override
 
shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalAutomorphismKeyGen (const LPPrivateKey< Element > privateKey, const std::vector< usint > &indexList) const override
 
shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalAutomorphismKeyGen (const LPPublicKey< Element > publicKey, const LPPrivateKey< Element > privateKey, const std::vector< usint > &indexList) const override
 
shared_ptr< vector< Element > > EvalFastRotationPrecompute (ConstCiphertext< Element > ciphertext) const override
 
Ciphertext< Element > EvalFastRotation (ConstCiphertext< Element > ciphertext, const usint index, const usint m, const shared_ptr< vector< Element >> precomp) const override
 
template<class Archive >
void save (Archive &ar) const
 
template<class Archive >
void load (Archive &ar)
 
std::string SerializedObjectName () const
 
template<>
LPEvalKey< PolyKeySwitchBVGen (const LPPrivateKey< Poly > oldKey, const LPPrivateKey< Poly > newKey, const LPEvalKey< DCRTPoly > ek) const
 
template<>
LPEvalKey< NativePolyKeySwitchBVGen (const LPPrivateKey< NativePoly > oldKey, const LPPrivateKey< NativePoly > newKey, const LPEvalKey< DCRTPoly > ek) const
 
template<>
LPEvalKey< DCRTPolyKeySwitchBVGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
void KeySwitchBVInPlace (const LPEvalKey< Poly > ek, Ciphertext< Poly > &ciphertext) const
 
template<>
void KeySwitchBVInPlace (const LPEvalKey< NativePoly > ek, Ciphertext< NativePoly > &ciphertext) const
 
template<>
void KeySwitchBVInPlace (const LPEvalKey< DCRTPoly > ek, Ciphertext< DCRTPoly > &ciphertext) const
 
template<>
LPEvalKey< PolyKeySwitchGHSGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
LPEvalKey< NativePolyKeySwitchGHSGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
LPEvalKey< DCRTPolyKeySwitchGHSGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
void KeySwitchGHSInPlace (const LPEvalKey< Poly > ek, Ciphertext< Poly > &ciphertext) const
 
template<>
void KeySwitchGHSInPlace (const LPEvalKey< NativePoly > ek, Ciphertext< NativePoly > &ciphertext) const
 
template<>
void KeySwitchGHSInPlace (const LPEvalKey< DCRTPoly > ek, Ciphertext< DCRTPoly > &ciphertext) const
 
template<>
LPEvalKey< PolyKeySwitchHybridGen (const LPPrivateKey< Poly > oldKey, const LPPrivateKey< Poly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
LPEvalKey< NativePolyKeySwitchHybridGen (const LPPrivateKey< NativePoly > oldKey, const LPPrivateKey< NativePoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
LPEvalKey< DCRTPolyKeySwitchHybridGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey, const LPEvalKey< DCRTPoly > ekPrev) const
 
template<>
void KeySwitchHybridInPlace (const LPEvalKey< Poly > ek, Ciphertext< Poly > &ciphertext) const
 
template<>
void KeySwitchHybridInPlace (const LPEvalKey< NativePoly > ek, Ciphertext< NativePoly > &ciphertext) const
 
template<>
void KeySwitchHybridInPlace (const LPEvalKey< DCRTPoly > ek, Ciphertext< DCRTPoly > &ciphertext) const
 
template<>
LPEvalKey< PolyKeySwitchGen (const LPPrivateKey< Poly > oldKey, const LPPrivateKey< Poly > newKey) const
 
template<>
LPEvalKey< NativePolyKeySwitchGen (const LPPrivateKey< NativePoly > oldKey, const LPPrivateKey< NativePoly > newKey) const
 
template<>
LPEvalKey< DCRTPolyKeySwitchGen (const LPPrivateKey< DCRTPoly > oldKey, const LPPrivateKey< DCRTPoly > newKey) const
 
template<>
void KeySwitchInPlace (const LPEvalKey< Poly > ek, Ciphertext< Poly > &ciphertext) const
 
template<>
void KeySwitchInPlace (const LPEvalKey< NativePoly > ek, Ciphertext< NativePoly > &ciphertext) const
 
template<>
void KeySwitchInPlace (const LPEvalKey< DCRTPoly > ek, Ciphertext< DCRTPoly > &ciphertext) const
 
template<>
vector< shared_ptr< ConstCiphertext< DCRTPoly > > > AdjustLevels (ConstCiphertext< DCRTPoly > ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2) const
 
template<>
void AdjustLevelsEq (Ciphertext< DCRTPoly > &ciphertext1, Ciphertext< DCRTPoly > &ciphertext2) const
 
template<>
std::pair< shared_ptr< ConstCiphertext< DCRTPoly > >, DCRTPolyAdjustLevels (ConstCiphertext< DCRTPoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
void AdjustLevelsEq (Ciphertext< DCRTPoly > &ciphertext, Plaintext plaintext) const
 
template<>
void EvalAddInPlace (Ciphertext< Poly > &ciphertext1, ConstCiphertext< Poly > ciphertext2) const
 
template<>
void EvalAddInPlace (Ciphertext< NativePoly > &ciphertext1, ConstCiphertext< NativePoly > ciphertext2) const
 
template<>
void EvalAddInPlace (Ciphertext< DCRTPoly > &ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2) const
 
template<>
Ciphertext< DCRTPolyEvalAddMutable (Ciphertext< DCRTPoly > &ciphertext1, Ciphertext< DCRTPoly > &ciphertext2) const
 
template<>
Ciphertext< PolyEvalAdd (ConstCiphertext< Poly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< NativePolyEvalAdd (ConstCiphertext< NativePoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalAdd (ConstCiphertext< DCRTPoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalAddMutable (Ciphertext< DCRTPoly > &ciphertext, Plaintext plaintext) const
 
template<>
Ciphertext< PolyEvalSub (ConstCiphertext< Poly > ciphertext1, ConstCiphertext< Poly > ciphertext2) const
 
template<>
Ciphertext< NativePolyEvalSub (ConstCiphertext< NativePoly > ciphertext1, ConstCiphertext< NativePoly > ciphertext2) const
 
template<>
Ciphertext< DCRTPolyEvalSub (ConstCiphertext< DCRTPoly > ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2) const
 
template<>
Ciphertext< DCRTPolyEvalSubMutable (Ciphertext< DCRTPoly > &ciphertext1, Ciphertext< DCRTPoly > &ciphertext2) const
 
template<>
Ciphertext< PolyEvalSub (ConstCiphertext< Poly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< NativePolyEvalSub (ConstCiphertext< NativePoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalSub (ConstCiphertext< DCRTPoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalSubMutable (Ciphertext< DCRTPoly > &ciphertext, Plaintext plaintext) const
 
template<>
Ciphertext< PolyEvalMult (ConstCiphertext< Poly > ciphertext1, ConstCiphertext< Poly > ciphertext2) const
 
template<>
Ciphertext< NativePolyEvalMult (ConstCiphertext< NativePoly > ciphertext1, ConstCiphertext< NativePoly > ciphertext2) const
 
template<>
Ciphertext< DCRTPolyEvalMult (ConstCiphertext< DCRTPoly > ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2) const
 
template<>
Ciphertext< DCRTPolyEvalMultMutable (Ciphertext< DCRTPoly > &ciphertext1, Ciphertext< DCRTPoly > &ciphertext2) const
 
template<>
Ciphertext< PolyEvalMult (ConstCiphertext< Poly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< NativePolyEvalMult (ConstCiphertext< NativePoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalMult (ConstCiphertext< DCRTPoly > ciphertext, ConstPlaintext plaintext) const
 
template<>
Ciphertext< DCRTPolyEvalMultMutable (Ciphertext< DCRTPoly > &ciphertext, Plaintext plaintext) const
 
template<>
Ciphertext< PolyEvalMultAndRelinearize (ConstCiphertext< Poly > ciphertext1, ConstCiphertext< Poly > ciphertext2, const vector< LPEvalKey< Poly >> &ek) const
 
template<>
Ciphertext< NativePolyEvalMultAndRelinearize (ConstCiphertext< NativePoly > ciphertext1, ConstCiphertext< NativePoly > ciphertext2, const vector< LPEvalKey< NativePoly >> &ek) const
 
template<>
Ciphertext< DCRTPolyEvalMultAndRelinearize (ConstCiphertext< DCRTPoly > ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2, const vector< LPEvalKey< DCRTPoly >> &ek) const
 
template<>
Ciphertext< PolyRelinearize (ConstCiphertext< Poly > ciphertext, const vector< LPEvalKey< Poly >> &ek) const
 
template<>
Ciphertext< NativePolyRelinearize (ConstCiphertext< NativePoly > ciphertext, const vector< LPEvalKey< NativePoly >> &ek) const
 
template<>
Ciphertext< DCRTPolyRelinearize (ConstCiphertext< DCRTPoly > ciphertext, const vector< LPEvalKey< DCRTPoly >> &ek) const
 
template<>
void RelinearizeInPlace (Ciphertext< DCRTPoly > &ciphertext, const vector< LPEvalKey< DCRTPoly >> &ek) const
 
template<>
shared_ptr< vector< Poly > > EvalFastRotationPrecompute (ConstCiphertext< Poly > ciphertext) const
 
template<>
shared_ptr< vector< NativePoly > > EvalFastRotationPrecompute (ConstCiphertext< NativePoly > ciphertext) const
 
template<>
shared_ptr< vector< DCRTPoly > > EvalFastRotationPrecompute (ConstCiphertext< DCRTPoly > ciphertext) const
 
template<>
Ciphertext< PolyEvalFastRotation (ConstCiphertext< Poly > ciphertext, const usint index, const usint m, const shared_ptr< vector< Poly >> precomp) const
 
template<>
Ciphertext< NativePolyEvalFastRotation (ConstCiphertext< NativePoly > ciphertext, const usint index, const usint m, const shared_ptr< vector< NativePoly >> precomp) const
 
template<>
Ciphertext< DCRTPolyEvalFastRotation (ConstCiphertext< DCRTPoly > ciphertext, const usint index, const usint m, const shared_ptr< vector< DCRTPoly >> precomp) const
 
- Public Member Functions inherited from lbcrypto::LPSHEAlgorithm< Element >
virtual Ciphertext< Element > EvalAdd (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2) const
 
virtual Ciphertext< Element > EvalAdd (ConstCiphertext< Element > ciphertext, double constant) const
 
virtual Ciphertext< Element > EvalSub (ConstCiphertext< Element > ciphertext, double constant) const
 
virtual Ciphertext< Element > EvalMult (ConstCiphertext< Element > ciphertext, double constant) const
 
virtual Ciphertext< Element > EvalMultMutable (Ciphertext< Element > &ciphertext, double constant) const
 
virtual Ciphertext< Element > EvalAddMany (const vector< Ciphertext< Element >> &ctList) const
 
virtual Ciphertext< Element > EvalAddManyInPlace (vector< Ciphertext< Element >> &ctList) const
 
virtual Ciphertext< Element > AddRandomNoise (ConstCiphertext< Element > ciphertext) const
 
virtual Ciphertext< Element > KeySwitch (const LPEvalKey< Element > keySwitchHint, ConstCiphertext< Element > cipherText) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalAtIndexKeyGen (const LPPublicKey< Element > publicKey, const LPPrivateKey< Element > origPrivateKey, const std::vector< int32_t > &indexList) const
 
virtual Ciphertext< Element > EvalAtIndex (ConstCiphertext< Element > ciphertext, int32_t index, const std::map< usint, LPEvalKey< Element >> &evalAtIndexKeys) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalSumKeyGen (const LPPrivateKey< Element > privateKey, const LPPublicKey< Element > publicKey) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalSumRowsKeyGen (const LPPrivateKey< Element > privateKey, const LPPublicKey< Element > publicKey, usint rowSize, usint subringDim=0) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > EvalSumColsKeyGen (const LPPrivateKey< Element > privateKey, const LPPublicKey< Element > publicKey) const
 
virtual Ciphertext< Element > EvalSum (ConstCiphertext< Element > ciphertext, usint batchSize, const std::map< usint, LPEvalKey< Element >> &evalKeys) const
 
virtual Ciphertext< Element > EvalSumRows (ConstCiphertext< Element > ciphertext, usint rowSize, const std::map< usint, LPEvalKey< Element >> &evalKeys, usint subringDim=0) const
 
virtual Ciphertext< Element > EvalSumCols (ConstCiphertext< Element > ciphertext, usint batchSize, const std::map< usint, LPEvalKey< Element >> &evalKeys, const std::map< usint, LPEvalKey< Element >> &rightEvalKeys) const
 
virtual Ciphertext< Element > EvalInnerProduct (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2, usint batchSize, const std::map< usint, LPEvalKey< Element >> &evalSumKeys, const LPEvalKey< Element > evalMultKey) const
 
virtual Ciphertext< Element > EvalInnerProduct (ConstCiphertext< Element > ciphertext1, ConstPlaintext plaintext, usint batchSize, const std::map< usint, LPEvalKey< Element >> &evalSumKeys) const
 
virtual Ciphertext< Element > EvalMerge (const vector< Ciphertext< Element >> &ciphertextVector, const std::map< usint, LPEvalKey< Element >> &evalKeys) const
 
virtual Ciphertext< Element > AdjustLevelWithRescale (Ciphertext< Element > &c1, uint32_t targetLevel) const
 

Detailed Description

template<class Element>
class lbcrypto::LPAlgorithmSHEBGVrns< Element >

Class for evaluation of somewhat homomorphic operations.

Template Parameters
Elementa ring element.

Constructor & Destructor Documentation

◆ LPAlgorithmSHEBGVrns()

template<class Element >
lbcrypto::LPAlgorithmSHEBGVrns< Element >::LPAlgorithmSHEBGVrns ( )
inline

Default constructor

◆ ~LPAlgorithmSHEBGVrns()

template<class Element >
virtual lbcrypto::LPAlgorithmSHEBGVrns< Element >::~LPAlgorithmSHEBGVrns ( )
inlinevirtual

Destructor

Member Function Documentation

◆ AdjustLevels() [1/2]

template<class Element >
vector<shared_ptr<ConstCiphertext<Element> > > lbcrypto::LPAlgorithmSHEBGVrns< Element >::AdjustLevels ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const

Internal function to automatically level-reduce a pair of ciphertexts.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
a vector containing two ciphertexts of the same level.

◆ AdjustLevels() [2/2]

template<class Element >
std::pair<shared_ptr<ConstCiphertext<Element> >, Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::AdjustLevels ( ConstCiphertext< Element >  ciphertext,
ConstPlaintext  plaintext 
) const

Internal function to automatically level-reduce a ciphertext and a plaintext.

Parameters
ciphertext1input ciphertext.
plaintextinput plaintext.
Returns
a vector containing two ciphertexts of the same level.

◆ AdjustLevelsEq() [1/2]

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::AdjustLevelsEq ( Ciphertext< Element > &  ciphertext1,
Ciphertext< Element > &  ciphertext2 
) const

Internal function to automatically level-reduce a pair of ciphertexts.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.

◆ AdjustLevelsEq() [2/2]

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::AdjustLevelsEq ( Ciphertext< Element > &  ciphertext,
Plaintext  plaintext 
) const

Internal function to automatically level-reduce a ciphertext and a plaintext.

Parameters
ciphertext1input ciphertext.
plaintextinput plaintext.
Returns
a vector containing two ciphertexts of the same level.

◆ EvalAdd()

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAdd ( ConstCiphertext< Element >  ciphertext,
ConstPlaintext  plaintext 
) const
overridevirtual

Function for homomorphic addition of ciphertexts.

Parameters
ciphertextinput ciphertext.
plaintextinput plaintext.
Returns
result of homomorphic addition of input ciphertexts.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAddCore() [1/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddCore ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const

Internal function for homomorphic addition of ciphertexts. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic addition of input ciphertexts.

◆ EvalAddCore() [2/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddCore ( ConstCiphertext< Element >  ciphertext,
Element  ptElement 
) const

Internal function for homomorphic addition of ciphertext and plaintext. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertextinput ciphertext.
ptElementthe Element corresponding to the input plaintext.
Returns
result of homomorphic addition of inputs.

◆ EvalAddCoreInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddCoreInPlace ( Ciphertext< Element > &  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const

Internal function for in-place homomorphic addition of ciphertexts. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertext1first input/output ciphertext.
ciphertext2second input ciphertext.

ciphertext1 stores the result of ciphertext1 + ciphertext2

◆ EvalAddInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddInPlace ( Ciphertext< Element > &  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const
overridevirtual

Function for in-place homomorphic addition of ciphertexts.

Parameters
ct1first input/output ciphertext.
ct2second input ciphertext.

ct1 stores the result of ct1 + ct2

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAddMutable() [1/2]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddMutable ( Ciphertext< Element > &  ciphertext1,
Ciphertext< Element > &  ciphertext2 
) const
inlineoverridevirtual

Function for homomorphic addition of ciphertexts. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic addition of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAddMutable() [2/2]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAddMutable ( Ciphertext< Element > &  ciphertext,
Plaintext  plaintext 
) const
inlineoverridevirtual

Function for homomorphic addition of ciphertexts. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertextinput ciphertext.
plaintextinput plaintext.
Returns
result of homomorphic addition of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAutomorphism()

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAutomorphism ( ConstCiphertext< Element >  ciphertext,
usint  i,
const std::map< usint, LPEvalKey< Element >> &  evalKeys,
CALLER_INFO_ARGS_HDR   
) const
overridevirtual

Function for evaluating automorphism of ciphertext at index i

Parameters
ciphertextthe input ciphertext.
iautomorphism index
&evalKeys- reference to the map of evaluation keys generated by EvalAutomorphismKeyGen.
Returns
resulting ciphertext

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAutomorphismKeyGen() [1/2]

template<class Element >
shared_ptr< std::map< usint, LPEvalKey< Element > > > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAutomorphismKeyGen ( const LPPrivateKey< Element >  privateKey,
const std::vector< usint > &  indexList 
) const
overridevirtual

Generate automophism keys for a given private key; Uses the private key for encryption

Parameters
privateKeyprivate key.
indexListlist of automorphism indices to be computed
Returns
returns the evaluation keys

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalAutomorphismKeyGen() [2/2]

template<class Element >
shared_ptr<std::map<usint, LPEvalKey<Element> > > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalAutomorphismKeyGen ( const LPPublicKey< Element >  publicKey,
const LPPrivateKey< Element >  privateKey,
const std::vector< usint > &  indexList 
) const
inlineoverridevirtual

Generate automophism keys for a given private key; Uses the public key for encryption

Parameters
publicKeypublic key.
privateKeyprivate key.
indexListlist of automorphism indices to be computed
Returns
returns the evaluation keys

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalFastRotation()

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalFastRotation ( ConstCiphertext< Element >  ciphertext,
const usint  index,
const usint  m,
const shared_ptr< vector< Element >>  precomp 
) const
overridevirtual

EvalFastRotation is a wrapper for hoisted automorphism. It decides what version of EvalFastRotation to perform, based on the key switching technique currently used (e.g., BV or GHS key switching).

Parameters
ciphertextthe input ciphertext to perform the automorphism on
indexthe index of the rotation. Positive indices correspond to left rotations and negative indices correspond to right rotations.
mis the cyclotomic order
precompIn BV, this is the digit decomposition created by EvalFastRotationPrecomputeBV. In GHS, this is the expanded part of the ciphertext.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalFastRotationPrecompute()

template<class Element >
shared_ptr<vector<Element> > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalFastRotationPrecompute ( ConstCiphertext< Element >  ciphertext) const
overridevirtual

EvalFastRotationPrecompute is a wrapper for the hoisted automorphism pre-computation step, in schemes BV, GHS, and Hybrid.

Parameters
ciphertextthe input ciphertext on which to do the precomputation (digit decomposition)

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalLinearWSum()

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalLinearWSum ( vector< Ciphertext< Element >>  ciphertexts,
vector< double >  constants 
) const
inlineoverridevirtual

Function for computing the linear weighted sum of a vector of ciphertexts. It is implemented as a wrapper to EvalLinearWSumMutable.

Parameters
ciphertextsvector of input ciphertexts.
constantsvector containing double weights.
Returns
A ciphertext containing the linear weighted sum.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalLinearWSumMutable()

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalLinearWSumMutable ( vector< Ciphertext< Element >>  ciphertexts,
vector< double >  constants 
) const
inlineoverridevirtual

Function for computing the linear weighted sum of a vector of ciphertexts. This is a mutable method, meaning that the level/depth of input ciphertexts may change.

Parameters
ciphertextsvector of input ciphertexts.
constantsvector containing double weights.
Returns
A ciphertext containing the linear weighted sum.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMult() [1/3]

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMult ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const
overridevirtual

Function for homomorphic multiplication of ciphertexts without key switching. Currently it assumes that the input arguments are fresh ciphertexts (of depth 1). Support for the input ciphertexts of higher depths will be added later.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic multiplication of input ciphertexts.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMult() [2/3]

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMult ( ConstCiphertext< Element >  ciphertext,
ConstPlaintext  plaintext 
) const
overridevirtual

Function for multiplying ciphertext by plaintext.

Parameters
ciphertextinput ciphertext.
plaintextinput plaintext embedded in the cryptocontext.
Returns
result of the multiplication.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMult() [3/3]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMult ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2,
const LPEvalKey< Element >  ek 
) const
overridevirtual

Function for homomorphic multiplication of ciphertexts followed by key switching operation. Currently it assumes that the input arguments are fresh ciphertexts (of depth 1). Support for the input ciphertexts of higher depths will be added later.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
ekis the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
Returns
result of homomorphic multiplication of input ciphertexts.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultAndRelinearize()

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultAndRelinearize ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2,
const vector< LPEvalKey< Element >> &  ek 
) const
overridevirtual

Unimplemented function to support a multiplication with depth larger than 2 for the BGVrns scheme.

Parameters
ciphertext1The first input ciphertext.
ciphertext2The second input ciphertext.
ekThe evaluation key input.
Returns
A shared pointer to the ciphertext which is the EvalMult of the two inputs.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultCore() [1/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultCore ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const

Internal function for homomorphic multiplication of ciphertexts. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic multiplication of input ciphertexts.

◆ EvalMultCore() [2/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultCore ( ConstCiphertext< Element >  ciphertext,
Element  ptxt 
) const

Internal function for homomorphic multiplication of ciphertext and plaintext. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertextinput ciphertext.
ptxtthe Element corresponding to the input plaintext.
Returns
result of homomorphic subtraction of inputs.

◆ EvalMultKeyGen()

template<class Element >
LPEvalKey< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultKeyGen ( const LPPrivateKey< Element >  privateKey) const
overridevirtual

Function to generate key switch hint on a ciphertext for depth 2.

Parameters
privateKeyis the original private key used for generating ciphertext.
Returns
keySwitchHint generated to switch the ciphertext.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultKeysGen()

template<class Element >
vector< LPEvalKey< Element > > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultKeysGen ( const LPPrivateKey< Element >  privateKey) const
overridevirtual

Function to generate key switch hint on a ciphertext for depth more than 2. Currently this method is not supported for BGVrns.

Parameters
privateKeyis the original private key used for generating ciphertext.
Returns
keySwitchHint generated to switch the ciphertext.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultMutable() [1/3]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultMutable ( Ciphertext< Element > &  ciphertext1,
Ciphertext< Element > &  ciphertext2 
) const
inlineoverridevirtual

Function for homomorphic multiplication of ciphertexts without key switching. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic multiplication of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultMutable() [2/3]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultMutable ( Ciphertext< Element > &  ciphertext,
Plaintext  plaintext 
) const
inlineoverridevirtual

Function for multiplying ciphertext by plaintext. The ciphertext can be changed

Parameters
&ciphertextinput ciphertext.
plaintextinput plaintext embedded in the cryptocontext.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalMultMutable() [3/3]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalMultMutable ( Ciphertext< Element > &  ciphertext1,
Ciphertext< Element > &  ciphertext2,
const LPEvalKey< Element >  ek 
) const
overridevirtual

Function for homomorphic multiplication of ciphertexts followed by key switching operation. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
ekis the evaluation key to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
Returns
result of homomorphic multiplication of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalNegate()

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalNegate ( ConstCiphertext< Element >  ct) const
overridevirtual

Function for homomorphic negation of ciphertexts.

Parameters
ctinput ciphertext.
Returns
new ciphertext.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalSub() [1/2]

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSub ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const
overridevirtual

Function for homomorphic subtraction of ciphertexts.

Parameters
ciphertext1the input ciphertext.
ciphertext2the input ciphertext.
Returns
result of homomorphic subtraction of input ciphertexts.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalSub() [2/2]

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSub ( ConstCiphertext< Element >  ciphertext1,
ConstPlaintext  plaintext 
) const
overridevirtual

Function for homomorphic subtraction of ciphertexts.

Parameters
ciphertext1the input ciphertext.
plaintextthe input plaintext.
Returns
result of homomorphic subtraction of input ciphertexts.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalSubCore() [1/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSubCore ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2 
) const

Internal function for homomorphic subtraction of ciphertexts. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertext1first input ciphertext.
ciphertext2second input ciphertext.
Returns
result of homomorphic subtraction of input ciphertexts.

◆ EvalSubCore() [2/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSubCore ( ConstCiphertext< Element >  ciphertext,
Element  ptElement 
) const

Internal function for homomorphic subtraction of ciphertext and plaintext. This method does not check whether input ciphertexts are at the same level.

Parameters
ciphertextinput ciphertext.
ptElementthe Element corresponding to the input plaintext.
ptDepththe scaling factor (depth) of the input plaintext.
Returns
result of homomorphic subtraction of inputs.

◆ EvalSubMutable() [1/2]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSubMutable ( Ciphertext< Element > &  ciphertext1,
Ciphertext< Element > &  ciphertext2 
) const
inlineoverridevirtual

Function for homomorphic subtraction of ciphertexts. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertext1the input ciphertext.
ciphertext2the input ciphertext.
Returns
result of homomorphic subtraction of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ EvalSubMutable() [2/2]

template<class Element >
virtual Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::EvalSubMutable ( Ciphertext< Element > &  ciphertext1,
Plaintext  plaintext 
) const
inlineoverridevirtual

Function for homomorphic subtraction of ciphertexts. Mutable version - input ciphertexts may get rescaled/level-reduced.

Parameters
ciphertext1the input ciphertext.
plaintextthe input plaintext.
Returns
result of homomorphic subtraction of input ciphertexts.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ KeySwitchBVGen()

template<class Element >
LPEvalKey<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchBVGen ( const LPPrivateKey< Element >  oldKey,
const LPPrivateKey< Element >  newKey,
const LPEvalKey< DCRTPoly ek = nullptr 
) const

Method for generating a key switch matrix for BV key switching. BV key switching was introduced in Brakerski, et. al., "Efficient full homomorphic encryption from (standard) LWE". Here, we follow Section 3.2 of "(Leveled) fully homomorphic encryption without bootstrapping" (BGV paper).

Parameters
oldKeyOriginal private key used for encryption.
newKeyNew private key to generate the keyswitch hint.
ekThe evaluation key input.
Returns
resulting keySwitchHint.

◆ KeySwitchBVInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchBVInPlace ( const LPEvalKey< Element >  keySwitchHint,
Ciphertext< Element > &  ciphertext 
) const

Method for in-place key switching using the BV method introduced in Brakerski, et. al., "Efficient full homomorphic encryption from (standard) LWE". Here, we follow Section 3.2 of "(Leveled) fully homomorphic encryption without bootstrapping" (BGV paper).

Parameters
keySwitchHintHint required to perform the ciphertext switching.
ciphertextOriginal ciphertext to perform in-place key switching on.

◆ KeySwitchGen()

template<class Element >
virtual LPEvalKey<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchGen ( const LPPrivateKey< Element >  oldKey,
const LPPrivateKey< Element >  newKey 
) const
overridevirtual

Method for generating a KeySwitchHint using RLWE relinearization

Parameters
oldKeyOriginal private key used for encryption.
newKeyNew private key to generate the keyswitch hint.
Returns
resulting keySwitchHint.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ KeySwitchGHSGen()

template<class Element >
LPEvalKey<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchGHSGen ( const LPPrivateKey< DCRTPoly oldKey,
const LPPrivateKey< DCRTPoly newKey,
const LPEvalKey< DCRTPoly ek = nullptr 
) const

Method for generating a key switch matrix for GHS key switching. GHS key switching was introduced in Gentry, et. al., "Homomorphic evaluation of the AES circuit (Updated implementation)". Here, we follow the notation of Section 3.2 of "A full RNS variant of approximate homomorphic encryption" (RNS CKKS paper).

Parameters
oldKeyOriginal private key used for encryption.
newKeyNew private key to generate the keyswitch hint.
ekThe evaluation key input.
Returns
resulting keySwitchHint.

◆ KeySwitchGHSInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchGHSInPlace ( const LPEvalKey< Element >  keySwitchHint,
Ciphertext< Element > &  ciphertext 
) const

Method for in-place key switching using the GHS method introduced in Gentry, et. al., "Homomorphic evaluation of the AES circuit (Updated implementation)". Here, we follow the notation of Section 3.2 of "A full RNS variant of approximate homomorphic encryption" (RNS CKKS paper).

Parameters
keySwitchHintHint required to perform the ciphertext switching.
ciphertextOriginal ciphertext to perform switching on.

◆ KeySwitchHybridGen()

template<class Element >
LPEvalKey<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchHybridGen ( const LPPrivateKey< Element >  oldKey,
const LPPrivateKey< Element >  newKey,
const LPEvalKey< DCRTPoly ek = nullptr 
) const

Method for generating a key switch matrix for HYBRID key switching. HYBRID key switching is described in Section 3 of Han, et. al., "Better bootstrapping for approximate homomorphic encryption".

Parameters
oldKeyOriginal private key used for encryption.
newKeyNew private key to generate the keyswitch hint.
ekThe evaluation key input.
Returns
resulting keySwitchHint.

◆ KeySwitchInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::KeySwitchInPlace ( const LPEvalKey< Element >  keySwitchHint,
Ciphertext< Element > &  ciphertext 
) const
overridevirtual

Method for in-place KeySwitching based on a KeySwitchHint - uses the RLWE relinearization

Parameters
keySwitchHintHint required to perform the ciphertext switching.

Implements lbcrypto::LPSHEAlgorithm< Element >.

◆ Relinearize()

template<class Element >
Ciphertext<Element> lbcrypto::LPAlgorithmSHEBGVrns< Element >::Relinearize ( ConstCiphertext< Element >  ciphertext,
const vector< LPEvalKey< Element >> &  ek 
) const
overridevirtual

Virtual function to do relinearization

Parameters
ciphertextinput ciphertext.
ekare the evaluation keys to make the newCiphertext decryptable by the same secret key as that of ciphertext1 and ciphertext2.
Returns
the new resulting ciphertext.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.

◆ RelinearizeInPlace()

template<class Element >
void lbcrypto::LPAlgorithmSHEBGVrns< Element >::RelinearizeInPlace ( Ciphertext< Element > &  ciphertext,
const vector< LPEvalKey< Element >> &  ek 
) const
inlineoverridevirtual

Virtual function to do in-place relinearization

Parameters
&ciphertextinput ciphertext.
ekare the evaluation keys
Returns
the new resulting ciphertext.

Reimplemented from lbcrypto::LPSHEAlgorithm< Element >.


The documentation for this class was generated from the following files: