GithubHelp home page GithubHelp logo

mstc-xqp / cryptofl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ye-d/cryptofl

0.0 0.0 0.0 54.51 MB

Cryptographically Secure Aggregation for Federated Learning

License: MIT License

Shell 0.52% C++ 2.76% Python 93.23% CMake 3.49%

cryptofl's Introduction

CryptoFL: Cryptographically Secure Aggregation for Federated Learning

Table of Contents

Warning


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.

Requirements


  • 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>.

Source Code


Repository Structure

  • Common/Grpc - The grpc proto defined, generated by Common/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.

Building the code

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.

Running the code

To run the code, simply choose one of the following options:

  • Server: run 2 python xx_server.py for Secure Aggregation. Need only one server for cleartext aggregation;
  • Client: run each python xx_client.py independently. start.sh gives a bash shell.

Bugs

Note that there might be bugs in ABY and some py import path on your machine.

TODO

  • 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 [email protected]

cryptofl's People

Contributors

ye-d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.