# Intel:registered: Homomorphic Encryption Acceleration Library accelerates modular arithmetic operations used in homomorphic encryption

### Related tags

Cryptography homomorphic-encryption avx-512

# Intel Homomorphic Encryption Acceleration Library (HEXL)

Intel ®️ HEXL is an open-source library which provides efficient implementations of integer arithmetic on Galois fields. Such arithmetic is prevalent in cryptography, particularly in homomorphic encryption (HE) schemes. Intel HEXL targets integer arithmetic with word-sized primes, typically 40-60 bits. Intel HEXL provides an API for 64-bit unsigned integers and targets Intel CPUs.

## Introduction

Many cryptographic applications, particularly homomorphic encryption (HE), rely on integer polynomial arithmetic in a finite field. HE, which enables computation on encrypted data, typically uses polynomials with degree `N` a power of two roughly in the range `N=[2^{10}, 2^{17}]`. The coefficients of these polynomials are in a finite field with a word-sized primes, `p`, up to `p`~62 bits. More precisely, the polynomials live in the ring `Z_p[X]/(X^N + 1)`. That is, when adding or multiplying two polynomials, each coefficient of the result is reduced by the prime modulus `p`. When multiplying two polynomials, the resulting polynomials of degree `2N` is additionally reduced by taking the remainder when dividing by `X^N+1`.

The primary bottleneck in many HE applications is polynomial-polynomial multiplication in `Z_p[X]/(X^N + 1)`. For efficient implementation, Intel HEXL implements the negacyclic number-theoretic transform (NTT). To multiply two polynomials, `p_1(x), p_2(x)` using the NTT, we perform the FwdNTT on the two input polynomials, then perform an element-wise modular multiplication, and perform the InvNTT on the result.

Intel HEXL implements the following functions:

• The forward and inverse negacyclic number-theoretic transform (NTT)
• Element-wise vector-vector modular multiplication
• Element-wise vector-scalar modular multiplication with optional addition
• Element-wise modular multiplication

For each function, the library implements one or several Intel(R) AVX-512 implementations, as well as a less performant, more readable native C++ implementation. Intel HEXL will automatically choose the best implementation for the given CPU Intel(R) AVX-512 feature set. In particular, when the modulus `p` is less than `2^{50}`, the AVX512IFMA instruction set available on Intel IceLake server and IceLake client will provide a more efficient implementation.

For additional functionality, see the public headers, located in `include/hexl`

## Building Intel HEXL

### Dependencies

We have tested Intel HEXL on the following operating systems:

• Ubuntu 18.04
• macOS 10.15
• Microsoft Windows 10

Intel HEXL requires the following dependencies:

Dependency Version
CMake >= 3.5.1
Compiler gcc >= 7.0, clang++ >= 5.0, MSVC >= 2019

For best performance, we recommend using a processor with AVX512-IFMA52 support, and a recent compiler (gcc >= 8.0, clang++ >= 6.0). To determine if your process supports AVX512-IFMA52, simply look for `HEXL_HAS_AVX512IFMA` during the configure step (see Compiling Intel HEXL).

### Compile-time options

In addition to the standard CMake build options, Intel HEXL supports several compile-time flags to configure the build. For convenience, they are listed below:

CMake option Values
HEXL_BENCHMARK ON / OFF (default ON) Set to ON to enable benchmark suite via Google benchmark
HEXL_COVERAGE ON / OFF (default OFF) Set to ON to enable coverage report of unit-tests
HEXL_DEBUG ON / OFF (default OFF) Set to ON to enable debugging at large runtime penalty
HEXL_DOCS ON / OFF (default OFF) Set to ON to enable building of documentation
HEXL_ENABLE_ADDRESS_SANITIZER ON / OFF (default OFF) Set to ON to enable building with address sanitizer (ASan)
HEXL_ENABLE_THREAD_SANITIZER ON / OFF (default OFF) Set to ON to enable building with thread sanitizer (TSan)
HEXL_ENABLE_UB_SANITIZER ON / OFF (default OFF) Set to ON to enable building with undefined behavior sanitizer (UBSan)
HEXL_EXPORT ON / OFF (default OFF) Set to ON to enable export of Intel HEXL for use in 3rd-party project
HEXL_SHARED_LIB ON / OFF (default OFF) Set to ON to enable building shared library
HEXL_TESTING ON / OFF (default ON) Set to ON to enable building of unit-tests

