This codebase is released solely as a reference for other developers, as a proof-of-concept, and for benchmarking purposes. In particular, it has not had any security review, has a number of implementational TODOs, has a number of known bugs (especially in the ABY-based Secure Aggregation), and thus, should be used at your own risk. You can contribute to this project by creating pull requests and submitting fixes and implementations.
-
The code should work on most Linux distributions (It has been developed and tested with Ubuntu 16.04 and 18.04).
-
Required packages for CryptoFL:
Install these packages with your favorite package manager, e.g,
sudo apt-get install <package-name>
.
-
Common/Grpc
- The grpc proto defined, generated byCommon/Grpc/grpc.sh
-
Common/Handler
- Class Handler for Secure Aggregation. -
Common/Model
- Neural Network definitions. -
Common/Node
- Base Class for Client (a.k.a., Worker). -
Common/Server
- Base Class for Server. -
Common/Utils
- data loader, split, and some other basic algorithms. -
Data
- The distributed splitted dataset. -
log
- logs. -
Model
- The initilized and frozen Neural Networks. -
SA_Lib
- The Secure Aggregation Library, and is implemeted on the top of ABY and pybind. -
Clear-Agg-Eva
- The cleartext aggregation methods for FL:- s
-
TPC_SS_Dense
- Implemtation of the semi-honest Secure Aggregation of DCS'19.
To build your SA, run the following commands:
Implement your own ABY-based 2PC Secure Aggregation protocols. Then, run
cd SA_Lib
./build.sh
Next, bind your 2PC protocols with py
in cryptofl_handler.py
.
To run the code, simply choose one of the following options:
Server
: run 2python xx_server.py
for Secure Aggregation. Need only one server for cleartext aggregation;Client
: run eachpython xx_client.py
independently.start.sh
gives a bash shell.
Note that there might be bugs in ABY and some py
import path on your machine.
- Fix the bugs in Secure Aggregation protocols.
- Add more MPC libraries for Secure Aggregation in addition to ABY.
- Implement secure FL protocols, including EaSTFLy and FLOD.
For questions, please create git issues; for eventual replies, you can also reach out to 19950512dy@gmail.com