REDsec is an end-to-end framework for encrypted neural network inference using the CGGI cryptosystem. The TFHE and (RED)cuFHE libraries are utilized as cryptographic backends. A video presentation of REDsec is available here.
Install TFHE v1.1 with the packaged SPQLIOS-FMA FFT engine.
Install (RED)cuFHE
- Clone the repo:
git clone https://github.com/TrustworthyComputing/REDsec.git
- Navigate to library source directory:
cd REDsec/lib
- Build one (or more) of the desired library variants:
make ptxt && make cpu-encrypt && make gpu-encrypt
REDsec has a BYON framework. The tutorial and compiler are located here.
- Navigate to client directory:
cd REDsec/client
- Generate FHE keypair by following the brief instructions printed by
make keygen-help
- Encrypt an image (in CSV format) by following instructions printed by
make encrypt-image-help
- After the inference procedure is run, follow the instructions printed by
make decrypt-image-help
- Navigate to a network of your choice (e.g.
cd REDsec/nets/mnist/sign1024x1
) - (Optional) Verify network accuracy:
make ptxt
- Build and run one (or more) encrypted network variants :
make cpu-encrypt
for TFHE (CPU) backend andmake gpu-encrypt
for (RED)cuFHE (GPU) backend
This library was introduced in the REDsec paper, which presents a framework for privacy-preserving neural network inference and will appear in the NDSS Symposium 2023 (Cryptology ePrint Archive):
@inproceedings{folkerts2023redsec,
author = {Lars Folkerts and Charles Gouert and Nektarios Georgios Tsoutsos},
title = {{REDsec: Running Encrypted Discretized Neural Networks in Seconds}},
booktitle = {{Network and Distributed System Security Symposium (NDSS)}},
pages = {1--17},
year = {2023},
}