HEaaN
Crypto Lab's great homomorphic encryption library
|
A class of plaintexts each of which is simply a polynomial. More...
#include <Plaintext.hpp>
Public Member Functions | |
Plaintext (const Context &context) | |
void | setLogSlots (u64 log_slots) |
Set log(number of slots) of a plaintext. More... | |
u64 | getLogSlots () const |
Get log(number of slots) of a plaintext. More... | |
u64 | getNumberOfSlots () const |
Get number of slots of a plaintext. More... | |
Polynomial & | getMx () |
Get polynomial representing plaintext. More... | |
const Polynomial & | getMx () const |
Get const polynomial representing plaintext. More... | |
u64 * | getMxData (u64 i) const |
Get i-th data of a plaintext. More... | |
void | save (const std::string &path) const |
Save a plaintext to a file. More... | |
void | save (std::ostream &stream) const |
Save a plaintext. More... | |
void | load (const std::string &path) |
Load a plaintext from a file. More... | |
void | load (std::istream &stream) |
Load a plaintext. More... | |
int | getRescaleCounter () const |
Rescaling flag. More... | |
void | setRescaleCounter (int r_counter) |
set rescale counter More... | |
u64 | getLevel () const |
Get level of a plaintext. More... | |
void | setLevel (u64 level) |
Set level of a plaintext. More... | |
const Device & | getDevice () const |
Get device which a plaintext reside in. More... | |
void | to (const Device &device) |
Send a plaintext to given device. More... | |
void | allocate (const Device &device) |
Allocate memory for a plaintext at given device. More... | |
bool | isZero () const |
Check whether a plaintext has the zero polynomial. More... | |
Private Attributes | |
Pointer< PlaintextImpl > | impl_ |
A class of plaintexts each of which is simply a polynomial.
|
explicit |
void HEaaN::Plaintext::allocate | ( | const Device & | device | ) |
Allocate memory for a plaintext at given device.
[in] | device |
const Device& HEaaN::Plaintext::getDevice | ( | ) | const |
Get device which a plaintext reside in.
u64 HEaaN::Plaintext::getLevel | ( | ) | const |
Get level of a plaintext.
u64 HEaaN::Plaintext::getLogSlots | ( | ) | const |
Get log(number of slots) of a plaintext.
Polynomial& HEaaN::Plaintext::getMx | ( | ) |
Get polynomial representing plaintext.
const Polynomial& HEaaN::Plaintext::getMx | ( | ) | const |
Get const polynomial representing plaintext.
Get i-th data of a plaintext.
i-th data is a modulo q_i information of the polynomial
u64 HEaaN::Plaintext::getNumberOfSlots | ( | ) | const |
Get number of slots of a plaintext.
int HEaaN::Plaintext::getRescaleCounter | ( | ) | const |
Rescaling flag.
bool HEaaN::Plaintext::isZero | ( | ) | const |
Check whether a plaintext has the zero polynomial.
void HEaaN::Plaintext::load | ( | const std::string & | path | ) |
Load a plaintext from a file.
void HEaaN::Plaintext::load | ( | std::istream & | stream | ) |
Load a plaintext.
void HEaaN::Plaintext::save | ( | const std::string & | path | ) | const |
Save a plaintext to a file.
void HEaaN::Plaintext::save | ( | std::ostream & | stream | ) | const |
Save a plaintext.
void HEaaN::Plaintext::setLevel | ( | u64 | level | ) |
Set level of a plaintext.
[in] | level |
void HEaaN::Plaintext::setLogSlots | ( | u64 | log_slots | ) |
Set log(number of slots) of a plaintext.
[in] | log_slots |
void HEaaN::Plaintext::setRescaleCounter | ( | int | r_counter | ) |
set rescale counter
void HEaaN::Plaintext::to | ( | const Device & | device | ) |
Send a plaintext to given device.
[in] | device |
|
private |