|
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.
|
Namespaces | |
| details | |
Classes | |
| class | MultiplyFactor |
| class | NTT |
| Performs negacyclic forward and inverse number-theoretic transform (NTT), commonly used in RLWE cryptography. More... | |
| struct | AllocatorBase |
| struct | AllocatorInterface |
| class | AlignedAllocator |
Typedefs | |
| using | AllocatorStrategyPtr = std::shared_ptr< AllocatorBase > |
| template<typename T > | |
| using | AlignedVector64 = std::vector< T, AlignedAllocator< T, 64 > > |
Enumerations | |
| enum | StimulusType { RANDOM = 0, RAMP, ALL_ONES, ALL_ZEROS, IMPULSE, ALL_MAX_VALUES, ALL_MIN_VALUES, RANDOM = 0, RAMP, ALL_ONES, ALL_ZEROS, IMPULSE, ALL_MAX_VALUES, ALL_MIN_VALUES } |
| enum | StimulusType { RANDOM = 0, RAMP, ALL_ONES, ALL_ZEROS, IMPULSE, ALL_MAX_VALUES, ALL_MIN_VALUES, RANDOM = 0, RAMP, ALL_ONES, ALL_ZEROS, IMPULSE, ALL_MAX_VALUES, ALL_MIN_VALUES } |
| enum | CMPINT { CMPINT::EQ = 0, CMPINT::LT = 1, CMPINT::LE = 2, CMPINT::FALSE = 3, CMPINT::NE = 4, CMPINT::NLT = 5, CMPINT::NLE = 6, CMPINT::TRUE = 7 } |
| Represents binary operations between two boolean values. More... | |
Functions | |
| uint64_t | InverseUIntMod (uint64_t input, uint64_t modulus) |
| uint64_t | BarrettReduce64 (uint64_t input, uint64_t modulus, uint64_t q_barr) |
| uint64_t | MultiplyUIntMod (uint64_t x, uint64_t y, uint64_t modulus) |
| uint64_t | MultiplyMod (uint64_t x, uint64_t y, uint64_t y_precon, uint64_t modulus) |
| uint64_t | AddUIntMod (uint64_t x, uint64_t y, uint64_t modulus) |
| uint64_t | SubUIntMod (uint64_t x, uint64_t y, uint64_t modulus) |
| uint64_t | PowMod (uint64_t base, uint64_t exp, uint64_t modulus) |
| bool | IsPrimitiveRoot (uint64_t root, uint64_t degree, uint64_t modulus) |
| uint64_t | GeneratePrimitiveRoot (uint64_t degree, uint64_t modulus) |
| uint64_t | MinimalPrimitiveRoot (uint64_t degree, uint64_t modulus) |
| uint64_t | ReverseBitsUInt (uint64_t x, uint64_t bit_width) |
| bool | IsPrime (uint64_t n) |
| std::vector< uint64_t > | GeneratePrimes (size_t num_primes, size_t bit_size, size_t ntt_size) |
| void | ForwardTransformToBitReverse64 (uint64_t *operand, uint64_t n, uint64_t modulus, const uint64_t *root_of_unity_powers, const uint64_t *precon_root_of_unity_powers, uint64_t input_mod_factor, uint64_t output_mod_factor) |
| void | ReferenceForwardTransformToBitReverse (uint64_t *operand, uint64_t n, uint64_t modulus, const uint64_t *root_of_unity_powers) |
| Reference NTT which is written for clarity rather than performance. More... | |
| void | InverseTransformFromBitReverse64 (uint64_t *operand, uint64_t n, uint64_t modulus, const uint64_t *inv_root_of_unity_powers, const uint64_t *precon_inv_root_of_unity_powers, uint64_t input_mod_factor, uint64_t output_mod_factor) |
| bool | CheckNTTArguments (uint64_t degree, uint64_t modulus) |
| template<int BitShift> | |
| uint64_t | MultiplyUIntModLazy (uint64_t x, uint64_t y_operand, uint64_t y_barrett_factor, uint64_t modulus) |
| template<int BitShift> | |
| uint64_t | MultiplyUIntModLazy (uint64_t x, uint64_t y, uint64_t modulus) |
| unsigned char | AddUInt64 (uint64_t operand1, uint64_t operand2, uint64_t *result) |
| template<int InputModFactor> | |
| uint64_t | ReduceMod (uint64_t x, uint64_t modulus, const uint64_t *twice_modulus=nullptr, const uint64_t *four_times_modulus=nullptr) |
| CMPINT | Not (CMPINT cmp) |
| Returns the logical negation of a binary operation. More... | |
| uint128_t | MultiplyUInt64 (uint64_t x, uint64_t y) |
| uint64_t | BarrettReduce128 (uint64_t input_hi, uint64_t input_lo, uint64_t modulus) |
| uint64_t | DivideUInt128UInt64Lo (uint64_t x1, uint64_t x0, uint64_t y) |
| void | MultiplyUInt64 (uint64_t x, uint64_t y, uint64_t *prod_hi, uint64_t *prod_lo) |
| template<int BitShift> | |
| uint64_t | MultiplyUInt64Hi (uint64_t x, uint64_t y) |
| uint64_t | MSB (uint64_t input) |
| bool | Compare (CMPINT cmp, uint64_t lhs, uint64_t rhs) |
| bool | IsPowerOfTwo (uint64_t num) |
| uint64_t | Log2 (uint64_t x) |
| uint64_t | MaximumValue (uint64_t bits) |
Variables | |
| AllocatorStrategyPtr | mallocStrategy |
| using hetest::utils::AlignedVector64 = typedef std::vector<T, AlignedAllocator<T, 64> > |
| using hetest::utils::AllocatorStrategyPtr = typedef std::shared_ptr<AllocatorBase> |
|
strong |
|
inline |
| uint64_t hetest::utils::AddUIntMod | ( | uint64_t | x, |
| uint64_t | y, | ||
| uint64_t | modulus | ||
| ) |
|
inline |
| uint64_t hetest::utils::BarrettReduce64 | ( | uint64_t | input, |
| uint64_t | modulus, | ||
| uint64_t | q_barr | ||
| ) |
| bool hetest::utils::CheckNTTArguments | ( | uint64_t | degree, |
| uint64_t | modulus | ||
| ) |
|
inline |
|
inline |
| void hetest::utils::ForwardTransformToBitReverse64 | ( | uint64_t * | operand, |
| uint64_t | n, | ||
| uint64_t | modulus, | ||
| const uint64_t * | root_of_unity_powers, | ||
| const uint64_t * | precon_root_of_unity_powers, | ||
| uint64_t | input_mod_factor, | ||
| uint64_t | output_mod_factor | ||
| ) |
| std::vector< uint64_t > hetest::utils::GeneratePrimes | ( | size_t | num_primes, |
| size_t | bit_size, | ||
| size_t | ntt_size | ||
| ) |
| uint64_t hetest::utils::GeneratePrimitiveRoot | ( | uint64_t | degree, |
| uint64_t | modulus | ||
| ) |
| void hetest::utils::InverseTransformFromBitReverse64 | ( | uint64_t * | operand, |
| uint64_t | n, | ||
| uint64_t | modulus, | ||
| const uint64_t * | inv_root_of_unity_powers, | ||
| const uint64_t * | precon_inv_root_of_unity_powers, | ||
| uint64_t | input_mod_factor, | ||
| uint64_t | output_mod_factor | ||
| ) |
| uint64_t hetest::utils::InverseUIntMod | ( | uint64_t | input, |
| uint64_t | modulus | ||
| ) |
|
inline |
| bool hetest::utils::IsPrime | ( | uint64_t | n | ) |
| bool hetest::utils::IsPrimitiveRoot | ( | uint64_t | root, |
| uint64_t | degree, | ||
| uint64_t | modulus | ||
| ) |
|
inline |
|
inline |
| uint64_t hetest::utils::MinimalPrimitiveRoot | ( | uint64_t | degree, |
| uint64_t | modulus | ||
| ) |
|
inline |
| uint64_t hetest::utils::MultiplyMod | ( | uint64_t | x, |
| uint64_t | y, | ||
| uint64_t | y_precon, | ||
| uint64_t | modulus | ||
| ) |
|
inline |
|
inline |
|
inline |
| uint64_t hetest::utils::MultiplyUIntMod | ( | uint64_t | x, |
| uint64_t | y, | ||
| uint64_t | modulus | ||
| ) |
|
inline |
|
inline |
|
inline |
Returns the logical negation of a binary operation.
| [in] | cmp | The binary operation to negate |
| uint64_t hetest::utils::PowMod | ( | uint64_t | base, |
| uint64_t | exp, | ||
| uint64_t | modulus | ||
| ) |
| uint64_t hetest::utils::ReduceMod | ( | uint64_t | x, |
| uint64_t | modulus, | ||
| const uint64_t * | twice_modulus = nullptr, |
||
| const uint64_t * | four_times_modulus = nullptr |
||
| ) |
| void hetest::utils::ReferenceForwardTransformToBitReverse | ( | uint64_t * | operand, |
| uint64_t | n, | ||
| uint64_t | modulus, | ||
| const uint64_t * | root_of_unity_powers | ||
| ) |
Reference NTT which is written for clarity rather than performance.
| [in,out] | operand | Input data. Overwritten with NTT output |
| [in] | n | Size of the transfrom, i.e. the polynomial degree. Must be a power of two. |
| [in] | modulus | Prime modulus. Must satisfy q == 1 mod 2n |
| [in] | root_of_unity_powers | Powers of 2n'th root of unity in F_q. In bit-reversed order |
| uint64_t hetest::utils::ReverseBitsUInt | ( | uint64_t | x, |
| uint64_t | bit_width | ||
| ) |
| uint64_t hetest::utils::SubUIntMod | ( | uint64_t | x, |
| uint64_t | y, | ||
| uint64_t | modulus | ||
| ) |
| AllocatorStrategyPtr hetest::utils::mallocStrategy |
1.8.5