Giter Site home page Giter Site logo

secureaggregationdemo's Introduction

SecureAggregation

基于"Practical Secure Aggregation for Privacy-Preserving Machine Learning"的协议通信实现,使用python.

需要Flask, socketio and socketIO_client等模块

pip install Flask

pip install socketio

pip install socketIO-client

pip install numpy

pip install flask_socketio

注意: 1.由于socketIO_client长时间未更新,只能适配pip setuptools 3.1.0;而socketio等模块需要更新到setuptools 3.3.0以上,自动更新会将setuptools更新到62.2.0 所以需要手动修改socketIO_client的setup.py文件,将setuptools版本改为3.1.0; 或者先安装socketIO_client,再安装其他模块. 2.socketio模块安装过程中需要Build wheels,需要C++编译环境支持

Usage:

Client side:

初始化

c = secaggclient(host,port)

给予权重数组和数组维度

c.set_weights(nd_numpyarray,dimensions_of_array)

设定本轮迭代次数

c.configure(common_base, common_mod)

启动客户端

c.start()

Server side:

初始化

s = secaggserver(host,port,n,k)

n代表该轮中存活的用户,k代表该轮中需要收集的用户数(即规定的参数t)

服务器启动

s.start()

secureaggregationdemo's People

Contributors

issacl04 avatar

Watchers

 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.