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
clientdirectory, open theppscript.shfile, and edit thewordsizevariable to specify the bit size of the data.- PulpFHE supports 8, 16, and 32-bit data.
- Edit the
preAux.txtfile to input the plaintext data to be encrypted and processed. - From the
PulpFHEdirectory, launch the server by runningbash runme.sh. - From another terminal, navigate to the
cloud_encdirectory 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 theBenchmarksdirectory. - 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 theBenchmarksdirectory.
- The
- To print the output, go to the
clientdirectory, and run./decrypt ../cloud_enc/output.data <wordsize>.
The companion upgraded HE-Java compiler can be found at HE-Java-Compiler
