Code Monkey home page Code Monkey logo

prio-plus's Introduction

Background

This is the software prototype that accompanies the research paper

Prio+ https://eprint.iacr.org/2021/576.pdf
By Surya Addanki, Kevin Garbe, Eli Jaffe, Rafail Ostrovsky, and Antigoni Polychroniadou

This is an improvement of the original Prio code by Henry Corrigan-Gibs and Dan Boneh, which can be found here, detailed in "Prio: Private, Robust, and Scalable Computation of Aggregate Statistics"

Some of this code, such as the fast polynomial operations, is directly based on their code.

Dependencies

  1. Flint 3.1.0+
  2. emp-ot

Getting Started

Install dependencies

Follow the links above to install the corresponding packages

Build Prio+

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make

Run

There are two relevant binaries:

  • server: Runs a server instance
  • client: Mimics a cluster of individual clients

By default, they are configured to connect to localhost. For testing across multiple machines, configure the constants on top of client.cpp and server.cpp to the IP addresses of the two servers.

The code runs two servers, 0 and 1, each of which needs to be started separately. Server 0 needs to be started before server 1.

  • Server arguments are server_num client_listen_port server0_port max_bits

  • Client arguments are num_inputs server0_port server1_port operand max_bits linreg_degree

  • Ports and max bits need to be consistent across runs and both servers and the client.

  • max_bits is used for int based summations, and must match the server value in this case.

    • For MAXOP, client max_bits instead determines the max value (e.g. 7 -> 128), and does not have to match the servers.
  • For server communication, server0_port tells Server 0 which port to open, and server 1 which port of server 0 is open.

Usage example

  1. Run cd build and make
  2. Run ./bin/server 0 8800 8888 8 to start the first server
  3. In another window, run ./bin/server 1 8801 8888 8 to start the second server
  4. In another window, run ./bin/client 10 8800 8801 VAROP 8 to run a meta-client that sends out client messages
  5. Repeat step 4 as desired with different parameters

Supported protocols

  • BITSUM: 1 bit integers sum
  • INTSUM: max_bits -bit integer sum
  • ANDOP / OROP: Boolean and/or
  • MAXOP / MINOP: Max/min, with values between 0 and 2^max_bits
  • VAROP / STDDEVOP: Variance / Standard Deviation of max_bits-bit integers
  • LINREGOP: linreg_degree degree linear regression on max_bits-bit integers

Code flow outline

  1. Servers connect to each other
  2. Servers do initial communication and precomputation
  3. Client produces shares
  4. Client connects to servers, sends corresponding shares
  5. Servers recieve all shares
  6. For each share, servers check if public keys line up
  7. If relevant, servers use EdaBit share conversion to get wire shares for SNIPS, or OT share conversion if SNIPS are not needed
  8. If relevent, servers run SNIPS validations
  9. Servers combine their aggregates, taking into account validitiy of shares
  10. Server 0 computes the final answer using the combined aggregates

prio-plus's People

Contributors

kurathedog avatar suriya17 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.