Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TrustworthyComputing/T2-FHE-Compiler-and-Benchmarks
A cross compiler and standardized benchmarks for fully homomorphic encryption
https://github.com/TrustworthyComputing/T2-FHE-Compiler-and-Benchmarks
benchmarks compiler fhe helib homomorphic-encryption lattigo palisade seal tfhe
Last synced: about 1 month ago
JSON representation
A cross compiler and standardized benchmarks for fully homomorphic encryption
- Host: GitHub
- URL: https://github.com/TrustworthyComputing/T2-FHE-Compiler-and-Benchmarks
- Owner: TrustworthyComputing
- License: mit
- Created: 2020-08-27T20:43:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-29T21:16:57.000Z (12 months ago)
- Last Synced: 2024-08-04T00:03:59.869Z (5 months ago)
- Topics: benchmarks, compiler, fhe, helib, homomorphic-encryption, lattigo, palisade, seal, tfhe
- Language: Java
- Homepage:
- Size: 4.53 MB
- Stars: 29
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-he - T2 - A cross compiler and standardized benchmarks for FHE computation that targets [lattigo](#lattigo), [HElib](#HElib), [PALISADE](#PALISADE), [Microsoft SEAL](#SEAL), and [tfhe](#tfhe). (Toolkits)
README
T2: A cross compiler and standardized benchmarks for FHE computation
## Overview
T2 is an *extensible cross compiler* and *standardized benchmark suite* enabling comparisons between
fully-homomorphic encryption (FHE) libraries. The T2 repository comprises the
T2 DSL and the T2 compiler from T2 DSL to state-of-the-art FHE back-ends.T2 aims to offer a standardized benchmark suite for FHE that encompasses
realistic use-cases. Additionally, the T2 compiler offers a great starting
point to explore the different backends (e.g., HElib, Lattigo, PALISADE, SEAL,
and TFHE) as a single T2 program is effortlessly transpiled to all supported
FHE libraries.The T2 compiler supports three distinct computational models: *Integer*, *Binary*,
and *Floating-Point* domains. Each domain utilizes different sets of functional
units, some of which are inherently supported by the backends, while others are
implemented on top of the FHE back-ends. This allows users to compare the
different domains and find the most efficient for their applications.T2 is the spiritual successor to the [TERMinator suite
repository](https://github.com/momalab/TERMinatorSuite),
which includes benchmarks tailored to encrypted computation. The original
Terminator suite targets partially homomorphic architectures, however, since its
release, fully homomorphic encryption (FHE) has become increasingly popular and
more viable. To account for this, T2 targets FHE architectures by modifying the
original benchmarks as well as adding new additions.### How to cite this work
The SoK outlining this framework appears in [PoPETS
2023](https://petsymposium.org/popets/2023/popets-2023-0075.php) (the preprint can be accessed
[here](https://eprint.iacr.org/2022/425.pdf)). An earlier journal article describing
the original Terminator suite can be accessed
[here](https://ieeexplore.ieee.org/document/8307166), while the authors' version
is available [here](https://jimouris.github.io/publications/mouris2018terminator.pdf).
You can cite these articles as follows:```
@Article{PoPETS:Gouert23sok,
author = "Charles Gouert and
Dimitris Mouris and
Nektarios Georgios Tsoutsos",
title = "{SoK: New Insights into Fully Homomorphic Encryption Libraries via Standardized Benchmarks}",
volume = 2023,
month = Jul,
year = 2023,
publisher = sciendo,
journal = "{Proceedings on Privacy Enhancing Technologies}",
number = 3,
pages = "154–172",
doi = "10.56553/popets-2023-0075",
}@Article{IEEECAL:Mouris18terminator,
author = "Dimitris Mouris and
Nektarios Georgios Tsoutsos and
Michail Maniatakos",
title = "{TERMinator Suite: Benchmarking Privacy-Preserving Architectures}",
journal = "IEEE Computer Architecture Letters",
year = "2018",
volume = "17",
number = "2",
pages = "122-125",
doi = "10.1109/LCA.2018.281281"}
}
```## Supported Homomorphic Encryption Libraries
Lattigo v4.1.0 adf7623
HElib v2.2.2 d7be6f0
PALISADE v1.11.9 3d1f9a3f
Microsoft SEAL v4.1.1 206648d
TFHE v1.0.1 6297bc7
## Build and Run Instructions
### Building with Docker
* Build the Docker image:
```powershell
docker build -t t2 .
```
* Run the Docker container:
```powershell
docker run --rm -i -t t2 bash
```### Building from Scratch
Tested on Ubuntu 22.04 LTS with Java 8, 9, and 19. For Lattigo, we used go version 1.17.6 and 1.18.1.#### Dependencies
*
```powershell
apt install cmake make build-essential g++ clang autoconf javacc patchelf openjdk-8-jdk maven m4 tar lzip libfftw3-dev
```
* [Go-lang](https://go.dev/dl/)
* Follow and modify [clone_libs.sh](./.circleci/clone_libs.sh) and
[build_libs.sh](./.circleci/build_libs.sh) scripts to install the FHE libraries in your custom destinations.#### Compile the T2 compiler
```powershell
mvn initialize package
```To skip running the test when compiling the T2 compiler run:
```powershell
mvn package -Dmaven.test.skip
```## Compile T2 programs
To compile a T2 program type:
```powershell
java -jar target/terminator-compiler-1.0.jar [--debug] [--w word_size]
```
where `` can be one of `HElib`, `Lattigo`, `SEAL`, `PALISADE`, and `TFHE`. For instance:### Example of compiling a T2 program for SEAL:
```powershell
java -jar target/terminator-compiler-1.0.jar src/test/resources/tests/arithmetic.t2 --seal
```
will use `SEAL` as the back-end over the integers.### Example of compiling a T2 program for Lattigo in the binary domain:
```powershell
java -jar target/terminator-compiler-1.0.jar src/test/resources/tests/bin_test.t2 --lattigo --w 6
```
will use `Lattigo` as the back-end in the binary domain. The T2 compiler
automatically detects the appropriate scheme (i.e., `BFV/BGV` or `CKKS`) based
on the type of the encrypted variables that the T2 program uses (i.e.,
`EncInt` or `EncDouble`).### Example of compiling a T2 program for SEAL in the floating-point domain:
```powershell
java -jar target/terminator-compiler-1.0.jar src/test/resources/tests/ckks_test.t2 --seal
```
will use `SEAL` with the `CKKS` scheme.
Trustworthy Computing Group