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

Encryption algorithm implementation for BFV for the basic public key encrypt, decrypt and key generation methods for the BFV encryption scheme. This scheme is also referred to as the FV scheme. More...

#include <bfv.h>

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

Public Member Functions

 LPAlgorithmBFV ()
 
virtual Ciphertext< Element > Encrypt (const LPPublicKey< Element > publicKey, Element plaintext) const
 
virtual Ciphertext< Element > Encrypt (const LPPrivateKey< Element > privateKey, Element plaintext) const
 
virtual DecryptResult Decrypt (const LPPrivateKey< Element > privateKey, ConstCiphertext< Element > ciphertext, NativePoly *plaintext) const
 
LPKeyPair< Element > KeyGen (CryptoContext< Element > cc, bool makeSparse=false)
 
- Public Member Functions inherited from lbcrypto::LPEncryptionAlgorithm< Element >
virtual DecryptResult Decrypt (const LPPrivateKey< Element > privateKey, ConstCiphertext< Element > ciphertext, Poly *plaintext) const
 

Detailed Description

template<class Element>
class lbcrypto::LPAlgorithmBFV< Element >

Encryption algorithm implementation for BFV for the basic public key encrypt, decrypt and key generation methods for the BFV encryption scheme. This scheme is also referred to as the FV scheme.

The BFV scheme parameter guidelines are introduced here:

We used the optimized parameter selection from the designs here:

Template Parameters
Elementa ring element.

Constructor & Destructor Documentation

◆ LPAlgorithmBFV()

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

Default constructor

Member Function Documentation

◆ Decrypt()

template<class Element >
DecryptResult lbcrypto::LPAlgorithmBFV< Element >::Decrypt ( const LPPrivateKey< Element >  privateKey,
ConstCiphertext< Element >  ciphertext,
NativePoly plaintext 
) const
virtual

Method for decrypting using BFV. See the class description for citations on where the algorithms were taken from.

Parameters
privateKeyprivate key used for decryption.
ciphertextciphertext to be decrypted.
*plaintextthe plaintext output.
Returns
the decrypted plaintext returned.

Implements lbcrypto::LPEncryptionAlgorithm< Element >.

Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.

◆ Encrypt() [1/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmBFV< Element >::Encrypt ( const LPPublicKey< Element >  publicKey,
Element  plaintext 
) const
virtual

Method for encrypting plaintext using BFV.

Parameters
publicKeypublic key used for encryption.
plaintextthe plaintext input.
Returns
ciphertext which results from encryption.

Implements lbcrypto::LPEncryptionAlgorithm< Element >.

Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.

◆ Encrypt() [2/2]

template<class Element >
Ciphertext< Element > lbcrypto::LPAlgorithmBFV< Element >::Encrypt ( const LPPrivateKey< Element >  privateKey,
Element  plaintext 
) const
virtual

Method for encrypting plaintext with private key using BFV.

Parameters
privateKeyprivate key used for encryption.
plaintextthe plaintext input.
Returns
ciphertext which results from encryption.

Implements lbcrypto::LPEncryptionAlgorithm< Element >.

Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.

◆ KeyGen()

template<class Element >
LPKeyPair< Element > lbcrypto::LPAlgorithmBFV< Element >::KeyGen ( CryptoContext< Element >  cc,
bool  makeSparse = false 
)
virtual

Function to generate public and private keys. See the class description for citations on where the algorithms were taken from.

Parameters
cccryptocontext for the keys to be generated.
makeSparseset to true if ring reduce by a factor of 2 is to be used. Generally this should always be false.
Returns
key pair including the private and public key

Implements lbcrypto::LPEncryptionAlgorithm< Element >.


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