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

Concrete class for the FHE Multiparty algorithms on BFV. A version of this multiparty scheme built on the BGV scheme is seen here: More...

#include <bfv.h>

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

Public Member Functions

 LPAlgorithmMultipartyBFV ()
 
LPKeyPair< Element > MultipartyKeyGen (CryptoContext< Element > cc, const LPPublicKey< Element > pk1, bool makeSparse=false, bool fresh=false) override
 
LPKeyPair< Element > MultipartyKeyGen (CryptoContext< Element > cc, const vector< LPPrivateKey< Element >> &secretKeys, bool makeSparse=false) override
 
Ciphertext< Element > MultipartyDecryptMain (const LPPrivateKey< Element > privateKey, ConstCiphertext< Element > ciphertext) const override
 
Ciphertext< Element > MultipartyDecryptLead (const LPPrivateKey< Element > privateKey, ConstCiphertext< Element > ciphertext) const override
 
DecryptResult MultipartyDecryptFusion (const vector< Ciphertext< Element >> &ciphertextVec, NativePoly *plaintext) const override
 
LPEvalKey< Element > MultiKeySwitchGen (const LPPrivateKey< Element > originalPrivateKey, const LPPrivateKey< Element > newPrivateKey, const LPEvalKey< Element > ek) const override
 
shared_ptr< std::map< usint, LPEvalKey< Element > > > MultiEvalAutomorphismKeyGen (const LPPrivateKey< Element > privateKey, const shared_ptr< std::map< usint, LPEvalKey< Element >>> eAuto, const std::vector< usint > &indexList) const override
 
shared_ptr< std::map< usint, LPEvalKey< Element > > > MultiEvalSumKeyGen (const LPPrivateKey< Element > privateKey, const shared_ptr< std::map< usint, LPEvalKey< Element >>> eSum) const override
 
LPEvalKey< Element > MultiAddEvalKeys (LPEvalKey< Element > evalKey1, LPEvalKey< Element > evalKey2) const override
 
LPEvalKey< Element > MultiMultEvalKey (LPEvalKey< Element > evalKey, LPPrivateKey< Element > sk) const override
 
template<class Archive >
void save (Archive &ar) const
 
template<class Archive >
void load (Archive &ar)
 
std::string SerializedObjectName () const
 
- Public Member Functions inherited from lbcrypto::LPMultipartyAlgorithm< Element >
virtual DecryptResult MultipartyDecryptFusion (const vector< Ciphertext< Element >> &ciphertextVec, Poly *plaintext) const
 
virtual LPPublicKey< Element > MultiAddPubKeys (LPPublicKey< Element > pubKey1, LPPublicKey< Element > pubKey2) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > MultiAddEvalSumKeys (const shared_ptr< std::map< usint, LPEvalKey< Element >>> es1, const shared_ptr< std::map< usint, LPEvalKey< Element >>> es2) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > MultiAddEvalAutomorphismKeys (const shared_ptr< std::map< usint, LPEvalKey< Element >>> es1, const shared_ptr< std::map< usint, LPEvalKey< Element >>> es2) const
 
virtual LPEvalKey< Element > MultiAddEvalMultKeys (LPEvalKey< Element > evalKey1, LPEvalKey< Element > evalKey2) const
 
virtual shared_ptr< std::map< usint, LPEvalKey< Element > > > MultiEvalAtIndexKeyGen (const LPPrivateKey< Element > secretShare, const shared_ptr< std::map< usint, LPEvalKey< Element >>> eAuto, const std::vector< int32_t > &indexList) 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::LPAlgorithmMultipartyBFV< Element >

Concrete class for the FHE Multiparty algorithms on BFV. A version of this multiparty scheme built on the BGV scheme is seen here:

During offline key generation, this multiparty scheme relies on the clients coordinating their public key generation. To do this, a single client generates a public-secret key pair. This public key is shared with other keys which use an element in the public key to generate their own public keys. The clients generate a shared key pair using a scheme-specific approach, then generate re-encryption keys. Re-encryption keys are uploaded to the server. Clients encrypt data with their public keys and send the encrypted data server. The data is re-encrypted. Computations are then run on the data. The result is sent to each of the clients. One client runs a "Leader" multiparty decryption operation with its own secret key. All other clients run a regular "Main" multiparty decryption with their own secret key. The resulting partially decrypted ciphertext are then fully decrypted with the decryption fusion algorithms.

Template Parameters
Elementa ring element.

Constructor & Destructor Documentation

◆ LPAlgorithmMultipartyBFV()

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

Default constructor

Member Function Documentation

◆ MultiAddEvalKeys()

template<class Element >
LPEvalKey< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultiAddEvalKeys ( LPEvalKey< Element >  evalKey1,
LPEvalKey< Element >  evalKey2 
) const
overridevirtual

Threshold FHE: Adds two prior evaluation keys

Parameters
evalKey1first evaluation key.
evalKey2second evaluation key.
Returns
the new joined key.

Reimplemented from lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultiEvalAutomorphismKeyGen()

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

Threshold FHE: Generates joined automorphism keys from the current secret share and prior joined automorphism keys

