Template Class Ciphertext< Scheme::TFHE >

Class Documentation

template<>
class Ciphertext<Scheme::TFHE>

Public Functions

Ciphertext(HEContext<Scheme::TFHE> context, const ExecutionOptions &options = ExecutionOptions())

Constructs a new Ciphertext object with specified parameters and CUDA stream.

Parameters:
  • context – Reference to the Parameters object that sets the encryption parameters.

  • stream – The CUDA stream to be used for asynchronous operations. Defaults to cudaStreamDefault.

void store_in_device(cudaStream_t stream = cudaStreamDefault)

Stores the ciphertext in the device (GPU) memory.

void store_in_host(cudaStream_t stream = cudaStreamDefault)

Stores the ciphertext in the host (CPU) memory.

inline bool is_on_device() const noexcept

Checks whether the data is stored on the device (GPU) memory.

inline void switch_stream(cudaStream_t stream)

Switches the Ciphertext CUDA stream.

Parameters:

stream – The new CUDA stream to be used.

inline cudaStream_t stream() const noexcept

Retrieves the CUDA stream associated with the ciphertext.

This function returns the CUDA stream that was used to create or last modify the ciphertext.

Returns:

The CUDA stream associated with the ciphertext.

inline int lwe_size() const noexcept

Returns the size of the lwe size used in ciphertext.

Returns:

int Size of the lwe. (n)

inline int size() const noexcept

Returns the how many lwe stored in the ciphertext.

Returns:

int Size of the ciphertext.

Ciphertext() = default
inline Ciphertext(const Ciphertext &copy)
inline Ciphertext(Ciphertext &&assign) noexcept
inline Ciphertext &operator=(const Ciphertext &copy)
inline Ciphertext &operator=(Ciphertext &&assign) noexcept