### Compiling Intel HEXL

The instructions to build Intel HEXL are common between Linux, MacOS, and Windows.

To compile Intel HEXL from source code, first clone the repository into your current directory. Then, to configure the build, call

`cmake -S . -B build`

adding the desired compile-time options with a `-D` flag. For instance, to build Intel HEXL with debugging capabilities, call

`cmake -S . -B build -DHEXL_DEBUG=ON`

Then, to build Intel HEXL, call

`cmake --build build`

This will build the Intel HEXL library in the `build/hexl/lib/` directory.

To install Intel HEXL to the installation directory, run

`cmake --install build`

To use a non-standard installation directory, configure the build with

`cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install`

## Testing Intel HEXL

To run a set of unit tests via Googletest, configure and build Intel HEXL with `-DHEXL_TESTING=ON` (see Compile-time options). Then, run

`cmake --build build --target unittest`

The unit-test executable itself is located at `build/test/unit-test`

## Benchmarking Intel HEXL

To run a set of benchmarks via Google benchmark, configure and build Intel HEXL with `-DHEXL_BENCHMARK=ON` (see Compile-time options). Then, run

`cmake --build build --target bench`

The benchmark executable itself is located at `build/benchmark/bench_hexl`

## Using Intel HEXL

The `example` folder has an example of using Intel HEXL in a third-party project.

## Debugging

For optimal performance, Intel HEXL does not perform input validation. In many cases the time required for the validation would be longer than the execution of the function itself. To debug Intel HEXL, configure and build Intel HEXL with `-DHEXL_DEBUG=ON` (see Compile-time options). This will generate a debug version of the library, e.g. `libhexl_debug.a`, that can be used to debug the execution.

Note, enabling `HEXL_DEBUG=ON` will result in a significant runtime overhead.

# Documentation

See https://intel.github.io/hexl for Doxygen documentation.

Intel HEXL supports documentation via Doxygen and sphinx. To build documentation, first install `doxygen` and `graphviz`, e.g.

`sudo apt-get install doxygen graphviz`

Then, configure Intel HEXL with `-DHEXL_DOCS=ON` (see Compile-time options).

## Doxygen

To build Doxygen documentation, after configuring Intel HEXL with `-DHEXL_DOCS=ON`, run

``````cmake --build build --target doxygen
``````

To view the generated Doxygen documentation, open the generated `build/docs/doxygen/html/index.html` file in a web browser.

## Sphinx

To build the sphinx documentation, install `sphinx` and required dependencies `breathe, m2r2`, e.g.

```sudo apt-get install python3-sphinx
pip3 install breathe m2r2```

Then, after configuring Intel HEXL with `-DHEXL_DOCS=ON`, run

`cmake --build build --target docs`

To view the generated Sphinx documentation, open the generated `build/docs/sphinx/html/index.html` file in a web browser.

# Contributing

At this time, Intel HEXL does not accept external contributions. We encourage feedback and suggestions via issues.

For Intel developers, use pre-commit to validate the formatting of the code.

Before contributing, please run

`cmake --build build --target check unittest`

and make sure pre-commit checks and all unit tests pass.

## Repository layout

Public headers reside in the `hexl/include` folder. Private headers, e.g. those containing Intel(R) AVX-512 code should not be put in this folder.

• #### How does hexl performs against NFLLib?

I was wondering if your benchmarks could be tweaked a little to show the performance against NFLLib. It seems like NFLLib is more popular and the results would give some clarifications on which one to choose.

opened by rogpld 13
• #### Add a port file to vcpkg?

FYI, you can create a port file in vcpkg so that we can add a feature to SEAL:

``````./vcpkg install seal       # installs SEAL without HEXL
./vcpkg install seal[hexl] # installs SEAL with HEXL
``````
opened by WeiDaiWD 8
• #### build fails on Mac (M1)

running `cmake --build build` fails with following on M1 mac

`[ 1%] Building C object cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/unix_based_hardware_detection.dir/src/hwcaps.c.o [ 1%] Built target unix_based_hardware_detection [ 2%] Building C object cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/utils.dir/src/filesystem.c.o [ 4%] Building C object cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/utils.dir/src/stack_line_reader.c.o [ 5%] Building C object cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/utils.dir/src/string_view.c.o [ 5%] Built target utils [ 6%] Building C object cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o In file included from /Users/janmajayamall/desktop/hexl/build/cmake/third-party/cpu-features/cpu-features-src/src/cpuinfo_arm.c:15: /Users/janmajayamall/desktop/hexl/build/cmake/third-party/cpu-features/cpu-features-src/include/cpuinfo_arm.h:118:2: error: "Including cpuinfo_arm.h from a non-arm target." #error "Including cpuinfo_arm.h from a non-arm target." ^ 1 error generated. make[2]: *** [cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o] Error 1 make[1]: *** [cmake/third-party/cpu-features/cpu-features-build/CMakeFiles/cpu_features.dir/all] Error 2 make: *** [all] Error 2`

opened by Janmajayamall 5
• #### EltwiseFMAMod fails on EltwiseFMAModAVX512 operation with a modulus that is between 51 and 52 bits.

Hello, I believe that this is related to the following issue: https://github.com/intel/hexl/issues/121. That issue is fixed and working on v1.2.5, but using the EltwiseFMAMod function to scale numbers when the modulus is 52 bits (a number between 2^51 and 2^52) sometimes fails. Could you confirm this behaviour?

Example case:

``````modulus = 4503599627370486
input = {1191078607011827, 1769260550218270, 4345204646426905, 1153813479460416, 2994576917176123, 2254124429352543, 2866174865142532, 3780255914740878}
factor = 3724197286470134
input_mod_factor = 1
``````

function call:

``````intel::hexl::EltwiseFMAMod(result, input, factor, nullptr, input.size(), modulus, input_mod_factor);
``````

Result:

``````{3669213812048074, 4438596699595472, 3062713067630738, 2441777770654938, 1332695674286306, 833480206939968, 2031613570657280, 229641522601742}
``````

Expected (input * factor):

``````{3669213812048074, 4438596699595472, 3062713067630738, 2441777770654938, 1332695674286306, 833480206939968, 2031613570657280, 229641522601752}
``````

Note the last element is not correct.

opened by jcalafato1 5
• #### EltwiseReduceMod fails on EltwiseReduceModAVX512 operation with a modulus that is between 51 and 52 bits.

The library does not reduce properly for any modulus between 51 and 52 bits. See this test:

TEST(ReduceFailure, ReduceFailure) { std::vector<uint64_t> tst = { 41834706795195925, 4670328046076965, 17760383643480343, 49435670237278413, 24379914680392825, 33362919182756282, 14501318335168678, 31183658415687847 }; auto mod = 4440955546175441; auto chk = tst; intel::hexl::EltwiseReduceMod(chk.data(), tst.data(), tst.size(), mod, mod, 1); auto exp = tst; for (auto & elem : exp) { elem %= mod; } ASSERT_EQ(exp, chk); }

This is just an example. I have tried several different moduli of the same bit width and several different inputs. The reduction function does not match the modulus operation.

opened by jcalafato1 5
• #### HEXL slowing down some operations in Microsoft SEAL benchmarks

Hello HEXL team,

We are looking into enabling HEXL for Microsoft SEAL. To estimate whether we would see a performance increase I launched an AWS `c5.large` instance (running Amazon Linux 2). It has `avx512dq` but not IFMA, so the HEXL paper led me to expect some performance improvements. Here's the `lscpu` output:

``````\$ sudo lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  2
Core(s) per socket:  1
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
Stepping:            4
CPU MHz:             3400.103
BogoMIPS:            6000.00
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            25344K
NUMA node0 CPU(s):   0,1
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
``````

I downloaded SEAL and built its current `main` branch (commit `97e4b8d`). First I built without HEXL and ran SEAL's built in performance tests for BFV (i.e. running `./build/bin/sealexamples` and choosing option 7, then 1), getting the following results as a baseline:

``````+--------------------------------------------------------------------------+
|         BFV Performance Test with Degrees: 4096, 8192, and 16384         |
+--------------------------------------------------------------------------+
/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 4096
|   coeff_modulus size: 109 (36 + 36 + 37) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [2181 microseconds]
Generating Galois keys: Done [44914 microseconds]
Running tests .......... Done

Average batch: 93 microseconds
Average unbatch: 81 microseconds
Average encrypt: 1509 microseconds
Average decrypt: 413 microseconds
Average add: 14 microseconds
Average multiply: 4052 microseconds
Average multiply plain: 615 microseconds
Average square: 2902 microseconds
Average relinearize: 845 microseconds
Average rotate rows one step: 861 microseconds
Average rotate rows random: 2911 microseconds
Average rotate columns: 858 microseconds
Average serialize ciphertext: 13 microseconds
Average compressed (ZLIB) serialize ciphertext: 11545 microseconds
Average compressed (Zstandard) serialize ciphertext: 1642 microseconds

/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 8192
|   coeff_modulus size: 218 (43 + 43 + 44 + 44 + 44) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [12411 microseconds]
Generating Galois keys: Done [287076 microseconds]
Running tests .......... Done

Average batch: 147 microseconds
Average unbatch: 163 microseconds
Average encrypt: 4271 microseconds
Average decrypt: 1472 microseconds
Average add: 63 microseconds
Average multiply: 15933 microseconds
Average multiply plain: 2569 microseconds
Average square: 11515 microseconds
Average relinearize: 4309 microseconds
Average rotate rows one step: 4367 microseconds
Average rotate rows random: 16938 microseconds
Average rotate columns: 4332 microseconds
Average serialize ciphertext: 37 microseconds
Average compressed (ZLIB) serialize ciphertext: 42170 microseconds
Average compressed (Zstandard) serialize ciphertext: 1738 microseconds

/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 16384
|   coeff_modulus size: 438 (48 + 48 + 48 + 49 + 49 + 49 + 49 + 49 + 49) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [83935 microseconds]
Generating Galois keys: Done [2136795 microseconds]
Running tests .......... Done

Average batch: 274 microseconds
Average unbatch: 346 microseconds
Average encrypt: 14563 microseconds
Average decrypt: 6018 microseconds
Average add: 295 microseconds
Average multiply: 67476 microseconds
Average multiply plain: 10846 microseconds
Average square: 50479 microseconds
Average relinearize: 26285 microseconds
Average rotate rows one step: 26960 microseconds
Average rotate rows random: 127576 microseconds
Average rotate columns: 27025 microseconds
Average serialize ciphertext: 319 microseconds
Average compressed (ZLIB) serialize ciphertext: 181093 microseconds
Average compressed (Zstandard) serialize ciphertext: 6015 microseconds
``````

Then I recompiled with `-DSEAL_USE_INTEL_HEXL=ON` and repeated the process and got the following:

``````+--------------------------------------------------------------------------+
|         BFV Performance Test with Degrees: 4096, 8192, and 16384         |
+--------------------------------------------------------------------------+
/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 4096
|   coeff_modulus size: 109 (36 + 36 + 37) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [2114 microseconds]
Generating Galois keys: Done [42659 microseconds]
Running tests .......... Done

Average batch: 222 microseconds
Average unbatch: 42 microseconds
Average encrypt: 1183 microseconds
Average decrypt: 902 microseconds
Average add: 5 microseconds
Average multiply: 3669 microseconds
Average multiply plain: 581 microseconds
Average square: 2765 microseconds
Average relinearize: 738 microseconds
Average rotate rows one step: 560 microseconds
Average rotate rows random: 2216 microseconds
Average rotate columns: 556 microseconds
Average serialize ciphertext: 15 microseconds
Average compressed (ZLIB) serialize ciphertext: 11515 microseconds
Average compressed (Zstandard) serialize ciphertext: 1683 microseconds