Parameters
privateKeysecret key share.
eAutoa dictionary with prior joined automorphism keys.
&indexLista vector of automorphism indices.
Returns
a dictionary with new joined automorphism keys.

Reimplemented from lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultiEvalSumKeyGen()

template<class Element >
shared_ptr< std::map< usint, LPEvalKey< Element > > > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultiEvalSumKeyGen ( const LPPrivateKey< Element >  privateKey,
const shared_ptr< std::map< usint, LPEvalKey< Element >>>  eSum 
) const
overridevirtual

Threshold FHE: Generates joined summation evaluation keys from the current secret share and prior joined summation keys

Parameters
privateKeysecret key share.
eSuma dictionary with prior joined summation keys.
Returns
new joined summation keys.

Reimplemented from lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultiKeySwitchGen()

template<class Element >
LPEvalKey< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultiKeySwitchGen ( const LPPrivateKey< Element >  originalPrivateKey,
const LPPrivateKey< Element >  newPrivateKey,
const LPEvalKey< Element >  ek 
) const
overridevirtual

Threshold FHE: Generates a joined evaluation key from the current secret share and a prior joined evaluation key

Parameters
originalPrivateKeysecret key transformed from.
newPrivateKeysecret key transformed to.
ekthe prior joined evaluation key.
Returns
the new joined evaluation key.

Reimplemented from lbcrypto::LPMultipartyAlgorithm< Element >.

Reimplemented in lbcrypto::LPAlgorithmMultipartyBFVrnsB< Element >, and lbcrypto::LPAlgorithmMultipartyBFVrns< Element >.

◆ MultiMultEvalKey()

template<class Element >
LPEvalKey< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultiMultEvalKey ( LPEvalKey< Element >  evalKey,
LPPrivateKey< Element >  sk 
) const
overridevirtual

Threshold FHE: Generates a partial evaluation key for homomorphic multiplication based on the current secret share and an existing partial evaluation key

Parameters
evalKeyprior evaluation key.
skcurrent secret share.
Returns
the new joined key.

Reimplemented from lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultipartyDecryptFusion()

template<class Element >
DecryptResult lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultipartyDecryptFusion ( const vector< Ciphertext< Element >> &  ciphertextVec,
NativePoly plaintext 
) const
overridevirtual

Threshold FHE: Method for combining the partially decrypted ciphertexts and getting the final decryption in the clear as a NativePoly.

Parameters
&ciphertextVecvector of "partial" decryptions.
*plaintextthe plaintext output as a NativePoly.
Returns
the decoding result.

Implements lbcrypto::LPMultipartyAlgorithm< Element >.

Reimplemented in lbcrypto::LPAlgorithmMultipartyBFVrnsB< Element >, and lbcrypto::LPAlgorithmMultipartyBFVrns< Element >.

◆ MultipartyDecryptLead()

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultipartyDecryptLead ( const LPPrivateKey< Element >  privateKey,
ConstCiphertext< Element >  ciphertext 
) const
overridevirtual

Threshold FHE: Method for decryption operation run by the lead decryption client.

Parameters
privateKeysecret key share used for decryption.
ciphertextciphertext id decrypted.

Implements lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultipartyDecryptMain()

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultipartyDecryptMain ( const LPPrivateKey< Element >  privateKey,
ConstCiphertext< Element >  ciphertext 
) const
overridevirtual

Threshold FHE: "Partial" decryption computed by all parties except for the lead one.

Parameters
privateKeysecret key share used for decryption.
ciphertextciphertext that is being decrypted.

Implements lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultipartyKeyGen() [1/2]

template<class Element >
LPKeyPair< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultipartyKeyGen ( CryptoContext< Element >  cc,
const LPPublicKey< Element >  pk1,
bool  makeSparse = false,
bool  fresh = false 
)
overridevirtual

Threshold FHE: Generation of a public key derived from a previous joined public key (for prior secret shares) and the secret key share of the current party.

Parameters
cccryptocontext for the keys to be generated.
pk1joined public key from prior parties.
makeSparseset to true if ring reduce by a factor of 2 is to be used. NOT SUPPORTED BY ANY SCHEME ANYMORE.
freshset to true if proxy re-encryption is used in the multi-party protocol or star topology is used
Returns
key pair including the secret share for the current party and joined public key

Implements lbcrypto::LPMultipartyAlgorithm< Element >.

◆ MultipartyKeyGen() [2/2]

template<class Element >
LPKeyPair< Element > lbcrypto::LPAlgorithmMultipartyBFV< Element >::MultipartyKeyGen ( CryptoContext< Element >  cc,
const vector< LPPrivateKey< Element >> &  secretKeys,
bool  makeSparse = false 
)
overridevirtual

Threshold FHE: Generates a public key from a vector of secret shares. ONLY FOR DEBUGGIN PURPOSES. SHOULD NOT BE USED IN PRODUCTION.

Parameters
cccryptocontext for the keys to be generated.
secretkeyssecrete key sahres.
makeSparseset to true if ring reduce by a factor of 2 is to be used. NOT SUPPORTED BY ANY SCHEME ANYMORE.
Returns
key pair including the private for the current party and joined public key

Implements lbcrypto::LPMultipartyAlgorithm< Element >.


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