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::LPLeveledSHEAlgorithmBGVrns< Element > Class Template Reference

Concrete feature class for Leveled SHEBGVrns operations. This class adds leveled (BGVrns scheme) features to the BGVrns scheme. More...

#include <bgvrns.h>

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

Public Member Functions

 LPLeveledSHEAlgorithmBGVrns ()
 
Ciphertext< Element > ModReduceInternal (ConstCiphertext< Element > ciphertext, size_t levels=1) const override
 
void ModReduceInternalInPlace (Ciphertext< Element > &ciphertext, size_t levels=1) const override
 
void ModReduceInPlace (Ciphertext< Element > &ciphertext, size_t levels=1) const override
 
Ciphertext< Element > Compress (ConstCiphertext< Element > ciphertext, size_t towersLeft=1) const override
 
Ciphertext< Element > ComposedEvalMult (ConstCiphertext< Element > ciphertext1, ConstCiphertext< Element > ciphertext2, const LPEvalKey< Element > quadKeySwitchHint) const override
 
Ciphertext< Element > LevelReduce (ConstCiphertext< Element > cipherText, const LPEvalKey< Element > linearKeySwitchHint, size_t levels) const override
 
Ciphertext< Element > LevelReduceInternal (ConstCiphertext< Element > ciphertext, const LPEvalKey< Element > linearKeySwitchHint, size_t levels) const override
 
template<class Archive >
void save (Archive &ar) const
 
template<class Archive >
void load (Archive &ar)
 
std::string SerializedObjectName () const
 
template<>
void ModReduceInternalInPlace (Ciphertext< Poly > &ciphertext, size_t levels) const
 
template<>
void ModReduceInternalInPlace (Ciphertext< NativePoly > &ciphertext, size_t levels) const
 
template<>
void ModReduceInternalInPlace (Ciphertext< DCRTPoly > &ciphertext, size_t levels) const
 
template<>
Ciphertext< PolyModReduceInternal (ConstCiphertext< Poly > ciphertext, size_t levels) const
 
template<>
Ciphertext< NativePolyModReduceInternal (ConstCiphertext< NativePoly > ciphertext, size_t levels) const
 
template<>
Ciphertext< DCRTPolyModReduceInternal (ConstCiphertext< DCRTPoly > ciphertext, size_t levels) const
 
template<>
void ModReduceInPlace (Ciphertext< Poly > &ciphertext, size_t levels) const
 
template<>
void ModReduceInPlace (Ciphertext< NativePoly > &ciphertext, size_t levels) const
 
template<>
void ModReduceInPlace (Ciphertext< DCRTPoly > &ciphertext, size_t levels) const
 
template<>
Ciphertext< PolyCompress (ConstCiphertext< Poly > ciphertext, size_t towersLeft) const
 
template<>
Ciphertext< NativePolyCompress (ConstCiphertext< NativePoly > ciphertext, size_t towersLeft) const
 
template<>
Ciphertext< DCRTPolyCompress (ConstCiphertext< DCRTPoly > ciphertext, size_t towersLeft) const
 
template<>
Ciphertext< PolyComposedEvalMult (ConstCiphertext< Poly > ciphertext1, ConstCiphertext< Poly > ciphertext2, const LPEvalKey< Poly > quadKeySwitchHint) const
 
template<>
Ciphertext< NativePolyComposedEvalMult (ConstCiphertext< NativePoly > ciphertext1, ConstCiphertext< NativePoly > ciphertext2, const LPEvalKey< NativePoly > quadKeySwitchHint) const
 
template<>
Ciphertext< DCRTPolyComposedEvalMult (ConstCiphertext< DCRTPoly > ciphertext1, ConstCiphertext< DCRTPoly > ciphertext2, const LPEvalKey< DCRTPoly > quadKeySwitchHint) const
 
template<>
Ciphertext< PolyLevelReduceInternal (ConstCiphertext< Poly > ciphertext, const LPEvalKey< Poly > linearKeySwitchHint, size_t levels) const
 
template<>
Ciphertext< NativePolyLevelReduceInternal (ConstCiphertext< NativePoly > ciphertext, const LPEvalKey< NativePoly > linearKeySwitchHint, size_t levels) const
 
template<>
Ciphertext< DCRTPolyLevelReduceInternal (ConstCiphertext< DCRTPoly > ciphertext, const LPEvalKey< DCRTPoly > linearKeySwitchHint, size_t levels) const
 
template<>
Ciphertext< PolyLevelReduce (ConstCiphertext< Poly > ciphertext, const LPEvalKey< Poly > linearKeySwitchHint, size_t levels) const
 
template<>
Ciphertext< NativePolyLevelReduce (ConstCiphertext< NativePoly > ciphertext, const LPEvalKey< NativePoly > linearKeySwitchHint, size_t levels) const
 
