Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home How to install TFHE homomorphic encryption & run the tutorial

How to install TFHE homomorphic encryption & run the tutorial

published Aug 06, 2017 02:15   by admin ( last modified Aug 08, 2017 11:28 )

How to install the TFHE Fast Fully Homomorphic Encryption over the Torus library and run its tutorial on Linux.

Make sure you have the dependencies, for ubuntu it is:

sudo apt-get install build-essential cmake

Download the tfhe source tarball, extract it and enter the top directory

mkdir build
cd build

Change "/home/jorgen/usr/local" to where you want your local install below:

cmake ../src -DCMAKE_INSTALL_PREFIX=/home/jorgen/usr/local
make install

Download the example files from

Make sure you have correct paths by making a script called "" with the following content:

#configure environment variables
TFHE_PREFIX=/home/jorgen/usr/local #the prefix where you installed tfhe

Run it from the terminal you are in with:


Enter the directory where the tutorial files are

Make a shell script called "" with the following contents:

g++ -o alice alice.c -ltfhe-spqlios-fma
g++ -o cloud cloud.c -ltfhe-spqlios-fma
g++ -o verif verif.c -ltfhe-spqlios-fma

chmod 755 alice
chmod 755 cloud
chmod 755 verif


Run it

Add comment

You can add a comment by filling out the form below. Plain text formatting. You can use the Markdown syntax for links and images. Comments are moderated.

Question: What is 5 + 4 ?
Your answer: