Implementation of the Prio aggregation system core: https://crypto.stanford.edu/prio/

21 releases (11 breaking)

0.12.2 May 24, 2023
0.12.0 Mar 22, 2023
0.10.0 Sep 20, 2022
0.9.1 Dec 6, 2022
0.2.0 Oct 1, 2020

#108 in Cryptography

Download history 1670/week @ 2023-02-14 1528/week @ 2023-02-21 1376/week @ 2023-02-28 1920/week @ 2023-03-07 1051/week @ 2023-03-14 1604/week @ 2023-03-21 1961/week @ 2023-03-28 1064/week @ 2023-04-04 1944/week @ 2023-04-11 1400/week @ 2023-04-18 1117/week @ 2023-04-25 1277/week @ 2023-05-02 1439/week @ 2023-05-09 1421/week @ 2023-05-16 1205/week @ 2023-05-23 1185/week @ 2023-05-30

5,436 downloads per month
Used in 6 crates

MPL-2.0 license

13K SLoC


Build Status Latest Version Docs badge

Pure Rust implementation of Prio, a system for Private, Robust, and Scalable Computation of Aggregate Statistics.

Exposure Notifications Private Analytics

This crate is used in the Exposure Notifications Private Analytics system. This is supported by the interfaces in modules server and client and is referred to in various places as Prio v2. See prio-server or the ENPA whitepaper for more details.

Verifiable Distributed Aggregation Function

Crate prio also implements a Verifiable Distributed Aggregation Function (VDAF) called "Prio3", implemented in the vdaf module, allowing Prio to be used in the Distributed Aggregation Protocol protocol being developed in the PPM working group at the IETF. This support is still evolving along with the DAP and VDAF specifications.

Draft versions and release branches

The main branch is under continuous development and will usually be partway between VDAF drafts. libprio uses stable release branches to maintain implementations of different VDAF draft versions. Crate prio version x.y.z is released from a corresponding release/x.y branch. We try to maintain Rust SemVer compatibility, meaning that API breaks only happen on minor version increases (e.g., 0.10 to 0.11).

Crate version Git branch VDAF draft version DAP draft version Conforms to specification? Status
0.8 release/0.8 draft-irtf-cfrg-vdaf-01 draft-ietf-ppm-dap-01 Yes Unmaintained as of March 28, 2023
0.9 release/0.9 draft-irtf-cfrg-vdaf-03 draft-ietf-ppm-dap-02 and draft-ietf-ppm-dap-03 Yes Unmaintained as of September 22, 2022
0.10 release/0.10 draft-irtf-cfrg-vdaf-03 draft-ietf-ppm-dap-02 and draft-ietf-ppm-dap-03 Yes Supported
0.11 release/0.11 draft-irtf-cfrg-vdaf-04 N/A Yes Unmaintained
0.12 main draft-irtf-cfrg-vdaf-05 draft-ietf-ppm-dap-04 Yes Supported

Cargo Features

This crate defines the following feature flags:

Name Default feature? Description
crypto-dependencies Yes Enables dependencies on various RustCrypto crates, and uses them to implement PrgSha3 to support VDAFs.
experimental No Certain experimental APIs are guarded by this feature. They may undergo breaking changes in future patch releases, as an exception to semantic versioning.
multithreaded No Enables certain Prio3 VDAF implementations that use rayon for parallelization of gadget evaluations.
prio2 No Enables the Prio v2 API, and a VDAF based on the Prio2 system.
test-util No For internal use only, to support the test suite and test vectors.


~148K SLoC