template<>
Ciphertext< DCRTPolyLevelReduce (ConstCiphertext< DCRTPoly > ciphertext, const LPEvalKey< DCRTPoly > linearKeySwitchHint, size_t levels) const
 
- Public Member Functions inherited from lbcrypto::LPLeveledSHEAlgorithm< Element >
virtual Ciphertext< Element > ModReduce (ConstCiphertext< Element > ciphertext, size_t levels=1) const
 
virtual void LevelReduceInternalInPlace (Ciphertext< Element > &cipherText1, const LPEvalKey< Element > linearKeySwitchHint, size_t levels) const
 
virtual Ciphertext< Element > EvalPoly (ConstCiphertext< Element > cipherText, const std::vector< double > &coefficients) const
 
template<class Archive >
void save (Archive &ar, std::uint32_t const version) const
 
template<class Archive >
void load (Archive &ar, std::uint32_t const version)
 
std::string SerializedObjectName () const
 

Detailed Description

template<class Element>
class lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >

Concrete feature class for Leveled SHEBGVrns operations. This class adds leveled (BGVrns scheme) features to the BGVrns scheme.

We use advances from the BGVrns scheme for levelled homomorphic capabilities from here:

Template Parameters
Elementa ring element.

Constructor & Destructor Documentation

◆ LPLeveledSHEAlgorithmBGVrns()

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

Default constructor

Member Function Documentation

◆ ComposedEvalMult()

template<class Element >
Ciphertext<Element> lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::ComposedEvalMult ( ConstCiphertext< Element >  ciphertext1,
ConstCiphertext< Element >  ciphertext2,
const LPEvalKey< Element >  quadKeySwitchHint 
) const
overridevirtual

Method for Composed EvalMult, which includes homomorphic multiplication, key switching, and modulo reduction.

Parameters
ciphertext1ciphertext1, first input ciphertext to perform multiplication on.
ciphertext2cipherText2, second input ciphertext to perform multiplication on.
quadKeySwitchHintis used for EvalMult operation.
Returns
resulting ciphertext.

Implements lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ Compress()

template<class Element >
Ciphertext<Element> lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::Compress ( ConstCiphertext< Element >  ciphertext,
size_t  towersLeft = 1 
) const
overridevirtual

Method for compressing the ciphertext before decryption.

Parameters
ciphertextis the ciphertext to perform compress on.
towersLeftis the number of towers after compression
Returns
ciphertext after the compression performed.

Reimplemented from lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ LevelReduce()

template<class Element >
Ciphertext<Element> lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::LevelReduce ( ConstCiphertext< Element >  cipherText,
const LPEvalKey< Element >  linearKeySwitchHint,
size_t  levels 
) const
overridevirtual

Wrapper method for level reduce in BGVrns.

Parameters
cipherText1is the original ciphertext to be level reduced.
linearKeySwitchHintnot used in the BGVrns scheme.
levelsthe number of towers to drop.
Returns
resulting ciphertext.

Implements lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ LevelReduceInternal()

template<class Element >
Ciphertext<Element> lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::LevelReduceInternal ( ConstCiphertext< Element >  ciphertext,
const LPEvalKey< Element >  linearKeySwitchHint,
size_t  levels 
) const
overridevirtual

Method for Level Reduction in the BGVrns scheme. It just drops "levels" number of the towers of the ciphertext without changing the underlying plaintext.

Parameters
ciphertextis the original ciphertext to be level reduced.
linearKeySwitchHintnot used in the BGVrns scheme.
levelsthe number of towers to drop.
Returns
resulting ciphertext.

Reimplemented from lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ ModReduceInPlace()

template<class Element >
void lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::ModReduceInPlace ( Ciphertext< Element > &  ciphertext,
size_t  levels = 1 
) const
overridevirtual

Method for rescaling in-place.

Parameters
ciphertextis the ciphertext to perform modreduce on in-place

Implements lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ ModReduceInternal()

template<class Element >
Ciphertext<Element> lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::ModReduceInternal ( ConstCiphertext< Element >  ciphertext,
size_t  levels = 1 
) const
overridevirtual

Method for rescaling.

Parameters
ciphertextis the ciphertext to perform modreduce on.
Returns
ciphertext after the modulus reduction performed.

Reimplemented from lbcrypto::LPLeveledSHEAlgorithm< Element >.

◆ ModReduceInternalInPlace()

template<class Element >
void lbcrypto::LPLeveledSHEAlgorithmBGVrns< Element >::ModReduceInternalInPlace ( Ciphertext< Element > &  ciphertext,
size_t  levels = 1 
) const
overridevirtual

Method for rescaling in-place

Parameters
ciphertextis the ciphertext to perform modreduce on in-place

Reimplemented from lbcrypto::LPLeveledSHEAlgorithm< Element >.


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