Intel HEXL for FPGA
Intel Homomorphic Encryption FPGA Acceleration Library, accelerating the modular arithmetic operations used in homomorphic encryption.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hexl-fpga.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 __HEXL_FPGA_H__
5 #define __HEXL_FPGA_H__
6 
7 #include <cstdint>
8 
9 namespace intel {
10 namespace hexl {
22 
23 // DyadicMultiply Section
29 void set_worksize_DyadicMultiply(uint64_t ws);
41 void DyadicMultiply(uint64_t* results, const uint64_t* operand1,
42  const uint64_t* operand2, uint64_t n,
43  const uint64_t* moduli, uint64_t n_moduli);
44 
51 
52 // NTT Section
53 
59 void set_worksize_NTT(uint64_t ws);
73 void NTT(uint64_t* operand, const uint64_t* root_of_unity_powers,
74  const uint64_t* precon_root_of_unity_powers, uint64_t coeff_modulus,
75  uint64_t n);
81 bool NTTCompleted();
82 
83 // INTT Section
89 void set_worksize_INTT(uint64_t ws);
90 
107 void INTT(uint64_t* operand, const uint64_t* inv_root_of_unity_powers,
108  const uint64_t* precon_inv_root_of_unity_powers,
109  uint64_t coeff_modulus, uint64_t inv_n, uint64_t inv_n_w, uint64_t n);
110 
116 bool INTTCompleted();
117 
118 } // namespace hexl
119 } // namespace intel
120 
121 #endif
void set_worksize_DyadicMultiply(uint64_t ws)
Function set_worksize_DyadicMultiply Reserves software resources for the multiplication.
void set_worksize_NTT(uint64_t ws)
Function set_worksize_NTT Reserves software resources for the Number Theoretic Transform.
bool INTTCompleted()
Function INTTCompleted Executed after the INTT to wrap up the computation No parameters.
void DyadicMultiply(uint64_t *results, const uint64_t *operand1, const uint64_t *operand2, uint64_t n, const uint64_t *moduli, uint64_t n_moduli)
Function DyadicMultiply Executes ciphertext ciphertext multiplication.
void release_FPGA_resources()
Function release_FPGA_resources Called without any parameter, releases the FPGA hardware resources on...
void INTT(uint64_t *operand, const uint64_t *inv_root_of_unity_powers, const uint64_t *precon_inv_root_of_unity_powers, uint64_t coeff_modulus, uint64_t inv_n, uint64_t inv_n_w, uint64_t n)
Function INTT Executes in place the inverse Number Theoretic Transform.
void acquire_FPGA_resources()
Function acquire_FPGA_resources Called without any parameter, reserves the FPGA hardware resources...
void set_worksize_INTT(uint64_t ws)
Function set_worksize_INTT Reserves software resources for the inverse Number Theoretic Transform...
bool NTTCompleted()
Function NTTCompleted Executed after the NTT to wrap up the computation No parameters.
bool DyadicMultiplyCompleted()
Function DyadicMultiplyCompleted Executed after ciphertext ciphertext multiplication to wrap up the t...
void NTT(uint64_t *operand, const uint64_t *root_of_unity_powers, const uint64_t *precon_root_of_unity_powers, uint64_t coeff_modulus, uint64_t n)
Function NTT Executes in place the Number Theoretic Transform.