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.
Follow the links above to install the corresponding packages
mkdir build
cd build
cmake ..
make
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 MAXOP, client
-
For server communication,
server0_port
tells Server 0 which port to open, and server 1 which port of server 0 is open.
- Run
cd build
andmake
- Run
./bin/server 0 8800 8888 8
to start the first server - In another window, run
./bin/server 1 8801 8888 8
to start the second server - In another window, run
./bin/client 10 8800 8801 VAROP 8
to run a meta-client that sends out client messages - Repeat step 4 as desired with different parameters
- 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 onmax_bits
-bit integers
- Servers connect to each other
- Servers do initial communication and precomputation
- Client produces shares
- Client connects to servers, sends corresponding shares
- Servers recieve all shares
- For each share, servers check if public keys line up
- If relevant, servers use EdaBit share conversion to get wire shares for SNIPS, or OT share conversion if SNIPS are not needed
- If relevent, servers run SNIPS validations
- Servers combine their aggregates, taking into account validitiy of shares
- Server 0 computes the final answer using the combined aggregates