Python implementation of the Fully Homomorphic Encryption (FHE) scheme TFHE: Fast Fully Homomorphic Encryption over the Torus.
You can see example usages in the Jupyter Notebook and the tests directory.
The starting point of this implementation was the code written by NuCypher for their NuFHE library. More specifically the code in commit 17f3b62 was used which itself seems to be a port of their Julia version nucypher/TFHE.jl which looks like a port (see this commit) of the original tfhe/tfhe codebase that's written in C / C++.
git clone <url>
asdf install
pipenv install -e .
pipenv shell
python tests/e2e_half_adder_test.py
pipenv run test
pipenv run coverage
pipenv scripts
Optional: Update the properties marked with TODO:
in the .vscode/settings.json
file. To get the correct paths run which <package>
within a Pipenv shell.
asdf install
pipenv install -e .
pipenv install [-d] <name>[~=<version>]
pipenv shell
pipenv scripts
pipenv run <command>
python <path>
flake8 <path>
pylint <path> --recursive true
mypy <path>
pytest [-s] [-v] [-k <pattern>] [<path>]
coverage html
coverage report -m
py-spy record -o profile.svg --pid <pid>
py-spy record -o profile.svg -- python <path>
py-spy top -- python <path>
- tfhe/tfhe
- nucypher/nufhe
- zama-ai/tfhe-rs
- nucypher/TFHE.jl
- thedonutfactory/go-tfhe
- thedonutfactory/rs_tfhe
- virtualsecureplatform/pyFHE
- openfheorg/openfhe-development
- TFHE: Fast Fully Homomorphic Encryption over the Torus
- Guide to Fully Homomorphic Encryption over the [Discretized] Torus
- SoK: Fully Homomorphic Encryption over the [Discretized] Torus
- TFHE Deep Dive - Part I - Ciphertext types
- TFHE Deep Dive - Part II - Encodings and linear leveled operations
- TFHE Deep Dive - Part III - Key switching and leveled multiplications
- TFHE Deep Dive - Part IV - Programmable Bootstrapping
- Introduction to practical FHE and the TFHE scheme - Ilaria Chillotti, Simons Institute 2020
- TFHE Deep Dive - Ilaria Chillotti, FHE.org
- 003 TFHE Deep Dive (by Ilaria Chillotti)
- Part 1 Introduction to FHE and the TFHE scheme - Ilaria Chillotti, ICMS
- Part 2 Introduction to FHE and the TFHE Scheme - Ilaria Chillotti, ICMS
- Introduction to FHE (Fully Homomorphic Encryption) - Pascal Paillier, FHE.org Meetup