Home

Awesome

libprio-rs

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 was used in the Exposure Notifications Private Analytics system. This is referred to in various places as Prio v2. See prio-server or the ENPA whitepaper for more details.

Verifiable Distributed Aggregation Function

This crate 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 versionGit branchVDAF draft versionDAP draft versionConforms to specification?Status
0.8release/0.8draft-irtf-cfrg-vdaf-01draft-ietf-ppm-dap-01YesUnmaintained as of March 28, 2023
0.9release/0.9draft-irtf-cfrg-vdaf-03draft-ietf-ppm-dap-02 and draft-ietf-ppm-dap-03YesUnmaintained as of September 22, 2022
0.10release/0.10draft-irtf-cfrg-vdaf-03draft-ietf-ppm-dap-02 and draft-ietf-ppm-dap-03YesUnmaintained as of November 14, 2023
0.11release/0.11draft-irtf-cfrg-vdaf-04N/AYesUnmaintained
0.12release/0.12draft-irtf-cfrg-vdaf-05draft-ietf-ppm-dap-04YesUnmaintained as of June 24, 2024
0.13release/0.13draft-irtf-cfrg-vdaf-06draft-ietf-ppm-dap-05YesUnmaintained
0.14release/0.14draft-irtf-cfrg-vdaf-06draft-ietf-ppm-dap-05YesUnmaintained
0.15release/0.15draft-irtf-cfrg-vdaf-07draft-ietf-ppm-dap-07YesUnmaintained as of June 24, 2024
0.16maindraft-irtf-cfrg-vdaf-08draft-ietf-ppm-dap-09YesSupported

Cargo Features

This crate defines the following feature flags:

NameDefault feature?DescriptionSemver stable?
crypto-dependenciesYesEnables dependencies on various RustCrypto crates, and uses them to implement XofTurboShake128 to support VDAFs.
experimentalNoCertain experimental APIs are guarded by this feature.
multithreadedNoEnables certain Prio3 VDAF implementations that use rayon for parallelization of gadget evaluations.
test-utilNoEnables test utilities for VDAF users and VDAF implementers.
wasm-compatNoEnables the getrandom/js feature. This is necessary for wasm32-unknown-unknown targets, when in a JavaScript environment.

Features that are not marked as "Semver stable" may undergo breaking changes in future patch releases, as an exception to semantic versioning.