/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 8192
|   coeff_modulus size: 218 (43 + 43 + 44 + 44 + 44) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [10650 microseconds]
Generating Galois keys: Done [238692 microseconds]
Running tests .......... Done

Average batch: 310 microseconds
Average unbatch: 69 microseconds
Average encrypt: 3035 microseconds
Average decrypt: 3722 microseconds
Average add: 23 microseconds
Average multiply: 13892 microseconds
Average multiply plain: 2535 microseconds
Average square: 10526 microseconds
Average relinearize: 3145 microseconds
Average rotate rows one step: 2781 microseconds
Average rotate rows random: 11008 microseconds
Average rotate columns: 2742 microseconds
Average serialize ciphertext: 38 microseconds
Average compressed (ZLIB) serialize ciphertext: 42019 microseconds
Average compressed (Zstandard) serialize ciphertext: 1928 microseconds

/
| Encryption parameters :
|   scheme: BFV
|   poly_modulus_degree: 16384
|   coeff_modulus size: 438 (48 + 48 + 48 + 49 + 49 + 49 + 49 + 49 + 49) bits
|   plain_modulus: 786433
\

Generating secret/public keys: Done
Generating relinearization keys: Done [68194 microseconds]
Generating Galois keys: Done [1699540 microseconds]
Running tests .......... Done

Average batch: 578 microseconds
Average unbatch: 145 microseconds
Average encrypt: 9196 microseconds
Average decrypt: 15750 microseconds
Average add: 168 microseconds
Average multiply: 60583 microseconds
Average multiply plain: 10694 microseconds
Average square: 47020 microseconds
Average relinearize: 17176 microseconds
Average rotate rows one step: 16948 microseconds
Average rotate rows random: 80074 microseconds
Average rotate columns: 16925 microseconds
Average serialize ciphertext: 307 microseconds
Average compressed (ZLIB) serialize ciphertext: 181309 microseconds
Average compressed (Zstandard) serialize ciphertext: 5996 microseconds
``````

We do see noticeable performance gains for most operations, but batching and decryption are taking >100% more time. Is there any guidance you can offer on why this might be the case, and if there's anything we can do to address it?

Thanks.

opened by jryancarr 4
• #### Continue to have master branch

Since the branch was renamed to `main` even relatively recent codebases tha depend on hexl (from ~ a year ago) are now broken. Example:

``````git clone -b 3.6.6 https://github.com/microsoft/SEAL
cd SEAL
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=\$LIBDIR -DSEAL_USE_INTEL_HEXL=ON
``````

It would have been a much smoother transition and better experience for everyone if `master` branch was kept in the repo even if further development is done in `main` or, as some projects do, if `master` was mirroring `main`, which can be done with a very simple script.

opened by bazzilic 3
• #### Fboemer/seal ckks ops

Adds SEAL CKKS multiply and SEAL CKKS key switch ops, enabled via a `HEXL_EXPERIMENTAL` compile-time flag.

opened by fboemer 3
• #### CKKS multiply experimental feature doesn't work correctly when integrated with SEAL

When trying to integrate the HEXL experimental features into SEAL, I found that it's not giving me the correct results. I'm not sure if I'm doing something wrong or if there is an error in the CKKS multiply implementation of HEXL.

How to reproduce:

``````git clone https://github.com/tgonzalez89-intel/SEAL.git
git checkout hexl-ckks-mult-bug
./build.sh
cd build/bin
./sealtest
``````

Observe that the tests fail.

You can run `git diff 3.7.2` to observe the changes I made to SEAL in order to integrate HEXL's CKKS multiply.

opened by tgonzalez89-intel 2
• #### Fix build failure due to specifying wrong branch name for gbenchmark

This PR fixes the build failure when enabling benchmarking (by default). Its branch name seems to have changed recently https://github.com/google/benchmark/issues/1116.

``````\$ cmake -S . -B build
-- CMAKE_BUILD_TYPE:              Release
-- CMAKE_C_COMPILER:              /usr/bin/cc
-- CMAKE_CXX_COMPILER:            /usr/bin/c++
-- HEXL_ENABLE_UB_SANITIZER:      OFF
-- HEXL_BENCHMARK:                ON
-- HEXL_COVERAGE:                 OFF
-- HEXL_DEBUG:                    OFF
-- HEXL_DOCS:                     OFF
-- HEXL_EXPORT:                   OFF
-- HEXL_SHARED_LIB:               OFF
-- HEXL_TESTING:                  ON
-- HEXL_TREAT_WARNING_AS_ERROR:   OFF
-- HEXL_USE_GNU:                  ON
-- CMAKE_CXX_FLAGS_DEBUG -g
-- CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
-- CMAKE_CXX_FLAGS
-- Setting HEXL_HAS_AVX256
-- CMAKE_INSTALL_LIBDIR:     lib
-- CMAKE_INSTALL_INCLUDEDIR: include
-- CMAKE_INSTALL_PREFIX:     /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mssn/workspace/lab/hexl/build/cmake/cpu-features/cpu-features-download
[100%] Built target cpu_features
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mssn/workspace/lab/hexl/build/cmake/gtest/gtest-download
[100%] Built target gtest
CMake Deprecation Warning at build/cmake/gtest/gtest-src/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at build/cmake/gtest/gtest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at build/cmake/gtest/gtest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mssn/workspace/lab/hexl/build/cmake/gbenchmark/gbenchmark-download
[ 11%] Performing download step (git clone) for 'gbenchmark'
Cloning into 'gbenchmark-src'...
fatal: invalid reference: master
Failed to checkout tag: 'master'

make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/gbenchmark.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at cmake/gbenchmark/CMakeLists.txt:17 (message):
Build step for gbenchmark failed: 2

-- Configuring incomplete, errors occurred!
``````
opened by musaprg 2
• #### Creation of Custom Thread Pool

opened by joserochh 1
• #### Using thread pool

This branch has all reviews from custom_thread_pool draft PR https://github.com/intel/hexl/pull/135. The difference here is that the kernel functions are actually using the thread pool.

opened by joserochh 0
• #### v1.2.5(Aug 8, 2022)

• Adds experimental FFT-like (https://github.com/intel/hexl/pull/104)
• Adds big moduli tests for IFMA (https://github.com/intel/hexl/pull/123)
• Fixes HEXL's example build (https://github.com/intel/hexl/pull/114)
• Fixes IFMA/DQ logic error (https://github.com/intel/hexl/pull/118)
• Fixes pre-built CpuFeatures Error (https://github.com/intel/hexl/pull/120)
• Fixes 52-bit modulus issue https://github.com/intel/hexl/issues/121 (https://github.com/intel/hexl/pull/123)
• Updates to documentation

Co-Authored-by: @joserochh Co-Authored-by: @hamishun Co-Authored-by: @jlhcrawford

Full Changelog: https://github.com/intel/hexl/compare/v1.2.4...v1.2.5

Source code(tar.gz)
Source code(zip)
• #### v1.2.4(Mar 18, 2022)

• Adds experimental HEXL-FPGA compatibility for dyadic multiply and key switch (https://github.com/intel/hexl/pull/109)
• Adds vcpkg example of how to use previous HEXL versions (https://github.com/intel/hexl/pull/103)
• Adds benchmarking Montgomery multiplication (https://github.com/intel/hexl/pull/94)
• Moves to compiling with minimum C++ 17
• Updates to documentation

Co-Authored-by: @fboemer Co-Authored-by: @joserochh Co-Authored-by: @GelilaSeifu Co-Authored-by: @hamishun Co-Authored-by: @jlhcrawford Co-Authored-by: @skmono Co-Authored-by: @ajagann Co-Authored-by: @ymeng-git Co-Authored-by: @tgonzalez89-intel

Full Changelog: https://github.com/intel/hexl/compare/v1.2.3...v1.2.4

Source code(tar.gz)
Source code(zip)
• #### v1.2.3(Nov 3, 2021)

• Fix to EltwiseReduceMod on AVX512-DQ processors (https://github.com/intel/hexl/issues/86)
• Update minimum CMake version to 3.13
• Fixes 3rd-party dependency commits (https://github.com/intel/hexl/pull/85)

Co-Authored-by: @fboemer Co-Authored-by: @joserochh Co-Authored-by: @GelilaSeifu Co-Authored-by: @fdiasmor

Full Changelog: https://github.com/intel/hexl/compare/v1.2.2...v1.2.3

Source code(tar.gz)
Source code(zip)
• #### v1.2.2(Oct 23, 2021)

• Fixes Barrett reduce native benchmark (https://github.com/intel/hexl/pull/65)
• Fixes 32 bit invntt (https://github.com/intel/hexl/pull/73)
• Fixes CMake 3.13 compilation (https://github.com/intel/hexl/pull/67)
• Added information of HElib integration to README (https://github.com/intel/hexl/pull/63)
• Added random number generator which generates a vector of specified size with random values drawn uniformly from [0, modulus) (https://github.com/intel/hexl/pull/62)
• Added random input values for benchmarks (https://github.com/intel/hexl/pull/66)
• Uses Generalized Barrett Reduction algorithm for EltwiseMultMod (https://github.com/intel/hexl/pull/68)
• Avoids memcpy operations on NTT (https://github.com/intel/hexl/pull/72)
• Added performance tips to README (https://github.com/intel/hexl/pull/74)
• Improves performance of Barrett Reduction (https://github.com/intel/hexl/pull/75)

Co-Authored-by: @fboemer Co-Authored-by: @joserochh Co-Authored-by: @GelilaSeifu

Source code(tar.gz)
Source code(zip)
• #### v1.2.1(Sep 2, 2021)

• Fixes a bug in AVX512 floating-point implementation of element-wise vector-vector modular multiplication (https://github.com/microsoft/SEAL/issues/385)
• Fixes a bug in the NTT default constructor (https://gitlab.com/palisade/palisade-development/-/issues/329)
• Fixes a bug in the AVX512 NTT (https://github.com/intel/hexl/pull/58)
• Improves performance of EltwiseFMAModAVX512 on ICX (https://github.com/intel/hexl/pull/42)
• Improves performance of the native NTT
• Adds reference implementations for the radix-4 NTT
• Enables support for pre-built easylogging (https://github.com/intel/hexl/pull/57)

Co-Authored-by: @fboemer Co-Authored-by: @GelilaSeifu Co-Authored-by: @jlhcrawford Co-Authored-by: @ajagann Co-Authored-by: @hamishun

Source code(tar.gz)
Source code(zip)

# Changes

• Large performance improvement in large (N >= 16384) AVX512 NTTs via recursive implementations
• Slight performance improvements in AVX512IFMA NTT
• Slight performance improvements in element-wise modular multiplication
• Implement optimized AVX512DQ NTT for moduli < 32 bits
• Expands public API to include number theory, NTT twiddle factors
• Remove HEXL_DEBUG and HEXL_EXPORT options. The behavior now is to always export the cmake configuration files, and HEXL_DEBUG is enabled iff the CMAKE_BUILD_TYPE=Debug
• Added pkgconfig support

Co-Authored-by: @fboemer Co-Authored-by: @GelilaSeifu Co-Authored-by: @jlhcrawford Co-Authored-by: @ajagann

Source code(tar.gz)
Source code(zip)

# Changes

• Added vector-vector and vector-scalar EltwiseSubMod
• Added generic 128-bit division for Windows build
• Documentation hosted on a separate branch
• Enabled custom allocator for NTT class
• Fixed argument order in EltwiseReduceMod
• Fixed build warnings on Windows and Mac
Source code(tar.gz)
Source code(zip)

# Changes

• Remove intel- prefix from headers and library name
• Fix CMake variables from 3rd party libraries from leaking
• Fix warnings when HEXL_DEBUG=ON
Source code(tar.gz)
Source code(zip)
• #### v1.0.0(May 10, 2021)

###### Libraries and tools to perform fully homomorphic encryption operations on an encrypted data set.

Fully Homomorphic Encryption (FHE) This repository contains open-source libraries and tools to perform fully homomorphic encryption (FHE) operations o

2.9k Jan 7, 2023
###### Homomorphic Encryption PIR Postgres C/C++ Agregate Extension.

MuchPIR Demo Contact The MuchPIR Team: [email protected] What is PIR? Private Information Retrieval refers to the ability to query a database without disc

13 Nov 3, 2022
###### LibSWIFFT - A fast C/C++ library for the SWIFFT secure homomorphic hash function

LibSWIFFT - A fast C/C++ library for the SWIFFT secure homomorphic hash function Official Repository LibSWIFFT is a production-ready C/C++ library pro

23 Oct 23, 2022
524 Jan 2, 2023
###### Rubicon - a New Custom Encryption Algorithm/Tool

Rubicon - a New Custom Encryption Algorithm/Tool Disclaimer DO NOT use this project for purposes other than legitimate red teaming/pentesting jobs

27 Dec 13, 2022
###### In cryptography, a cipher is an algorithm for performing encryption or decryption.

Cipher 1.0 In cryptography, a cipher is an algorithm for performing encryption or decryption. What can be done using this program? This program can us

1 Apr 21, 2022
###### FractalCrypt - Free cryptoarchiver permitting any number of hidden volumes for deniable encryption

FractalCrypt - Free cryptoarchiver permitting any number of hidden volumes for deniable encryption

360 Dec 12, 2022
###### obfuscated any constant encryption in compile time on any platform

oxorany 带有混淆的编译时任意常量加密 English 介绍 我们综合了开源项目ollvm、xorstr一些实现思路，以及c++14标准中新加入的constexpr关键字和一些模板的知识，完成了编译时的任意常量的混淆(可选)和加密功能。

154 Dec 29, 2022
###### Oceantoo is an XOR/LFSR based encryption algorithm

Oceantoo Oceantoo is an XOR/LFSR based encryption algorithm What is an LFSR? A linear-feedback shift register (LFSR) is a method of manipulating a num

7 Aug 2, 2022
###### a new encryption algorithm that uses increments instead of XOR

incrypt a new encryption algorithm that uses increments instead of XOR. how to compile for linux: gcc incrypt.c -o incrypt gcc dicrypt.c -o dicrypt ho

1 Nov 24, 2021
###### inetd-style TLS encryption wrapper

Description The tlswrapper is an TLS encryption wrapper between remote client and local program prog. Is executed from systemd.socket/inetd/tcpserver/

2 Dec 22, 2022
###### Transparent file encryption in git

git-crypt - transparent file encryption in git git-crypt enables transparent encryption and decryption of files in a git repository. Files which you c

7k Dec 30, 2022
###### Collection of common encryption.

EasyCipher 概述 EasyCipher收集了几种常见的加密方法的C语言实现，并基于Android平台封装了jni接口。 提供的加密方法包括 AES加密核心部分，不涉及模式和padding，支持128bits和256bits AES/CBC/PKCS5Padding SHA256 HAMC-

7 Aug 19, 2022
###### An implementation of Advanced Encryption Standard with calculative optimization

An implementation of Advanced Encryption Standard with calculative optimization. Complete round operations in a single function.

1 Jan 24, 2022
###### Linux rootkit used to hide a cryptominer process and CPU usage.

Linux rootkit used to hide a cryptominer process and CPU usage.

44 Dec 31, 2022
###### CoinBrowser is a tool for Freqtrade where the program writes pairs into text file to be used with spesific exchange.

CoinBrowser CoinBrowser is a tool for Freqtrade where the program writes pairs into text file to be used with spesific exchange. Data for this program

25 Dec 14, 2022
###### The Keccak (SHA-3) hash used by Ethereum.

The Keccak (SHA3) digest for Ruby This Ruby extension exposes the Keccak (SHA3) digest C bindings in the non-final version used by Ethereum. It is bas

18 Nov 3, 2022
###### free C++ class library of cryptographic schemes

Crypto++: free C++ Class Library of Cryptographic Schemes Version 8.4 - TBD Crypto++ Library is a free C++ class library of cryptographic schemes. Cu

3.7k Jan 2, 2023