Algemetric's Fully homomorphic encryption scheme with Hensel Codes. HERatio stands for Homomorphic Encryption over Rationals.
HERatio is written in C++ and is built using Bazel.
If you are on Mac, you can install Bazel using Homebrew:
brew install bazelThere are also other options for installing Bazel on Mac. If you are on Linux, there are several options available depending on what distribution you use. Some spefic recommendations for Ubuntu can be found here. Instructions for installing Bazel on Windows are also available.
Bazel also offers Bazelisk, a tool with which you can easily install Bazel on Ubuntu, Windows, and Mac.
In order to properly compile and run HERatio, you need to have NTL and GMP in your system.
If you are on Mac, you can use Homebrew to install both [NTL](brew install ntl) and GMP as follows:
brew install ntl
brew install gmpIf you are on Linux, you can follow these instructions for installing and configuring NTL and GMP. You can find the latest packages for dowloading GMP here.
If you are on Windows, you can follow these instructions for installing and configuring NTL and GMP.
Once you have NTL and GMP in your system, make sure to modify the path for both libraries inside the file WORKSPACE at the root of the project:
new_local_repository(
name = "ntl",
path = "/usr/local/var/homebrew/linked/ntl",
build_file = "dependencies/BUILD.ntl",
)
new_local_repository(
name = "gmp",
path = "/usr/local/var/homebrew/linked/gmp",
build_file = "dependencies/BUILD.gmp",
)The paths above will work if you installed NTL and GMP using Homebrew. Otherwise, just replace these paths by the corresponding paths in your system.
Building:
bazel build demo:heratioRunning demo:
./bazel-bin/demo/heratioCleaning up:
bazel cleanTesting:
bazel test --test_output=all //...