Template Class Switchkey< Scheme::BFV >
Defined in File evaluationkey.cuh
Class Documentation
-
template<>
class Switchkey<Scheme::BFV> 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::BFV> 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
-
void save(std::ostream &os) const
-
void load(std::istream &is)
-
Switchkey(HEContext<Scheme::BFV> context)