A class of ciphertexts each of which contains a vector of polynomials of length > 1.
More...
#include <Ciphertext.hpp>
A class of ciphertexts each of which contains a vector of polynomials of length > 1.
◆ Ciphertext() [1/2]
HEaaN::Ciphertext::Ciphertext |
( |
const Context & |
context, |
|
|
bool |
is_extended = false |
|
) |
| |
|
explicit |
◆ Ciphertext() [2/2]
Construct a Ciphertext containing polynomial of same value only valid when the input ciphertext constructed for context sharing primes.
◆ allocate()
void HEaaN::Ciphertext::allocate |
( |
const Device & |
device | ) |
|
Allocate memory for a ciphertext at given device.
- Parameters
-
◆ getCurrentPrime()
u64 HEaaN::Ciphertext::getCurrentPrime |
( |
| ) |
const |
Get prime of current level.
◆ getCurrentScaleFactor()
Real HEaaN::Ciphertext::getCurrentScaleFactor |
( |
| ) |
const |
Get scale factor of current level.
◆ getDevice()
const Device& HEaaN::Ciphertext::getDevice |
( |
| ) |
const |
Get device which a ciphertext reside in.
- Returns
- The device in which the ciphertext resides
◆ getLevel()
u64 HEaaN::Ciphertext::getLevel |
( |
| ) |
const |
Get level of a cipherext.
- Returns
- The current level of the ciphertext.
◆ getLogSlots()
u64 HEaaN::Ciphertext::getLogSlots |
( |
| ) |
const |
Get log(number of slots) of a ciphertext.
- Returns
- log(number of slots)
◆ getNumberOfSlots()
u64 HEaaN::Ciphertext::getNumberOfSlots |
( |
| ) |
const |
◆ getParameterPreset()
◆ getPoly() [1/2]
Polynomial& HEaaN::Ciphertext::getPoly |
( |
u64 |
i | ) |
|
Get the i-th part of ciphertext.
◆ getPoly() [2/2]
const Polynomial& HEaaN::Ciphertext::getPoly |
( |
u64 |
i | ) |
const |
Get the i-th part of ciphertext.
◆ getPolyData()
u64* HEaaN::Ciphertext::getPolyData |
( |
u64 |
i, |
|
|
u64 |
level |
|
) |
| const |
Get the level
-th data of the i-th part.
the level
-th data is a modulo q_{level} information of the polynomial
◆ getRescaleCounter()
int HEaaN::Ciphertext::getRescaleCounter |
( |
| ) |
const |
Rescaling flag.
- Returns
- The amount of extra deltas multiplied.
◆ getSize()
u64 HEaaN::Ciphertext::getSize |
( |
| ) |
const |
Get the size of a ciphertext.
◆ isModUp()
bool HEaaN::Ciphertext::isModUp |
( |
| ) |
const |
True if it is a mod-up ciphertext, False otherwise.
◆ load() [1/2]
void HEaaN::Ciphertext::load |
( |
const std::string & |
path | ) |
|
Load a ciphertext from a file.
◆ load() [2/2]
void HEaaN::Ciphertext::load |
( |
std::istream & |
stream | ) |
|
◆ save() [1/2]
void HEaaN::Ciphertext::save |
( |
const std::string & |
path | ) |
const |
Save a ciphertext to a file.
◆ save() [2/2]
void HEaaN::Ciphertext::save |
( |
std::ostream & |
stream | ) |
const |
◆ setLevel()
void HEaaN::Ciphertext::setLevel |
( |
u64 |
level | ) |
|
Set level of a ciphertext.
- Parameters
-
◆ setLogSlots()
void HEaaN::Ciphertext::setLogSlots |
( |
u64 |
log_slots | ) |
|
Set log(number of slots) of a ciphertext.
- Parameters
-
◆ setRescaleCounter()
void HEaaN::Ciphertext::setRescaleCounter |
( |
int |
r_counter | ) |
|
◆ setSize()
void HEaaN::Ciphertext::setSize |
( |
u64 |
size | ) |
|
Set the size of a ciphertext.
- Exceptions
-
if | the size is less than 2. |
◆ to()
void HEaaN::Ciphertext::to |
( |
const Device & |
device | ) |
|
Send a ciphertext to given device.
- Parameters
-
◆ BootstrapperImpl
friend class BootstrapperImpl |
|
friend |
◆ impl_
Pointer<CiphertextImpl> HEaaN::Ciphertext::impl_ |
|
private |
The documentation for this class was generated from the following file: