Debian Codegraph @

third_party/rust/prio/README.md

raw
1 # libprio-rs
2 [![Latest Version]][crates.io] [![Docs badge]][docs.rs]
3
4 [Latest Version]: https://img.shields.io/crates/v/prio.svg
5 [crates.io]: https://crates.io/crates/prio
6 [Docs badge]: https://img.shields.io/badge/docs.rs-rustdoc-green
7 [docs.rs]: https://docs.rs/prio/
8
9 Pure Rust implementation of [Prio](https://crypto.stanford.edu/prio/), a system for Private, Robust,
10 and Scalable Computation of Aggregate Statistics.
11
12 ## Exposure Notifications Private Analytics
13
14 This crate was used in the [Exposure Notifications Private Analytics][enpa]
15 system. This is referred to in various places as Prio v2. See
16 [`prio-server`][prio-server] or the [ENPA whitepaper][enpa-whitepaper] for more
17 details.
18
19 ## Verifiable Distributed Aggregation Function
20
21 This crate also implements a [Verifiable Distributed Aggregation Function
22 (VDAF)][vdaf] called "Prio3", implemented in the `vdaf` module, allowing Prio to
23 be used in the [Distributed Aggregation Protocol][dap] protocol being developed
24 in the PPM working group at the IETF. This support is still evolving along with
25 the DAP and VDAF specifications.
26
27 ### Draft versions and release branches
28
29 The `main` branch is under continuous development and will usually be partway between VDAF drafts.
30 libprio uses stable release branches to maintain implementations of different VDAF draft versions.
31 Crate `prio` version `x.y.z` is released from a corresponding `release/x.y` branch. We try to
32 maintain [Rust SemVer][semver] compatibility, meaning that API breaks only happen on minor version
33 increases (e.g., 0.10 to 0.11).
34
35 | Crate version | Git branch | VDAF draft version | DAP draft version | Conforms to specification? | Status |
36 | ----- | ---------- | ------------- | ------------- | --------------------- | ------ |
37 | 0.8 | `release/0.8` | [`draft-irtf-cfrg-vdaf-01`][vdaf-01] | [`draft-ietf-ppm-dap-01`][dap-01] | Yes | Unmaintained as of March 28, 2023 |
38 | 0.9 | `release/0.9` | [`draft-irtf-cfrg-vdaf-03`][vdaf-03] | [`draft-ietf-ppm-dap-02`][dap-02] and [`draft-ietf-ppm-dap-03`][dap-03] | Yes | Unmaintained as of September 22, 2022 |
39 | 0.10 | `release/0.10` | [`draft-irtf-cfrg-vdaf-03`][vdaf-03] | [`draft-ietf-ppm-dap-02`][dap-02] and [`draft-ietf-ppm-dap-03`][dap-03] | Yes | Unmaintained as of November 14, 2023 |
40 | 0.11 | `release/0.11` | [`draft-irtf-cfrg-vdaf-04`][vdaf-04] | N/A | Yes | Unmaintained |
41 | 0.12 | `release/0.12` | [`draft-irtf-cfrg-vdaf-05`][vdaf-05] | [`draft-ietf-ppm-dap-04`][dap-04] | Yes | Supported |
42 | 0.13 | `release/0.13` | [`draft-irtf-cfrg-vdaf-06`][vdaf-06] | [`draft-ietf-ppm-dap-05`][dap-05] | Yes | Unmaintained |
43 | 0.14 | `release/0.14` | [`draft-irtf-cfrg-vdaf-06`][vdaf-06] | [`draft-ietf-ppm-dap-05`][dap-05] | Yes | Unmaintained |
44 | 0.15 | `release/0.15` | [`draft-irtf-cfrg-vdaf-07`][vdaf-07] | [`draft-ietf-ppm-dap-07`][dap-07] | Yes | Supported |
45 | 0.16 | `main` | [`draft-irtf-cfrg-vdaf-08`][vdaf-08] | [`draft-ietf-ppm-dap-09`][dap-09] | Yes | Supported |
46
47 [vdaf-01]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/01/
48 [vdaf-03]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/03/
49 [vdaf-04]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/04/
50 [vdaf-05]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/05/
51 [vdaf-06]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/06/
52 [vdaf-07]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/07/
53 [vdaf-08]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/08/
54 [dap-01]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/01/
55 [dap-02]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/02/
56 [dap-03]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/03/
57 [dap-04]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/04/
58 [dap-05]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/05/
59 [dap-07]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/07/
60 [dap-09]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/09/
61 [enpa]: https://www.abetterinternet.org/post/prio-services-for-covid-en/
62 [enpa-whitepaper]: https://covid19-static.cdn-apple.com/applications/covid19/current/static/contact-tracing/pdf/ENPA_White_Paper.pdf
63 [prio-server]: https://github.com/divviup/prio-server
64 [vdaf]: https://datatracker.ietf.org/doc/draft-irtf-cfrg-vdaf/
65 [dap]: https://datatracker.ietf.org/doc/draft-ietf-ppm-dap/
66 [semver]: https://doc.rust-lang.org/cargo/reference/semver.html
67
68 ## Cargo Features
69
70 This crate defines the following feature flags:
71
72 |Name|Default feature?|Description|Semver stable?|
73 |---|---|---|---|
74 |`crypto-dependencies`|Yes|Enables dependencies on various RustCrypto crates, and uses them to implement `XofTurboShake128` to support VDAFs.|✅|
75 |`experimental`|No|Certain experimental APIs are guarded by this feature.|❌|
76 |`multithreaded`|No|Enables certain Prio3 VDAF implementations that use `rayon` for parallelization of gadget evaluations.|✅|
77 |`test-util`|No|Enables test utilities for VDAF users and VDAF implementers.|❌|
78
79 Features that are not marked as "Semver stable" may undergo breaking changes in future patch releases, as an exception to semantic versioning.