PALISADE Lattice Crypto Library
1.11.9
A lattice crypto library for software engineers by software engineers.
|
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>
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 |
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:
Element | a ring element. |
|
inline |
Default constructor
|
virtual |
Method for decrypting using BFV. See the class description for citations on where the algorithms were taken from.
privateKey | private key used for decryption. |
ciphertext | ciphertext to be decrypted. |
*plaintext | the plaintext output. |
Implements lbcrypto::LPEncryptionAlgorithm< Element >.
Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.
|
virtual |
Method for encrypting plaintext using BFV.
publicKey | public key used for encryption. |
plaintext | the plaintext input. |
Implements lbcrypto::LPEncryptionAlgorithm< Element >.
Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.
|
virtual |
Method for encrypting plaintext with private key using BFV.
privateKey | private key used for encryption. |
plaintext | the plaintext input. |
Implements lbcrypto::LPEncryptionAlgorithm< Element >.
Reimplemented in lbcrypto::LPAlgorithmBFVrnsB< Element >, and lbcrypto::LPAlgorithmBFVrns< Element >.
|
virtual |
Function to generate public and private keys. See the class description for citations on where the algorithms were taken from.
cc | cryptocontext for the keys to be generated. |
makeSparse | set to true if ring reduce by a factor of 2 is to be used. Generally this should always be false. |
Implements lbcrypto::LPEncryptionAlgorithm< Element >.