MCPcopy Index your code
hub / github.com/divviup/libprio-rs

github.com/divviup/libprio-rs @0.18.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.18.0 ↗ · + Follow
1,032 symbols 3,087 edges 41 files 241 documented · 23% updated 5d agov0.18.1-alpha.3 · 2026-03-16★ 12218 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Prior versions of this crate were 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 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 sometimes 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 Unmaintained as of November 14, 2023
0.11 release/0.11 draft-irtf-cfrg-vdaf-04 N/A Yes Unmaintained
0.12 release/0.12 draft-irtf-cfrg-vdaf-05 draft-ietf-ppm-dap-04 Yes Unmaintained as of June 24, 2024
0.13 release/0.13 draft-irtf-cfrg-vdaf-06 draft-ietf-ppm-dap-05 Yes Unmaintained
0.14 release/0.14 draft-irtf-cfrg-vdaf-06 draft-ietf-ppm-dap-05 Yes Unmaintained
0.15 release/0.15 draft-irtf-cfrg-vdaf-07 draft-ietf-ppm-dap-07 Yes Unmaintained as of June 24, 2024
0.16 release/0.16 draft-irtf-cfrg-vdaf-08 draft-ietf-ppm-dap-09 Yes Supported
0.17 release/0.17 draft-irtf-cfrg-vdaf-13 draft-ietf-ppm-dap-13 Yes Supported
0.18 main draft-irtf-cfrg-vdaf-15 (forthcoming) draft-ietf-ppm-dap-16 (forthcoming) No Supported

Cargo Features

This crate defines the following feature flags:

Name Default feature? Description Semver stable?
crypto-dependencies Yes Enables dependencies on various RustCrypto crates, and uses them to implement XofTurboShake128 to support VDAFs.
experimental No Certain experimental APIs are guarded by this feature.
multithreaded No Enables certain Prio3 VDAF implementations that use rayon for parallelization of gadget evaluations.
test-util No Enables test utilities for VDAF users and VDAF implementers.
wasm-compat No Enables 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.

Extension points exported contracts — how you extend this code

Decode (Interface)
Describes how to decode an object from a byte sequence. [20 implementers]
src/codec.rs
Flp (Interface)
The FLP proof system. Implementors specify the validity circuit. [9 implementers]
src/flp.rs
Client (Interface)
The Client's role in the execution of a VDAF. [5 implementers]
src/vdaf.rs
IdpfValue (Interface)
Trait for values to be programmed into an IDPF. Values must form an Abelian group, so that they can be secret-shared, a [5 …
src/idpf.rs
Integer (Interface)
An integer type that accompanies a finite field. Integers and field elements may be converted back and forth via the nat [4 …
src/field.rs
Xof (Interface)
An extendable output function (XOF) with the interface specified in [[draft-irtf-cfrg-vdaf-08]]. [draft-irtf-cfrg-vdaf- [3 …
src/vdaf/xof.rs
Word (Interface)
`Word` is the datatype used for storing and operating with field elements. The types `u32`, `u64`, and `u128` implement [3 …
src/fp/ops.rs
CompatibleFloat (Interface)
Assign a `Float` type to this type and describe how to represent this type as an integer of the given field, and how to [3 …
src/flp/types/fixedpoint_l2/compatible_float.rs

Core symbols most depended-on inside this repo

len
called by 218
src/idpf.rs
iter
called by 202
src/idpf.rs
clone
called by 64
src/vdaf/poplar1.rs
as_ref
called by 58
src/vdaf/xof.rs
clone
called by 56
src/flp/types.rs
get_encoded
called by 52
src/codec.rs
fill
called by 45
src/vdaf/xof.rs
shard
called by 42
src/vdaf/prio3.rs

Shape

Method 448
Function 398
Class 120
Interface 38
Enum 28

Languages

Rust100%

Modules by API surface

src/vdaf/poplar1.rs78 symbols
src/idpf.rs78 symbols
src/vdaf/prio3.rs77 symbols
src/vdaf/mastic.rs57 symbols
src/vidpf.rs56 symbols
src/codec.rs51 symbols
src/flp.rs45 symbols
src/vdaf/xof.rs42 symbols
src/field.rs42 symbols
src/flp/types.rs39 symbols
src/vdaf/mastic/szk.rs37 symbols
src/vdaf/dummy.rs36 symbols

For agents

$ claude mcp add libprio-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact