This repository contains the cryptographic implementation of Prio in C++, together with a JNI wrapper. It is intended to be interoperable with the libprio-rs client code implementation and the matching Rust server code implementation.
Prio is a cryptographic technology that allows clients to submit metrics to servers in a private way, such that the servers only learn aggregated outputs. In more detail, the client will create shares of its metrics, and send one share to each of Server A and Server B. Server A and Server B will locally accumulate such shares from multiple clients, and eventually engage in an interactive cryptographic protocol that will allow Server A to learn the aggregate metric across all clients, but nothing extra.
More details can be found in the full academic paper:
"Prio: Private, Robust, and Scalable Computation of Aggregate Statistics"
by Henry Corrigan-Gibbs and Dan Boneh
USENIX Symposium on Networked Systems Design and Implementation
March 2017Available online at: https://crypto.stanford.edu/prio/
This repository requires Bazel. You can install Bazel by following the instructions for your platform on the Bazel website.
You must also install Android SDK and NDK, and set the environment variables ANDROID_HOME and ANDROID_NDK_HOME to point to the paths to the Android SDK and NDK respectively. See this website for more details. These are needed in order to support JNI compilation.
Once you have installed Bazel and set the environment variables, you can clone this repository and run all tests that are included by navigating into the root folder and running:
bazel test //...
To build a shared object (.so file) containing the JNI wrapped client code, follow the instructions in prio/jni/README.md. You will find example commands to build .so files for different platforms.
This is not an officially supported Google product.