Template Class Switchkey< Scheme::CKKS >

Class Documentation

template<>
class Switchkey<Scheme::CKKS>

Switchkey represents a key used for switching between different secret keys in homomorphic encryption.

The Switchkey class is initialized with encryption parameters and provides the functionality to store the switching key either in GPU or CPU memory. Key switching is an essential operation in homomorphic encryption schemes, allowing ciphertexts encrypted under one key to be transformed for use with a different secret key, which is particularly useful for multi-party computation and other advanced encryption scenarios.

Public Functions

Switchkey(HEContext<Scheme::CKKS> &context)

Constructs a new Switchkey object with specified parameters.

Parameters:

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

void store_in_device(cudaStream_t stream = cudaStreamDefault)

Stores the switch key in the device (GPU) memory.

void store_in_host(cudaStream_t stream = cudaStreamDefault)

Stores the switch key in the host (CPU) memory.

inline bool is_on_device() const

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

Data64 *data()

Returns a pointer to the underlying switch key data.

Returns:

Data64* Pointer to the switch key data.

Switchkey() = default
Switchkey(const Switchkey &copy) = default
Switchkey(Switchkey &&source) = default
Switchkey &operator=(const Switchkey &assign) = default
Switchkey &operator=(Switchkey &&assign) = default
void save(std::ostream &os) const
void load(std::istream &is)