PulpFHE is an extension unit with optimized non-linear functions for FHE processors. This project is a deployment of the new instructions set on its sister project, Juliet.
This project introduces several optimizations and extensions to the existing Juliet architecutre.
- Install TFHE
- Update library path if necessary:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<TFHE_INSTALL_DIR>/lib
export LIBRARY_PATH=$LIBRARY_PATH:<CUFHE_DIR>/cufhe/bin
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:<CUFHE_DIR>/cufhe/include
- Navigate to the
client
directory, open theppscript.sh
file, and edit thewordsize
variable to specify the bit size of the data.- PulpFHE supports 8, 16, and 32-bit data.
- Edit the
preAux.txt
file to input the plaintext data to be encrypted and processed. - From the
PulpFHE
directory, launch the server by runningbash runme.sh
. - From another terminal, navigate to the
cloud_enc
directory and run the processor by running the interperter using the following command:python3 pulpfhe_interpreter.py <program-name> [wordsize] [number-of-registers]
.- The
<program-name>
is the name of the assembly file in theBenchmarks
directory. - The
[wordsize]
is the size of the plaintext data in bits. The default is 8. - The
[number-of-registers]
is the number of registers that processor will use. The defualt is 128. - Please note that when passing
<program-name>
, just pass the filename and the interperter will automatically fetch it from theBenchmarks
directory.
- The
- To print the output, go to the
client
directory, and run./decrypt ../cloud_enc/output.data <wordsize>
.
The companion upgraded HE-Java compiler can be found at HE-Java-Compiler