HEaaN
Crypto Lab's great homomorphic encryption library
|
Abstract entity for decrypting ciphertexts. More...
#include <Decryptor.hpp>
Public Member Functions | |
Decryptor (const Context &context) | |
void | decrypt (const Ciphertext &ctxt, const SecretKey &sk, Message &msg) const |
Decrypt a ciphertext to message using a secret key. More... | |
void | decrypt (const Ciphertext &ctxt, const SecretKey &sk, Plaintext &ptxt) const |
Decrypt a ciphertext to plaintext using a secret key. More... | |
void | partialDecrypt (const Ciphertext &ctxt, const SecretKey &sk, Ciphertext &ctxt_out) const |
Partially decrypt a ciphertext, which is encrypted with a collectively generated encryption key, to another ciphertext using a secret key, generated by one of the parties. More... | |
Private Attributes | |
const Context | context_ |
A context with which decryptor is associated. More... | |
Abstract entity for decrypting ciphertexts.
|
explicit |
void HEaaN::Decryptor::decrypt | ( | const Ciphertext & | ctxt, |
const SecretKey & | sk, | ||
Message & | msg | ||
) | const |
Decrypt a ciphertext to message using a secret key.
[in] | ctxt | |
[in] | sk | |
[out] | msg |
void HEaaN::Decryptor::decrypt | ( | const Ciphertext & | ctxt, |
const SecretKey & | sk, | ||
Plaintext & | ptxt | ||
) | const |
Decrypt a ciphertext to plaintext using a secret key.
[in] | ctxt | |
[in] | sk | |
[out] | ptxt |
It sets the parameters of plaintext automatically. You may use any constructor of plaintext.
void HEaaN::Decryptor::partialDecrypt | ( | const Ciphertext & | ctxt, |
const SecretKey & | sk, | ||
Ciphertext & | ctxt_out | ||
) | const |
Partially decrypt a ciphertext, which is encrypted with a collectively generated encryption key, to another ciphertext using a secret key, generated by one of the parties.
[in] | ctxt | |
[in] | sk | |
[out] | ctxt_out |
It sets the parameters of ciphertext automatically. You may use any constructor of ciphertext. ctxt should be encrypted with an encryption key which is generated by collective key generation. If ctxt is encrypted for the set of secret keys {sk_1 , ... , sk_n} and sk is one of the secret keys, ctxt_out is a ciphertext encrypted for the set of secret keys {sk_1, ... , sk_n} - {sk}. The parties of collective key generation may sequentially call partialDecrypt
to decrypt the ciphertext. The last party may receive a ciphertext encrypted with a single sk_i, and call decrypt
to get the decrypted plaintext.
RuntimeException | if the size of input ciphertext is not 2. |
|
private |
A context with which decryptor is associated.