Intel HE Acceleration Library for FPGAs
Intel Homomorphic Encryption Acceleration Library for FPGAs, accelerating the modular arithmetic operations used in homomorphic encryption on Intel FPGAs.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
keyswitch.h
Go to the documentation of this file.
1 // Copyright (C) 2020-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #ifndef __KEYSWITCH_H__
5 #define __KEYSWITCH_H__
6 
7 #include <cstdint>
8 
9 namespace intel {
10 namespace hexl {
11 namespace fpga {
17 void set_worksize_KeySwitch(uint64_t ws);
34 void KeySwitch(uint64_t* result, const uint64_t* t_target_iter_ptr, uint64_t n,
35  uint64_t decomp_modulus_size, uint64_t key_modulus_size,
36  uint64_t rns_modulus_size, uint64_t key_component_count,
37  const uint64_t* moduli, const uint64_t** k_switch_keys,
38  const uint64_t* modswitch_factors,
39  const uint64_t* twiddle_factors = nullptr);
40 
45 bool KeySwitchCompleted();
46 
47 } // namespace fpga
48 } // namespace hexl
49 } // namespace intel
50 
51 #endif
void set_worksize_KeySwitch(uint64_t ws)
Function set_worksize_KeySwitch Reserves software resources for the KeySwitch.
bool KeySwitchCompleted()
Function KeySwitchCompleted Executed after KeySwitch to sync up the outstanding KeySwitch tasks...
void KeySwitch(uint64_t *result, const uint64_t *t_target_iter_ptr, uint64_t n, uint64_t decomp_modulus_size, uint64_t key_modulus_size, uint64_t rns_modulus_size, uint64_t key_component_count, const uint64_t *moduli, const uint64_t **k_switch_keys, const uint64_t *modswitch_factors, const uint64_t *twiddle_factors=nullptr)
Function KeySwitch Executes KeySwitch operation.