HEaaN
Crypto Lab's great homomorphic encryption library
|
Abstract entity for encrypting messages into ciphertexts. More...
#include <Encryptor.hpp>
Public Member Functions | |
Encryptor (const Context &context) | |
void | encrypt (const Message &msg, const SecretKey &sk, Ciphertext &ctxt) const |
Encrypt a message using a secret key, to the maximal supported level, to rescale counter zero. More... | |
void | encrypt (const Message &msg, const SecretKey &sk, Ciphertext &ctxt, u64 level, int r_counter=0) const |
Encrypt a message using a secret key, to a certain level, to a certain rescale counter. More... | |
void | encrypt (const Message &msg, const KeyPack &keypack, Ciphertext &ctxt) const |
Encrypt a message using a keypack (Public key encryption), to the maximal supported level, to rescale counter zero. More... | |
void | encrypt (const Message &msg, const KeyPack &keypack, Ciphertext &ctxt, u64 level, int r_counter=0) const |
Encrypt a message using a keypack (Public key encryption), to a certain level, to a certain rescale counter. More... | |
void | encrypt (const Plaintext &ptxt, const SecretKey &sk, Ciphertext &ctxt) const |
Encrypt a plaintext using a secret key. More... | |
void | encrypt (const Plaintext &ptxt, const KeyPack &keypack, Ciphertext &ctxt) const |
Encrypt a plaintext using an encryption key. More... | |
Private Attributes | |
const Context | context_ |
A context with which Encryptor is associated. More... | |
Abstract entity for encrypting messages into ciphertexts.
|
explicit |
void HEaaN::Encryptor::encrypt | ( | const Message & | msg, |
const KeyPack & | keypack, | ||
Ciphertext & | ctxt | ||
) | const |
Encrypt a message using a keypack (Public key encryption), to the maximal supported level, to rescale counter zero.
[in] | msg | |
[in] | keypack | |
[out] | ctxt |
RuntimeException | if msg and key are at different devices. |
void HEaaN::Encryptor::encrypt | ( | const Message & | msg, |
const KeyPack & | keypack, | ||
Ciphertext & | ctxt, | ||
u64 | level, | ||
int | r_counter = 0 |
||
) | const |
Encrypt a message using a keypack (Public key encryption), to a certain level, to a certain rescale counter.
[in] | msg | |
[in] | keypack | |
[in] | level | |
[in] | r_counter | |
[out] | ctxt |
RuntimeException | if msg and key are at different devices. |
void HEaaN::Encryptor::encrypt | ( | const Message & | msg, |
const SecretKey & | sk, | ||
Ciphertext & | ctxt | ||
) | const |
Encrypt a message using a secret key, to the maximal supported level, to rescale counter zero.
[in] | msg | |
[in] | sk | |
[out] | ctxt |
RuntimeException | if msg and key are at different devices. |
void HEaaN::Encryptor::encrypt | ( | const Message & | msg, |
const SecretKey & | sk, | ||
Ciphertext & | ctxt, | ||
u64 | level, | ||
int | r_counter = 0 |
||
) | const |
Encrypt a message using a secret key, to a certain level, to a certain rescale counter.
[in] | msg | |
[in] | sk | |
[in] | level | |
[in] | r_counter | |
[out] | ctxt |
RuntimeException | if msg and key are at different devices. |
void HEaaN::Encryptor::encrypt | ( | const Plaintext & | ptxt, |
const KeyPack & | keypack, | ||
Ciphertext & | ctxt | ||
) | const |
Encrypt a plaintext using an encryption key.
compute (va + e_1, vb + e_2 + m) where (a, b) = (a, -as + e_0) is an encryption key
RuntimeException | if ptxt and key are at different devices. |
void HEaaN::Encryptor::encrypt | ( | const Plaintext & | ptxt, |
const SecretKey & | sk, | ||
Ciphertext & | ctxt | ||
) | const |
Encrypt a plaintext using a secret key.
compute (a, -as + e + m)
RuntimeException | if ptxt and key are at different devices. |