Internet-Draft | VDAF | June 2023 |
Barnes, et al. | Expires 18 December 2023 | [Page] |
This document describes Verifiable Distributed Aggregation Functions (VDAFs), a family of multi-party protocols for computing aggregate statistics over user measurements. These protocols are designed to ensure that, as long as at least one aggregation server executes the protocol honestly, individual measurements are never seen by any server in the clear. At the same time, VDAFs allow the servers to detect if a malicious or misconfigured client submitted an input that would result in an incorrect aggregate result.¶
This note is to be removed before publishing as an RFC.¶
Discussion of this document takes place on the Crypto Forum Research Group mailing list (cfrg@ietf.org), which is archived at https://mailarchive.ietf.org/arch/search/?email_list=cfrg.¶
Source for this draft and an issue tracker can be found at https://github.com/cjpatton/vdaf.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 18 December 2023.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The ubiquity of the Internet makes it an ideal platform for measurement of large-scale phenomena, whether public health trends or the behavior of computer systems at scale. There is substantial overlap, however, between information that is valuable to measure and information that users consider private.¶
For example, consider an application that provides health information to users. The operator of an application might want to know which parts of their application are used most often, as a way to guide future development of the application. Specific users' patterns of usage, though, could reveal sensitive things about them, such as which users are researching a given health condition.¶
In many situations, the measurement collector is only interested in aggregate statistics, e.g., which portions of an application are most used or what fraction of people have experienced a given disease. Thus systems that provide aggregate statistics while protecting individual measurements can deliver the value of the measurements while protecting users' privacy.¶
Most prior approaches to this problem fall under the rubric of "differential privacy (DP)" [Dwo06]. Roughly speaking, a data aggregation system that is differentially private ensures that the degree to which any individual measurement influences the value of the aggregate result can be precisely controlled. For example, in systems like RAPPOR [EPK14], each user samples noise from a well-known distribution and adds it to their input before submitting to the aggregation server. The aggregation server then adds up the noisy inputs, and because it knows the distribution from whence the noise was sampled, it can estimate the true sum with reasonable precision.¶
Differentially private systems like RAPPOR are easy to deploy and provide a useful guarantee. On its own, however, DP falls short of the strongest privacy property one could hope for. Specifically, depending on the "amount" of noise a client adds to its input, it may be possible for a curious aggregator to make a reasonable guess of the input's true value. Indeed, the more noise the clients add, the less reliable will be the server's estimate of the output. Thus systems employing DP techniques alone must strike a delicate balance between privacy and utility.¶
The ideal goal for a privacy-preserving measurement system is that of secure multi-party computation (MPC): No participant in the protocol should learn anything about an individual input beyond what it can deduce from the aggregate. In this document, we describe Verifiable Distributed Aggregation Functions (VDAFs) as a general class of protocols that achieve this goal.¶
VDAF schemes achieve their privacy goal by distributing the computation of the aggregate among a number of non-colluding aggregation servers. As long as a subset of the servers executes the protocol honestly, VDAFs guarantee that no input is ever accessible to any party besides the client that submitted it. At the same time, VDAFs are "verifiable" in the sense that malformed inputs that would otherwise garble the output of the computation can be detected and removed from the set of input measurements. We refer to this property as "robustness".¶
In addition to these MPC-style security goals of privacy and robustness, VDAFs can be composed with various mechanisms for differential privacy, thereby providing the added assurance that the aggregate result itself does not leak too much information about any one measurement.¶
TODO(issue #94) Provide guidance for local and central DP and point to it here.¶
The cost of achieving these security properties is the need for multiple servers to participate in the protocol, and the need to ensure they do not collude to undermine the VDAF's privacy guarantees. Recent implementation experience has shown that practical challenges of coordinating multiple servers can be overcome. The Prio system [CGB17] (essentially a VDAF) has been deployed in systems supporting hundreds of millions of users: The Mozilla Origin Telemetry project [OriginTelemetry] and the Exposure Notification Private Analytics collaboration among the Internet Security Research Group (ISRG), Google, Apple, and others [ENPA].¶
The VDAF abstraction laid out in Section 5 represents a class of multi-party protocols for privacy-preserving measurement proposed in the literature. These protocols vary in their operational and security requirements, sometimes in subtle but consequential ways. This document therefore has two important goals:¶
Providing higher-level protocols like [DAP] with a simple, uniform interface for accessing privacy-preserving measurement schemes, documenting relevant operational and security requirements, and specifying constraints for safe usage:¶
This document also specifies two concrete VDAF schemes, each based on a protocol from the literature.¶
The aforementioned Prio system [CGB17] allows for the privacy-preserving computation of a variety aggregate statistics. The basic idea underlying Prio is fairly simple:¶
The difficult part of this system is ensuring that the servers hold shares of a valid input, e.g., the input is an integer in a specific range. Thus Prio specifies a multi-party protocol for accomplishing this task.¶
In Section 7 we describe Prio3, a VDAF that follows the same overall framework as the original Prio protocol, but incorporates techniques introduced in [BBCGGI19] that result in significant performance gains.¶
More recently, Boneh et al. [BBCGGI21] described a protocol called Poplar
for solving the t
-heavy-hitters problem in a privacy-preserving manner. Here
each client holds a bit-string of length n
, and the goal of the aggregation
servers is to compute the set of inputs that occur at least t
times. The
core primitive used in their protocol is a specialized Distributed Point
Function (DPF) [GI14] that allows the servers to "query" their DPF shares on
any bit-string of length shorter than or equal to n
. As a result of this
query, each of the servers has an additive share of a bit indicating whether
the string is a prefix of the client's input. The protocol also specifies a
multi-party computation for verifying that at most one string among a set of
candidates is a prefix of the client's input.¶
In Section 8 we describe a VDAF called Poplar1 that implements this functionality.¶
Finally, perhaps the most complex aspect of schemes like Prio3 and Poplar1 is the process by which the client-generated measurements are prepared for aggregation. Because these constructions are based on secret sharing, the servers will be required to exchange some amount of information in order to verify the measurement is valid and can be aggregated. Depending on the construction, this process may require multiple round trips over the network.¶
There are applications in which this verification step may not be necessary, e.g., when the client's software is run a trusted execution environment. To support these applications, this document also defines Distributed Aggregation Functions (DAFs) as a simpler class of protocols that aim to provide the same privacy guarantee as VDAFs but fall short of being verifiable.¶
OPEN ISSUE Decide if we should give one or two example DAFs. There are natural variants of Prio3 and Poplar1 that might be worth describing.¶
The remainder of this document is organized as follows: Section 3 gives a brief overview of DAFs and VDAFs; Section 4 defines the syntax for DAFs; Section 5 defines the syntax for VDAFs; Section 6 defines various functionalities that are common to our constructions; Section 7 describes the Prio3 construction; Section 8 describes the Poplar1 construction; and Section 9 enumerates the security considerations for VDAFs.¶
(*) Indicates a change that breaks wire compatibility with the previous draft.¶
06:¶
RAND_SIZE
that specifies the number of
random bytes consumed by the randomized algorithm (shard()
for Daf and Vdaf
and gen()
for Idpf).¶
05:¶
prep_next()
to
prep_shares_to_prep()
.¶
04:¶
03:¶
02:¶
01:¶
prep_next()
to
prep_shares_to_prep()
. (*)¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Algorithms in this document are written in Python 3. Type hints are used to define input and output types. A fatal error in a program (e.g., failure to parse one of the function parameters) is usually handled by raising an exception.¶
A variable with type Bytes
is a byte string. This document defines several
byte-string constants. When comprised of printable ASCII characters, they are
written as Python 3 byte-string literals (e.g., b'some constant string'
).¶
A global constant VERSION
of type Unsigned
is defined, which algorithms are
free to use as desired. Its value SHALL be 6
.¶
This document describes algorithms for multi-party computations in which the parties typically communicate over a network. Wherever a quantity is defined that must be be transmitted from one party to another, this document prescribes a particular encoding of that quantity as a byte string.¶
OPEN ISSUE It might be better to not be prescriptive about how quantities are encoded on the wire. See issue #58.¶
Some common functionalities:¶
zeros(len: Unsigned) -> Bytes
returns an array of zero bytes. The length of
output
MUST be len
.¶
gen_rand(len: Unsigned) -> Bytes
returns an array of random bytes. The
length of output
MUST be len
.¶
byte(int: Unsigned) -> Bytes
returns the representation of int
as a byte
string. The value of int
MUST be in [0,256)
.¶
concat(parts: Vec[Bytes]) -> Bytes
returns the concatenation of the input
byte strings, i.e., parts[0] || ... || parts[len(parts)-1]
.¶
front(length: Unsigned, vec: Vec[Any]) -> (Vec[Any], Vec[Any])
splits vec
into two vectors, where the first vector is made up of the first length
elements of the input. I.e., (vec[:length], vec[length:])
.¶
xor(left: Bytes, right: Bytes) -> Bytes
returns the bitwise XOR of left
and right
. An exception is raised if the inputs are not the same length.¶
to_be_bytes(val: Unsigned, length: Unsigned) -> Bytes
converts val
to
big-endian bytes; its value MUST be in range [0, 2^(8*length))
. Function
from_be_bytes(encoded: Bytes) -> Unsigned
computes the inverse.¶
to_le_bytes(val: Unsigned, length: Unsigned) -> Bytes
converts val
to
little-endian bytes; its value MUST be in range [0, 2^(8*length))
. Function
from_le_bytes(encoded: Bytes) -> Unsigned
computes the inverse.¶
next_power_of_2(n: Unsigned) -> Unsigned
returns the smallest integer
greater than or equal to n
that is also a power of two.¶
additive_secret_share(vec: Vec[Field], num_shares: Unsigned, field: type)
-> Vec[Vec[Field]]
takes a vector of field elements and returns multiple
vectors of the same length, such that they all add up to the input vector,
and each proper subset of the vectors are indistinguishable from random.¶
In a DAF- or VDAF-based private measurement system, we distinguish three types of actors: Clients, Aggregators, and Collectors. The overall flow of the measurement process is as follows:¶
The Aggregators convert their input shares into "output shares".¶
Aggregators are a new class of actor relative to traditional measurement systems where Clients submit measurements to a single server. They are critical for both the privacy properties of the system and, in the case of VDAFs, the correctness of the measurements obtained. The privacy properties of the system are assured by non-collusion among Aggregators, and Aggregators are the entities that perform validation of Client measurements. Thus Clients trust Aggregators not to collude (typically it is required that at least one Aggregator is honest), and Collectors trust Aggregators to correctly run the protocol.¶
Within the bounds of the non-collusion requirements of a given (V)DAF instance, it is possible for the same entity to play more than one role. For example, the Collector could also act as an Aggregator, effectively using the other Aggregator(s) to augment a basic client-server protocol.¶
In this document, we describe the computations performed by the actors in this system. It is up to the higher-level protocol making use of the (V)DAF to arrange for the required information to be delivered to the proper actors in the proper sequence. In general, we assume that all communications are confidential and mutually authenticated, with the exception that Clients submitting measurements may be anonymous.¶
By way of a gentle introduction to VDAFs, this section describes a simpler class of schemes called Distributed Aggregation Functions (DAFs). Unlike VDAFs, DAFs do not provide verifiability of the computation. Clients must therefore be trusted to compute their input shares correctly. Because of this fact, the use of a DAF is NOT RECOMMENDED for most applications. See Section 9 for additional discussion.¶
A DAF scheme is used to compute a particular "aggregation function" over a set of measurements generated by Clients. Depending on the aggregation function, the Collector might select an "aggregation parameter" and disseminates it to the Aggregators. The semantics of this parameter is specific to the aggregation function, but in general it is used to represent the set of "queries" that can be made on the measurement set. For example, the aggregation parameter is used to represent the candidate prefixes in Poplar1 Section 8.¶
Execution of a DAF has four distinct stages:¶
Sharding and Preparation are done once per measurement. Aggregation and Unsharding are done over a batch of measurements (more precisely, over the recovered output shares).¶
A concrete DAF specifies an algorithm for the computation needed in each of these stages. The interface of each algorithm is defined in the remainder of this section. In addition, a concrete DAF defines the associated constants and types enumerated in the following table.¶
Parameter | Description |
---|---|
ID
|
Algorithm identifier for this DAF. A 32-bit, unsigned integer. |
SHARES
|
Number of input shares into which each measurement is sharded. |
RAND_SIZE
|
Size of the random byte string passed to sharding algorithm. |
Measurement
|
Type of each measurement. |
AggParam
|
Type of aggregation parameter. |
OutShare
|
Type of each output share. |
AggResult
|
Type of the aggregate result. |
These types define some of the inputs and outputs of DAF methods at various
stages of the computation. Observe that only the measurements, output shares,
the aggregate result, and the aggregation parameter have an explicit type. All
other values --- in particular, the input shares and the aggregate shares ---
have type Bytes
and are treated as opaque byte strings. This is because these
values must be transmitted between parties over a network.¶
OPEN ISSUE It might be cleaner to define a type for each value, then have that type implement an encoding where necessary. This way each method parameter has a meaningful type hint. See issue#58.¶
Each DAF is identified by a unique, 32-bit integer ID
. Identifiers for each
(V)DAF specified in this document are defined in Table 16.¶
In order to protect the privacy of its measurements, a DAF Client shards its
measurements into a sequence of input shares. The measurement_to_input_shares
method is used for this purpose.¶
Daf.measurement_to_input_shares(input: Measurement, rand:
Bytes[Daf.RAND_SIZE]) -> tuple[Bytes, Vec[Bytes]]
is the randomized sharding
algorithm run by each Client. The input rand
consists of the random bytes
consumed by the algorithm. This value MUST be generated using a
cryptographically secure pseudorandom number generator (CSPRNG). It consumes
the measurement and produces a "public share", distributed to each of the
Aggregators, and a corresponding sequence of input shares, one for each
Aggregator. The length of the output vector MUST be SHARES
.¶
Once an Aggregator has received the public share and one of the input shares, the next step is to prepare the input share for aggregation. This is accomplished using the following algorithm:¶
Daf.prep(agg_id: Unsigned, agg_param: AggParam, public_share: Bytes,
input_share: Bytes) -> OutShare
is the deterministic preparation algorithm.
It takes as input the public share and one of the input shares generated by a
Client, the Aggregator's unique identifier, and the aggregation parameter
selected by the Collector and returns an output share.¶
The protocol in which the DAF is used MUST ensure that the Aggregator's
identifier is equal to the integer in range [0, SHARES)
that matches the index
of input_share
in the sequence of input shares output by the Client.¶
Concrete DAFs implementations MAY impose certain restrictions for input shares
and aggregation parameters. Protocols using a DAF MUST ensure that for each
input share and aggregation parameter agg_param
, Daf.prep
is only called if
Daf.is_valid(agg_param, previous_agg_params)
returns True, where
previous_agg_params
contains all aggregation parameters that have previously
been used with the same input share.¶
DAFs MUST implement the following function:¶
Daf.is_valid(agg_param: AggParam, previous_agg_params: set[AggParam]) ->
Bool
: Checks if the agg_param
is compatible with all elements of
previous_agg_params
.¶
Once an Aggregator holds output shares for a batch of measurements (where batches are defined by the application), it combines them into a share of the desired aggregate result:¶
Daf.out_shares_to_agg_share(agg_param: AggParam, out_shares: Vec[OutShare])
-> agg_share: Bytes
is the deterministic aggregation algorithm. It is run by
each Aggregator a set of recovered output shares.¶
For simplicity, we have written this algorithm in a "one-shot" form, where all output shares for a batch are provided at the same time. Many DAFs may also support a "streaming" form, where shares are processed one at a time.¶
Implementation note: For most natural DAFs (and VDAFs) it is not necessary for an Aggregator to store all output shares individually before aggregating. Typically it is possible to merge output shares into aggregate shares as they arrive, merge these into other aggregate shares, and so on. In particular, this is the case when the output shares are vectors over some finite field and aggregating them involves merely adding up the vectors element-wise. Such is the case for Prio3 Section 7 and Poplar1 Section 8.¶
After the Aggregators have aggregated a sufficient number of output shares, each sends its aggregate share to the Collector, who runs the following algorithm to recover the following output:¶
Daf.agg_shares_to_result(agg_param: AggParam,
agg_shares: Vec[Bytes], num_measurements: Unsigned) -> AggResult
is
run by the Collector in order to compute the aggregate result from
the Aggregators' shares. The length of agg_shares
MUST be SHARES
.
num_measurements
is the number of measurements that contributed to
each of the aggregate shares. This algorithm is deterministic.¶
QUESTION Maybe the aggregation algorithms should be randomized in order to allow the Aggregators (or the Collector) to add noise for differential privacy. (See the security considerations of [DAP].) Or is this out-of-scope of this document? See https://github.com/ietf-wg-ppm/ppm-specification/issues/19.¶
Securely executing a DAF involves emulating the following procedure.¶
The inputs to this procedure are the same as the aggregation function computed by the DAF: An aggregation parameter and a sequence of measurements. The procedure prescribes how a DAF is executed in a "benign" environment in which there is no adversary and the messages are passed among the protocol participants over secure point-to-point channels. In reality, these channels need to be instantiated by some "wrapper protocol", such as [DAP], that realizes these channels using suitable cryptographic mechanisms. Moreover, some fraction of the Aggregators (or Clients) may be malicious and diverge from their prescribed behaviors. Section 9 describes the execution of the DAF in various adversarial environments and what properties the wrapper protocol needs to provide in each.¶
Like DAFs described in the previous section, a VDAF scheme is used to compute a particular aggregation function over a set of Client-generated measurements. Evaluation of a VDAF involves the same four stages as for DAFs: Sharding, Preparation, Aggregation, and Unsharding. However, the Preparation stage will require interaction among the Aggregators in order to facilitate verifiability of the computation's correctness. Accommodating this interaction will require syntactic changes.¶
Overall execution of a VDAF comprises the following stages:¶
In contrast to DAFs, the Preparation stage for VDAFs now performs an additional task: Verification of the validity of the recovered output shares. This process ensures that aggregating the output shares will not lead to a garbled aggregate result.¶
The remainder of this section defines the VDAF interface. The attributes are listed in Table 2 are defined by each concrete VDAF.¶
Parameter | Description |
---|---|
ID
|
Algorithm identifier for this VDAF |
VERIFY_KEY_SIZE
|
Size (in bytes) of the verification key (Section 5.2) |
RAND_SIZE
|
Size of the random byte string passed to sharding algorithm |
NONCE_SIZE
|
Size (in bytes) of the nonce |
ROUNDS
|
Number of rounds of communication during the Preparation stage (Section 5.2) |
SHARES
|
Number of input shares into which each measurement is sharded (Section 5.1) |
Measurement
|
Type of each measurement |
AggParam
|
Type of aggregation parameter |
Prep
|
State of each Aggregator during Preparation (Section 5.2) |
OutShare
|
Type of each output share |
AggResult
|
Type of the aggregate result |
Similarly to DAFs (see {[sec-daf}}), any output of a VDAF method that must be transmitted from one party to another is treated as an opaque byte string. All other quantities are given a concrete type.¶
OPEN ISSUE It might be cleaner to define a type for each value, then have that type implement an encoding where necessary. See issue#58.¶
Each VDAF is identified by a unique, 32-bit integer ID
. Identifiers for each
(V)DAF specified in this document are defined in Table 16. The following
method is defined for every VDAF:¶
def domain_separation_tag(Vdaf, usage: Unsigned) -> Bytes: """ Format domain separation tag for this VDAF with the given usage. """ return format_dst(0, Vdaf.ID, usage)¶
It is used to construct a domain separation tag for an instance of Prg
used by
the VDAF. (See Section 6.2.)¶
Sharding transforms a measurement into input shares as it does in DAFs (cf. Section 4.1); in addition, it takes a nonce as input and produces a public share:¶
Vdaf.measurement_to_input_shares(measurement: Measurement, nonce:
Bytes[Vdaf.NONCE_SIZE], rand: Bytes[Vdaf.RAND_SIZE]) -> tuple[Bytes,
Vec[Bytes]]
is the randomized sharding algorithm run by each Client. Input
rand
consists of the random bytes consumed by the algorithm. It consumes
the measurement and the nonce and produces a public share, distributed to each
of Aggregators, and the corresponding sequence of input shares, one for each
Aggregator. Depending on the VDAF, the input shares may encode additional
information used to verify the recovered output shares (e.g., the "proof
shares" in Prio3 Section 7). The length of the output vector MUST be SHARES
.¶
In order to ensure privacy of the measurement, the Client MUST generate the random bytes and nonce using a CSPRNG. (See Section 9 for details.)¶
To recover and verify output shares, the Aggregators interact with one another
over ROUNDS
rounds. Prior to each round, each Aggregator constructs an
outbound message. Next, the sequence of outbound messages is combined into a
single message, called a "preparation message". (Each of the outbound messages
are called "preparation-message shares".) Finally, the preparation message is
distributed to the Aggregators to begin the next round.¶
An Aggregator begins the first round with its input share and it begins each subsequent round with the previous preparation message. Its output in the last round is its output share and its output in each of the preceding rounds is a preparation-message share.¶
This process involves a value called the "aggregation parameter" used to map the input shares to output shares. The Aggregators need to agree on this parameter before they can begin preparing inputs for aggregation.¶
To facilitate the preparation process, a concrete VDAF implements the following class methods:¶
Vdaf.prep_init(verify_key: Bytes[Vdaf.VERIFY_KEY_SIZE], agg_id: Unsigned,
agg_param: AggParam, nonce: Bytes[Vdaf.NONCE_SIZE], public_share: Bytes,
input_share: Bytes) -> Prep
is the deterministic preparation-state
initialization algorithm run by each Aggregator to begin processing its input
share into an output share. Its inputs are the shared verification key
(verify_key
), the Aggregator's unique identifier (agg_id
), the aggregation
parameter (agg_param
), the nonce provided by the environment (nonce
, see
Figure 7), the public share (public_share
), and one of the input
shares generated by the Client (input_share
). Its output is the Aggregator's
initial preparation state.¶
It is up to the high level protocol in which the VDAF is used to arrange for the distribution of the verification key prior to generating and processing reports. (See Section 9 for details.)¶
Protocols using the VDAF MUST ensure that the Aggregator's identifier is equal
to the integer in range [0, SHARES)
that matches the index of input_share
in the sequence of input shares output by the Client.¶
Protocols MUST ensure that public share consumed by each of the Aggregators is identical. This is security critical for VDAFs such as Poplar1.¶
Vdaf.prep_next(prep: Prep, inbound: Optional[Bytes]) -> Union[Tuple[Prep,
Bytes], OutShare]
is the deterministic preparation-state update algorithm run
by each Aggregator. It updates the Aggregator's preparation state (prep
) and
returns either its next preparation state and its message share for the
current round or, if this is the last round, its output share. An exception is
raised if a valid output share could not be recovered. The input of this
algorithm is the inbound preparation message or, if this is the first round,
None
.¶
Vdaf.prep_shares_to_prep(agg_param: AggParam, prep_shares: Vec[Bytes]) ->
Bytes
is the deterministic preparation-message pre-processing algorithm. It
combines the preparation-message shares generated by the Aggregators in the
previous round into the preparation message consumed by each in the next
round.¶
In effect, each Aggregator moves through a linear state machine with ROUNDS+1
states. The Aggregator enters the first state on using the initialization
algorithm, and the update algorithm advances the Aggregator to the next state.
Thus, in addition to defining the number of rounds (ROUNDS
), a VDAF instance
defines the state of the Aggregator after each round.¶
TODO Consider how to bake this "linear state machine" condition into the syntax. Given that Python 3 is used as our pseudocode, it's easier to specify the preparation state using a class.¶
The preparation-state update accomplishes two tasks: recovery of output shares from the input shares and ensuring that the recovered output shares are valid. The abstraction boundary is drawn so that an Aggregator only recovers an output share if it is deemed valid (at least, based on the Aggregator's view of the protocol). Another way to draw this boundary would be to have the Aggregators recover output shares first, then verify that they are valid. However, this would allow the possibility of misusing the API by, say, aggregating an invalid output share. Moreover, in protocols like Prio+ [AGJOP21] based on oblivious transfer, it is necessary for the Aggregators to interact in order to recover aggregatable output shares at all.¶
Note that it is possible for a VDAF to specify ROUNDS == 0
, in which case each
Aggregator runs the preparation-state update algorithm once and immediately
recovers its output share without interacting with the other Aggregators.
However, most, if not all, constructions will require some amount of interaction
in order to ensure validity of the output shares (while also maintaining
privacy).¶
OPEN ISSUE accommodating 0-round VDAFs may require syntax changes if, for example, public keys are required. On the other hand, we could consider defining this class of schemes as a different primitive. See issue#77.¶
Similar to DAFs (see Section 4.3), VDAFs MAY impose
restrictions for input shares and aggregation parameters. Protocols using a VDAF
MUST ensure that for each input share and aggregation parameter agg_param
, the
preparation phase (including Vdaf.prep_init
, Vdaf.prep_next
, and
Vdaf.prep_shares_to_prep
; see Section 5.2) is only called if
Vdaf.is_valid(agg_param, previous_agg_params)
returns True, where
previous_agg_params
contains all aggregation parameters that have previously
been used with the same input share.¶
VDAFs MUST implement the following function:¶
Vdaf.is_valid(agg_param: AggParam, previous_agg_params: set[AggParam]) ->
Bool
: Checks if the agg_param
is compatible with all elements of
previous_agg_params
.¶
VDAF Aggregation is identical to DAF Aggregation (cf. Section 4.4):¶
Vdaf.out_shares_to_agg_share(agg_param: AggParam, out_shares: Vec[OutShare])
-> agg_share: Bytes
is the deterministic aggregation algorithm. It is run by
each Aggregator over the output shares it has computed over a batch of
measurement inputs.¶
The data flow for this stage is illustrated in Figure 3. Here again, we have the aggregation algorithm in a "one-shot" form, where all shares for a batch are provided at the same time. VDAFs typically also support a "streaming" form, where shares are processed one at a time.¶
VDAF Unsharding is identical to DAF Unsharding (cf. Section 4.5):¶
Vdaf.agg_shares_to_result(agg_param: AggParam,
agg_shares: Vec[Bytes], num_measurements: Unsigned) -> AggResult
is
run by the Collector in order to compute the aggregate result from
the Aggregators' shares. The length of agg_shares
MUST be SHARES
.
num_measurements
is the number of measurements that contributed to
each of the aggregate shares. This algorithm is deterministic.¶
Secure execution of a VDAF involves simulating the following procedure.¶
The inputs to this algorithm are the aggregation parameter, a list of measurements, and a nonce for each measurement. This document does not specify how the nonces are chosen, but security requires that the nonces be unique. See Section 9 for details. As explained in Section 4.6, the secure execution of a VDAF requires the application to instantiate secure channels between each of the protocol participants.¶
In each round of preparation, each Aggregator writes a prep share to the
channel, which is then processed into the prep message using the public
prep_shares_to_prep()
algorithm and broadcast to the Aggregators to start the
next round. In this section we describe some approaches to realizing this
broadcast channel functionality in protocols that use VDAFs with at least one
round of preparation.¶
The state machine of each Aggregator for VDAF preparation is shown in Figure 8.¶
State transitions are made when the state is acted upon by the host's local
inputs and/or messages sent by the peers. The initial state is Start
. The
terminal states are Rejected
, indicating that the report was rejected and
cannot be processed any further, and Finished(out_share)
, indicating that
the Aggregator has recovered an output share out_share
.¶
For VDAFs with precisely two Aggregators (i.e., Vdaf.SHARES == 2
), the
following "ping pong" communication pattern can be used. It is compatible with
any request/response transport protocol, such as HTTP.¶
The first state transition, from Start
to Continued
or Rejected
, is
induced by the following transition rule. No messages are sent or received
during this transition.¶
def ping_pong_start(Vdaf, vdaf_verify_key: bytes[Vdaf.VERIFY_KEY_SIZE], is_leader: bool, agg_param: Vdaf.AggParam, nonce: bytes[Vdaf.NONCE_SIZE], public_share: bytes, host_input_share: bytes) -> State: try: prep_state = Vdaf.prep_init( vdaf_verify_key, 0 if is_leader else 1, agg_param, nonce, public_share, host_input_share, ) return Continue(prep_state) except: return Rejected()¶
If the state is Rejected
, then processing halts. Otherwise, if the state is
Continued
, then processing continues using the following transition rule until
a terminal state is reached.¶
Let us call the initiating party the "Leader" and the responding party the "Helper". The high-level idea is that the Leader and Helper will take turns running the computation locally until input from their peer is required:¶
The Aggregators proceed in this ping-ponging fashion until a step of the
computation fails, indicating the report is invalid and should be rejected, or
preparation is completed. All told there there are ceil((Vdaf.ROUNDS+1)/2)
requests sent.¶
Each message in the ping-pong protocol is structured as follows (expressed in TLS syntax Section 3 of [RFC8446]):¶
enum { initialize(0), continue(1), finish(2), (255) } MessageType; struct { MessageType type; select (Message.type) { case initialize: opaque prep_share<0..2^32-1>; case continue: opaque prep_msg<0..2^32-1>; opaque prep_share<0..2^32-1>; case finish: opaque prep_msg<0..2^32-1>; }; } Message;¶
The Leader computes each state transition according to the following algorithm:¶
def ping_pong_req(Vdaf, agg_param: Vdaf.AggParam, state: State, inbound: Optional[Message], ) -> (State, Optional[Message]): if inbound == None: prep_msg = None peer_prep_share = None elif inbound.type == 1: # continue prep_msg = inbound.prep_msg peer_prep_share = inbound.prep_share elif inbound.type == 2: # finish prep_msg = inbound.prep_msg peer_prep_share = None else: return (Rejected(), None) return Vdaf.ping_pong_transition( agg_param, prep_msg, peer_prep_share, state.prep_state, )¶
(The auxiliary function ping_pong_transition()
is defined at the end of this
section.) The input inbound
denotes the last message received from the Helper. This
parameter is optional since initially there is no inbound message.¶
Likewise, the Helper computes each state transition according to the following algorithm:¶
def ping_pong_resp(Vdaf, agg_param: Vdaf.AggParam, state: State, inbound: Message, ) -> (State, Optional[bytes]): if inbound.type == 0: # initialize prep_msg = None peer_prep_share = inbound.prep_share elif inbound.type == 1: # continue prep_msg = inbound.prep_msg peer_prep_share = inbound.prep_share else: # finish prep_msg = inbound.prep_msg peer_prep_share = None return Vdaf.ping_pong_transition( agg_param, prep_msg, peer_prep_share, state.prep_state, )¶
At the start of each request/response cycle, the Leader runs:¶
(state, outbound) = Vdaf.ping_pong_req(agg_param, state, inbound)¶
with state == Continued(leader_prep_state)
and, if outbound != None
, sends
outbound
to the Helper. For the initial request, inbound == None
. To
respond to the Leader, the Helper runs¶
(state, outbound) = Vdaf.ping_pong_resp(agg_param, state, inbound)¶
with state == Continued(helper_prep_state)
, where inbound
is the message it
received from the Leader, and sends outbound
to the Leader.¶
If state == Finished(out_share)
at the end of a request/response cycle, then
processing is complete. Note that, depending on the number of rounds of
preparation that are required, there may be one more message to send before the
peer can also finish processing (i.e., outbound != None
).¶
The core state transition logic is the same for both Aggregators:¶
def ping_pong_transition(Vdaf, agg_param: Vdaf.AggParam, prep_msg: Optional[bytes], peer_prep_share: Optional[bytes], host_prep_state: Vdaf.Prep, ) -> (State, Optional[Message]): try: # If `prep_msg == None` then this is the start of the # first round. Otherwise, `prep_msg` is the prep message # from the end of the previous round. out = Vdaf.prep_next(host_prep_state, prep_msg) if type(out) == Vdaf.OutShare: return (Finished(out), None) (host_prep_state, host_prep_share) = out if peer_prep_share != None: prep_shares = [peer_prep_share, host_prep_share] if is_leader: prep_shares.reverse() prep_msg = Vdaf.prep_shares_to_prep( agg_param, prep_shares, ) out = Vdaf.prep_next(host_prep_state, prep_msg) if type(out) == Vdaf.OutShare: outbound = Message.finish(prep_msg) return (Finished(out), outbound) (host_prep_state, host_prep_share) = out outbound = Message.continue(prep_msg, host_prep_share) else: outbound = Message.initialize(host_prep_share) return (Continued(host_prep_state), outbound) except: return (Rejected(), None)¶
The ping-pong topology of the previous section is only suitable for VDAFs involving exactly two Aggregators. If more Aggregators are required, the star topology described in this section can be used instead.¶
TODO Describe the Leader-emulated broadcast channel architecture that was originally envisioned for DAP. (As of DAP-05 we are going with the ping pong architecture described in the previous section.)¶
This section describes the primitives that are common to the VDAFs specified in this document.¶
Both Prio3 and Poplar1 use finite fields of prime order. Finite field
elements are represented by a class Field
with the following associated
parameters:¶
MODULUS: Unsigned
is the prime modulus that defines the field.¶
ENCODED_SIZE: Unsigned
is the number of bytes used to encode a field element
as a byte string.¶
A concrete Field
also implements the following class methods:¶
Field.zeros(length: Unsigned) -> output: Vec[Field]
returns a vector of
zeros. The length of output
MUST be length
.¶
Field.rand_vec(length: Unsigned) -> output: Vec[Field]
returns a vector of
random field elements. The length of output
MUST be length
.¶
A field element is an instance of a concrete Field
. The concrete class defines
the usual arithmetic operations on field elements. In addition, it defines the
following instance method for converting a field element to an unsigned integer:¶
elem.as_unsigned() -> Unsigned
returns the integer representation of
field element elem
.¶
Likewise, each concrete Field
implements a constructor for converting an
unsigned integer into a field element:¶
Field(integer: Unsigned)
returns integer
represented as a field element.
The value of integer
MUST be less than Field.MODULUS
.¶
Finally, each concrete Field
has two derived class methods, one for encoding
a vector of field elements as a byte string and another for decoding a vector of
field elements.¶
The following auxiliary functions on vectors of field elements are used in the remainder of this document. Note that an exception is raised by each function if the operands are not the same length.¶
Some VDAFs require fields that are suitable for efficient computation of the discrete Fourier transform, as this allows for fast polynomial interpolation. (One example is Prio3 (Section 7) when instantiated with the generic FLP of Section 7.3.3.) Specifically, a field is said to be "FFT-friendly" if, in addition to satisfying the interface described in Section 6.1, it implements the following method:¶
Field.gen() -> Field
returns the generator of a large subgroup of the
multiplicative group. To be FFT-friendly, the order of this subgroup MUST be a
power of 2. In addition, the size of the subgroup dictates how large
interpolated polynomials can be. It is RECOMMENDED that a generator is chosen
with order at least 2^20
.¶
FFT-friendly fields also define the following parameter:¶
GEN_ORDER: Unsigned
is the order of a multiplicative subgroup generated by
Field.gen()
.¶
The tables below define finite fields used in the remainder of this document.¶
Parameter | Field64 | Field128 | Field255 |
---|---|---|---|
MODULUS | 2^32 * 4294967295 + 1 | 2^66 * 4611686018427387897 + 1 | 2^255 - 19 |
ENCODED_SIZE | 8 | 16 | 32 |
Generator | 7^4294967295 | 7^4611686018427387897 | n/a |
GEN_ORDER | 2^32 | 2^66 | n/a |
A pseudorandom generator (PRG) is used to expand a short, (pseudo)random seed into a long string of pseudorandom bits. A PRG suitable for this document implements the interface specified in this section.¶
PRGs are defined by a class Prg
with the following associated parameter:¶
SEED_SIZE: Unsigned
is the size (in bytes) of a seed.¶
A concrete Prg
implements the following class method:¶
Prg(seed: Bytes[Prg.SEED_SIZE], dst: Bytes, binder: Bytes)
constructs an
instance of Prg
from the given seed, domain separation tag, and binder
string. (See below for definitions of these.) The seed MUST be of length
SEED_SIZE
and MUST be generated securely (i.e., it is either the output of
gen_rand
or a previous invocation of the PRG).¶
prg.next(length: Unsigned)
returns the next length
bytes of output of PRG.
If the seed was securely generated, the output can be treated as pseudorandom.¶
Each Prg
has two derived class methods. The first is used to derive a fresh
seed from an existing one. The second is used to compute a sequence of
pseudorandom field elements. For each method, the seed MUST be of length
SEED_SIZE
and MUST be generated securely (i.e., it is either the output of
gen_rand
or a previous invocation of the PRG).¶
This section describes PrgSha3, a PRG based on the Keccak permutation of SHA-3 [FIPS202]. Keccak is used in the cSHAKE128 mode of operation [SP800-185]. This Prg is RECOMMENDED for all use cases within VDAFs.¶
While PrgSha3 as described above can be securely used in all cases where a Prg is needed in the VDAFs described in this document, there are some cases where a more efficient instantiation based on fixed-key AES is possible. For now, this is limited to the Prg used inside the Idpf Section 8.1 implementation in Poplar1 Section 8.3. It is NOT RECOMMENDED to use this Prg anywhere else. See Security Considerations Section 9 for a more detailed discussion.¶
class PrgFixedKeyAes128(Prg): """ PRG based on a circular collision-resistant hash function from fixed-key AES. """ # Associated parameters SEED_SIZE = 16 def __init__(self, seed, dst, binder): self.length_consumed = 0 # Use SHA-3 to derive a key from the binder string and domain # separation tag. Note that the AES key does not need to be # kept secret from any party. However, when used with # IdpfPoplar, we require the binder to be a random nonce. # # Implementation note: This step can be cached across PRG # evaluations with many different seeds. self.fixed_key = cSHAKE128(binder, 16, b'', dst) self.seed = seed def next(self, length: Unsigned) -> Bytes: offset = self.length_consumed % 16 new_length = self.length_consumed + length block_range = range( int(self.length_consumed / 16), int(new_length / 16) + 1) self.length_consumed = new_length hashed_blocks = [ self.hash_block(xor(self.seed, to_le_bytes(i, 16))) \ for i in block_range ] return concat(hashed_blocks)[offset:offset+length] def hash_block(self, block): """ The multi-instance tweakable circular correlation-robust hash function of [GKWWY20] (Section 4.2). The tweak here is the key that stays constant for all PRG evaluations of the same Client, but differs between Clients. Function `AES128(key, block)` is the AES-128 blockcipher. """ lo, hi = block[:8], block[8:] sigma_block = concat([hi, xor(hi, lo)]) return xor(AES128(self.fixed_key, sigma_block), sigma_block)¶
PRGs are used to map a seed to a finite domain, e.g., a fresh seed or a vector of field elements. To ensure domain separation, the derivation is needs to be bound to some distinguished domain separation tag. The domain separation tag encodes the following values:¶
VERSION
);¶
The following algorithm is used in the remainder of this document in order to format the domain separation tag:¶
def format_dst(algo_class: Unsigned, algo: Unsigned, usage: Unsigned) -> Bytes: """Format PRG domain separation tag for use within a (V)DAF.""" return concat([ to_be_bytes(VERSION, 1), to_be_bytes(algo_class, 1), to_be_bytes(algo, 4), to_be_bytes(usage, 2), ])¶
It is also sometimes necessary to bind the output to some ephemeral value that multiple parties need to agree on. We call this input the "binder string".¶
This section describes Prio3, a VDAF for Prio [CGB17]. Prio is suitable for a wide variety of aggregation functions, including (but not limited to) sum, mean, standard deviation, estimation of quantiles (e.g., median), and linear regression. In fact, the scheme described in this section is compatible with any aggregation function that has the following structure:¶
At a high level, Prio3 distributes this computation as follows. Each Client first shards its measurement by first encoding it, then splitting the vector into secret shares and sending a share to each Aggregator. Next, in the preparation phase, the Aggregators carry out a multi-party computation to determine if their shares correspond to a valid input (as determined by the arithmetic circuit). This computation involves a "proof" of validity generated by the Client. Next, each Aggregator sums up its shares locally. Finally, the Collector sums up the aggregate shares and computes the aggregate result.¶
This VDAF does not have an aggregation parameter. Instead, the output share is derived from the input share by applying a fixed map. See Section 8 for an example of a VDAF that makes meaningful use of the aggregation parameter.¶
As the name implies, Prio3 is a descendant of the original Prio construction. A second iteration was deployed in the [ENPA] system, and like the VDAF described here, the ENPA system was built from techniques introduced in [BBCGGI19] that significantly improve communication cost. That system was specialized for a particular aggregation function; the goal of Prio3 is to provide the same level of generality as the original construction.¶
The core component of Prio3 is a "Fully Linear Proof (FLP)" system. Introduced by [BBCGGI19], the FLP encapsulates the functionality required for encoding and validating inputs. Prio3 can be thought of as a transformation of a particular class of FLPs into a VDAF.¶
The remainder of this section is structured as follows. The syntax for FLPs is described in Section 7.1. The generic transformation of an FLP into Prio3 is specified in Section 7.2. Next, a concrete FLP suitable for any validity circuit is specified in Section 7.3. Finally, instantiations of Prio3 for various types of measurements are specified in Section 7.4. Test vectors can be found in Appendix "Test Vectors".¶
Conceptually, an FLP is a two-party protocol executed by a prover and a verifier. In actual use, however, the prover's computation is carried out by the Client, and the verifier's computation is distributed among the Aggregators. The Client generates a "proof" of its input's validity and distributes shares of the proof to the Aggregators. Each Aggregator then performs some a computation on its input share and proof share locally and sends the result to the other Aggregators. Combining the exchanged messages allows each Aggregator to decide if it holds a share of a valid input. (See Section 7.2 for details.)¶
As usual, we will describe the interface implemented by a concrete FLP in terms
of an abstract base class Flp
that specifies the set of methods and parameters
a concrete FLP must provide.¶
The parameters provided by a concrete FLP are listed in Table 4.¶
Parameter | Description |
---|---|
PROVE_RAND_LEN
|
Length of the prover randomness, the number of random field elements consumed by the prover when generating a proof |
QUERY_RAND_LEN
|
Length of the query randomness, the number of random field elements consumed by the verifier |
JOINT_RAND_LEN
|
Length of the joint randomness, the number of random field elements consumed by both the prover and verifier |
INPUT_LEN
|
Length of the encoded measurement (Section 7.1.1) |
OUTPUT_LEN
|
Length of the aggregatable output (Section 7.1.1) |
PROOF_LEN
|
Length of the proof |
VERIFIER_LEN
|
Length of the verifier message generated by querying the input and proof |
Measurement
|
Type of the measurement |
AggResult
|
Type of the aggregate result |
Field
|
As defined in (Section 6.1) |
An FLP specifies the following algorithms for generating and verifying proofs of validity (encoding is described below in Section 7.1.1):¶
Flp.prove(input: Vec[Field], prove_rand: Vec[Field], joint_rand: Vec[Field])
-> Vec[Field]
is the deterministic proof-generation algorithm run by the
prover. Its inputs are the encoded input, the "prover randomness"
prove_rand
, and the "joint randomness" joint_rand
. The prover randomness is
used only by the prover, but the joint randomness is shared by both the prover
and verifier.¶
Flp.query(input: Vec[Field], proof: Vec[Field], query_rand: Vec[Field],
joint_rand: Vec[Field], num_shares: Unsigned) -> Vec[Field]
is the
query-generation algorithm run by the verifier. This is used to "query" the
input and proof. The result of the query (i.e., the output of this function)
is called the "verifier message". In addition to the input and proof, this
algorithm takes as input the query randomness query_rand
and the joint
randomness joint_rand
. The former is used only by the verifier. num_shares
specifies how many input and proof shares were generated.¶
Flp.decide(verifier: Vec[Field]) -> Bool
is the deterministic decision
algorithm run by the verifier. It takes as input the verifier message and
outputs a boolean indicating if the input from which it was generated is
valid.¶
Our application requires that the FLP is "fully linear" in the sense defined in [BBCGGI19]. As a practical matter, what this property implies is that, when run on a share of the input and proof, the query-generation algorithm outputs a share of the verifier message. Furthermore, the privacy property of the FLP system ensures that the verifier message reveals nothing about the input's validity. Therefore, to decide if an input is valid, the Aggregators will run the query-generation algorithm locally, exchange verifier shares, combine them to recover the verifier message, and run the decision algorithm.¶
The query-generation algorithm includes a parameter num_shares
that specifies
the number of shares of the input and proof that were generated. If these data
are not secret shared, then num_shares == 1
. This parameter is useful for
certain FLP constructions. For example, the FLP in Section 7.3 is defined in
terms of an arithmetic circuit; when the circuit contains constants, it is
sometimes necessary to normalize those constants to ensure that the circuit's
output, when run on a valid input, is the same regardless of the number of
shares.¶
An FLP is executed by the prover and verifier as follows:¶
The proof system is constructed so that, if inp
is a valid input, then
run_flp(Flp, inp, 1)
always returns True
. On the other hand, if inp
is
invalid, then as long as joint_rand
and query_rand
are generated uniform
randomly, the output is False
with overwhelming probability.¶
We remark that [BBCGGI19] defines a much larger class of fully linear proof systems than we consider here. In particular, what is called an "FLP" here is called a 1.5-round, public-coin, interactive oracle proof system in their paper.¶
The type of measurement being aggregated is defined by the FLP. Hence, the FLP also specifies a method of encoding raw measurements as a vector of field elements:¶
Flp.encode(measurement: Measurement) -> Vec[Field]
encodes a raw measurement
as a vector of field elements. The return value MUST be of length INPUT_LEN
.¶
For some FLPs, the encoded input also includes redundant field elements that
are useful for checking the proof, but which are not needed after the proof has
been checked. An example is the "integer sum" data type from [CGB17] in which
an integer in range [0, 2^k)
is encoded as a vector of k
field elements,
each representing a bit of the integer (this type is also defined in
Section 7.4.2). After consuming this vector, all that is needed is the integer
it represents. Thus the FLP defines an algorithm for truncating the input to
the length of the aggregated output:¶
Flp.truncate(input: Vec[Field]) -> Vec[Field]
maps an encoded input (e.g.,
the bit-encoding of the input) to an aggregatable output (e.g., the singleton
vector containing the input). The length of the input MUST be INPUT_LEN
and
the length of the output MUST be OUTPUT_LEN
.¶
Once the aggregate shares have been computed and combined together, their sum can be converted into the aggregate result. This could be a projection from the FLP's field to the integers, or it could include additional post-processing.¶
Flp.decode(output: Vec[Field], num_measurements: Unsigned) -> AggResult
maps a sum of aggregate shares to an aggregate result. The length of the
input MUST be OUTPUT_LEN
. num_measurements
is the number of measurements
that contributed to the aggregated output.¶
We remark that, taken together, these three functionalities correspond roughly to the notion of "Affine-aggregatable encodings (AFEs)" from [CGB17].¶
This section specifies Prio3
, an implementation of the Vdaf
interface
(Section 5). It has two generic parameters: an Flp
(Section 7.1) and a Prg
(Section 6.2). The associated constants and types required by the Vdaf
interface
are defined in Table 5. The methods required for sharding, preparation,
aggregation, and unsharding are described in the remaining subsections. These
methods refer to constants enumerated in Table 6.¶
Parameter | Value |
---|---|
VERIFY_KEY_SIZE
|
Prg.SEED_SIZE
|
RAND_SIZE
|
Prg.SEED_SIZE * (1 + 2 * (SHARES - 1)) if Flp.JOINT_RAND_LEN == 0 else Prg.SEED_SIZE * (1 + 2 * (SHARES - 1) + SHARES)
|
NONCE_SIZE
|
16
|
ROUNDS
|
1
|
SHARES
|
in [2, 256)
|
Measurement
|
Flp.Measurement
|
AggParam
|
None
|
Prep
|
Tuple[Vec[Flp.Field], Optional[Bytes], Bytes]
|
OutShare
|
Vec[Flp.Field]
|
AggResult
|
Flp.AggResult
|
Variable | Value |
---|---|
USAGE_MEASUREMENT_SHARE: Unsigned
|
1 |
USAGE_PROOF_SHARE: Unsigned
|
2 |
USAGE_JOINT_RANDOMNESS: Unsigned
|
3 |
USAGE_PROVE_RANDOMNESS: Unsigned
|
4 |
USAGE_QUERY_RANDOMNESS: Unsigned
|
5 |
USAGE_JOINT_RAND_SEED: Unsigned
|
6 |
USAGE_JOINT_RAND_PART: Unsigned
|
7 |
This section describes the process of recovering output shares from the input shares. The high-level idea is that each Aggregator first queries its input and proof share locally, then exchanges its verifier share with the other Aggregators. The verifier shares are then combined into the verifier message, which is used to decide whether to accept.¶
In addition, the Aggregators must ensure that they have all used the same joint randomness for the query-generation algorithm. The joint randomness is generated by a PRG seed. Each Aggregator derives a "part" of this seed from its input share and the "blind" generated by the Client. The seed is derived by hashing together the parts, so before running the query-generation algorithm, it must first gather the parts derived by the other Aggregators.¶
In order to avoid extra round of communication, the Client sends each Aggregator a "hint" consisting of the other Aggregators' parts of the joint randomness seed. This leaves open the possibility that the Client cheated by, say, forcing the Aggregators to use joint randomness that biases the proof check procedure some way in its favor. To mitigate this, the Aggregators also check that they have all computed the same joint randomness seed before accepting their output shares. To do so, they exchange their parts of the joint randomness along with their verifier shares.¶
The definitions of constants and a few auxiliary functions are defined in Section 7.2.6.¶
Every input share MUST only be used once, regardless of the aggregation parameters used.¶
Aggregating a set of output shares is simply a matter of adding up the vectors element-wise.¶
To unshard a set of aggregate shares, the Collector first adds up the vectors element-wise. It then converts each element of the vector into an integer.¶
This section defines a number of auxiliary functions referenced by the main algorithms for Prio3 in the preceding sections.¶
The following method is called by the sharding and preparation algorithms to derive the joint randomness.¶
def joint_rand(Prio3, k_joint_rand_parts): return Prio3.Prg.derive_seed( zeros(Prio3.Prg.SEED_SIZE), Prio3.domain_separation_tag(USAGE_JOINT_RAND_SEED), concat(k_joint_rand_parts), )¶
The following methods are used for encoding and decoding the leader's (i.e.,
the Aggregator with ID 0
) VDAF input share. The leader's share consists of
the full-length measurement and proof shares.¶
def encode_leader_share(Prio3, meas_share, proof_share, k_blind): encoded = Bytes() encoded += Prio3.Flp.Field.encode_vec(meas_share) encoded += Prio3.Flp.Field.encode_vec(proof_share) if Prio3.Flp.JOINT_RAND_LEN > 0: encoded += k_blind return encoded def decode_leader_share(Prio3, encoded): l = Prio3.Flp.Field.ENCODED_SIZE * Prio3.Flp.INPUT_LEN encoded_meas_share, encoded = encoded[:l], encoded[l:] meas_share = Prio3.Flp.Field.decode_vec(encoded_meas_share) l = Prio3.Flp.Field.ENCODED_SIZE * Prio3.Flp.PROOF_LEN encoded_proof_share, encoded = encoded[:l], encoded[l:] proof_share = Prio3.Flp.Field.decode_vec(encoded_proof_share) l = Prio3.Prg.SEED_SIZE if Prio3.Flp.JOINT_RAND_LEN == 0: if len(encoded) != 0: raise ERR_DECODE return (meas_share, proof_share, None) k_blind, encoded = encoded[:l], encoded[l:] if len(encoded) != 0: raise ERR_DECODE return (meas_share, proof_share, k_blind)¶
Next, the methods below are used for encoding and decoding the helpers' (i.e., non-leader) VDAF input shares. Each consists of PRG seeds that are expanded into the measurement and proof shares.¶
def encode_helper_share(Prio3, k_meas_share, k_proof_share, k_blind): encoded = Bytes() encoded += k_meas_share encoded += k_proof_share if Prio3.Flp.JOINT_RAND_LEN > 0: encoded += k_blind return encoded def decode_helper_share(Prio3, agg_id, encoded): c_meas_share = Prio3.domain_separation_tag(USAGE_MEASUREMENT_SHARE) c_proof_share = Prio3.domain_separation_tag(USAGE_PROOF_SHARE) l = Prio3.Prg.SEED_SIZE k_meas_share, encoded = encoded[:l], encoded[l:] meas_share = Prio3.Prg.expand_into_vec(Prio3.Flp.Field, k_meas_share, c_meas_share, byte(agg_id), Prio3.Flp.INPUT_LEN) k_proof_share, encoded = encoded[:l], encoded[l:] proof_share = Prio3.Prg.expand_into_vec(Prio3.Flp.Field, k_proof_share, c_proof_share, byte(agg_id), Prio3.Flp.PROOF_LEN) if Prio3.Flp.JOINT_RAND_LEN == 0: if len(encoded) != 0: raise ERR_DECODE return (meas_share, proof_share, None) k_blind, encoded = encoded[:l], encoded[l:] if len(encoded) != 0: raise ERR_DECODE return (meas_share, proof_share, k_blind)¶
Next, the methods below are used for encoding and decoding the VDAF public share.¶
def encode_public_share(Prio3, k_joint_rand_parts): encoded = Bytes() if Prio3.Flp.JOINT_RAND_LEN > 0: encoded += concat(k_joint_rand_parts) return encoded def decode_public_share(Prio3, encoded): l = Prio3.Prg.SEED_SIZE if Prio3.Flp.JOINT_RAND_LEN == 0: if len(encoded) != 0: raise ERR_DECODE return None k_joint_rand_parts = [] for i in range(Prio3.SHARES): k_joint_rand_part, encoded = encoded[:l], encoded[l:] k_joint_rand_parts.append(k_joint_rand_part) if len(encoded) != 0: raise ERR_DECODE return k_joint_rand_parts¶
Finally, the methods below are used for encoding and decoding the values transmitted during VDAF preparation.¶
def encode_prep_share(Prio3, verifier, k_joint_rand): encoded = Bytes() encoded += Prio3.Flp.Field.encode_vec(verifier) if Prio3.Flp.JOINT_RAND_LEN > 0: encoded += k_joint_rand return encoded def decode_prep_share(Prio3, encoded): l = Prio3.Flp.Field.ENCODED_SIZE * Prio3.Flp.VERIFIER_LEN encoded_verifier, encoded = encoded[:l], encoded[l:] verifier = Prio3.Flp.Field.decode_vec(encoded_verifier) if Prio3.Flp.JOINT_RAND_LEN == 0: if len(encoded) != 0: raise ERR_DECODE return (verifier, None) l = Prio3.Prg.SEED_SIZE k_joint_rand, encoded = encoded[:l], encoded[l:] if len(encoded) != 0: raise ERR_DECODE return (verifier, k_joint_rand) def encode_prep_msg(Prio3, k_joint_rand_check): encoded = Bytes() if Prio3.Flp.JOINT_RAND_LEN > 0: encoded += k_joint_rand_check return encoded def decode_prep_msg(Prio3, encoded): if Prio3.Flp.JOINT_RAND_LEN == 0: if len(encoded) != 0: raise ERR_DECODE return None l = Prio3.Prg.SEED_SIZE k_joint_rand_check, encoded = encoded[:l], encoded[l:] if len(encoded) != 0: raise ERR_DECODE return k_joint_rand_check¶
This section describes an FLP based on the construction from in [BBCGGI19], Section 4.2. We begin in Section 7.3.1 with an overview of their proof system and the extensions to their proof system made here. The construction is specified in Section 7.3.3.¶
OPEN ISSUE We're not yet sure if specifying this general-purpose FLP is desirable. It might be preferable to specify specialized FLPs for each data type that we want to standardize, for two reasons. First, clear and concise specifications are likely easier to write for specialized FLPs rather than the general one. Second, we may end up tailoring each FLP to the measurement type in a way that improves performance, but breaks compatibility with the general-purpose FLP.¶
In any case, we can't make this decision until we know which data types to standardize, so for now, we'll stick with the general-purpose construction. The reference implementation can be found at https://github.com/cfrg/draft-irtf-cfrg-vdaf/tree/main/poc.¶
OPEN ISSUE Chris Wood points out that the this section reads more like a paper than a standard. Eventually we'll want to work this into something that is readily consumable by the CFRG.¶
In the proof system of [BBCGGI19], validity is defined via an arithmetic circuit evaluated over the input: If the circuit output is zero, then the input is deemed valid; otherwise, if the circuit output is non-zero, then the input is deemed invalid. Thus the goal of the proof system is merely to allow the verifier to evaluate the validity circuit over the input. For our application (Section 7), this computation is distributed among multiple Aggregators, each of which has only a share of the input.¶
Suppose for a moment that the validity circuit C
is affine, meaning its only
operations are addition and multiplication-by-constant. In particular, suppose
the circuit does not contain a multiplication gate whose operands are both
non-constant. Then to decide if an input x
is valid, each Aggregator could
evaluate C
on its share of x
locally, broadcast the output share to its
peers, then combine the output shares locally to recover C(x)
. This is true
because for any SHARES
-way secret sharing of x
it holds that¶
C(x_shares[0] + ... + x_shares[SHARES-1]) = C(x_shares[0]) + ... + C(x_shares[SHARES-1])¶
(Note that, for this equality to hold, it may be necessary to scale any
constants in the circuit by SHARES
.) However this is not the case if C
is
not-affine (i.e., it contains at least one multiplication gate whose operands
are non-constant). In the proof system of [BBCGGI19], the proof is designed to
allow the (distributed) verifier to compute the non-affine operations using only
linear operations on (its share of) the input and proof.¶
To make this work, the proof system is restricted to validity circuits that
exhibit a special structure. Specifically, an arithmetic circuit with "G-gates"
(see [BBCGGI19], Definition 5.2) is composed of affine gates and any number of
instances of a distinguished gate G
, which may be non-affine. We will refer to
this class of circuits as 'gadget circuits' and to G
as the "gadget".¶
As an illustrative example, consider a validity circuit C
that recognizes the
set L = set([0], [1])
. That is, C
takes as input a length-1 vector x
and
returns 0 if x[0]
is in [0,2)
and outputs something else otherwise. This
circuit can be expressed as the following degree-2 polynomial:¶
C(x) = (x[0] - 1) * x[0] = x[0]^2 - x[0]¶
This polynomial recognizes L
because x[0]^2 = x[0]
is only true if x[0] ==
0
or x[0] == 1
. Notice that the polynomial involves a non-affine operation,
x[0]^2
. In order to apply [BBCGGI19], Theorem 4.3, the circuit needs to be
rewritten in terms of a gadget that subsumes this non-affine operation. For
example, the gadget might be multiplication:¶
Mul(left, right) = left * right¶
The validity circuit can then be rewritten in terms of Mul
like so:¶
C(x[0]) = Mul(x[0], x[0]) - x[0]¶
The proof system of [BBCGGI19] allows the verifier to evaluate each instance
of the gadget (i.e., Mul(x[0], x[0])
in our example) using a linear function
of the input and proof. The proof is constructed roughly as follows. Let C
be
the validity circuit and suppose the gadget is arity-L
(i.e., it has L
input
wires.). Let wire[j-1,k-1]
denote the value of the j
th wire of the k
th
call to the gadget during the evaluation of C(x)
. Suppose there are M
such
calls and fix distinct field elements alpha[0], ..., alpha[M-1]
. (We will
require these points to have a special property, as we'll discuss in
Section 7.3.1.1; but for the moment it is only important
that they are distinct.)¶
The prover constructs from wire
and alpha
a polynomial that, when evaluated
at alpha[k-1]
, produces the output of the k
th call to the gadget. Let us
call this the "gadget polynomial". Polynomial evaluation is linear, which means
that, in the distributed setting, the Client can disseminate additive shares of
the gadget polynomial that the Aggregators then use to compute additive shares
of each gadget output, allowing each Aggregator to compute its share of C(x)
locally.¶
There is one more wrinkle, however: It is still possible for a malicious prover
to produce a gadget polynomial that would result in C(x)
being computed
incorrectly, potentially resulting in an invalid input being accepted. To
prevent this, the verifier performs a probabilistic test to check that the
gadget polynomial is well-formed. This test, and the procedure for constructing
the gadget polynomial, are described in detail in Section 7.3.3.¶
The FLP described in the next section extends the proof system [BBCGGI19], Section 4.2 in three ways.¶
First, the validity circuit in our construction includes an additional, random
input (this is the "joint randomness" derived from the input shares in Prio3;
see Section 7.2). This allows for circuit optimizations that trade a
small soundness error for a shorter proof. For example, consider a circuit that
recognizes the set of length-N
vectors for which each element is either one or
zero. A deterministic circuit could be constructed for this language, but it
would involve a large number of multiplications that would result in a large
proof. (See the discussion in [BBCGGI19], Section 5.2 for details). A much
shorter proof can be constructed for the following randomized circuit:¶
C(inp, r) = r * Range2(inp[0]) + ... + r^N * Range2(inp[N-1])¶
(Note that this is a special case of [BBCGGI19], Theorem 5.2.) Here inp
is
the length-N
input and r
is a random field element. The gadget circuit
Range2
is the "range-check" polynomial described above, i.e., Range2(x) = x^2 -
x
. The idea is that, if inp
is valid (i.e., each inp[j]
is in [0,2)
),
then the circuit will evaluate to 0 regardless of the value of r
; but if
inp[j]
is not in [0,2)
for some j
, the output will be non-zero with high
probability.¶
The second extension implemented by our FLP allows the validity circuit to
contain multiple gadget types. (This generalization was suggested in
[BBCGGI19], Remark 4.5.) For example, the following circuit is allowed, where
Mul
and Range2
are the gadgets defined above (the input has length N+1
):¶
C(inp, r) = r * Range2(inp[0]) + ... + r^N * Range2(inp[N-1]) + \ 2^0 * inp[0] + ... + 2^(N-1) * inp[N-1] - \ Mul(inp[N], inp[N])¶
Finally, [BBCGGI19], Theorem 4.3 makes no restrictions on the choice of the
fixed points alpha[0], ..., alpha[M-1]
, other than to require that the points
are distinct. In this document, the fixed points are chosen so that the gadget
polynomial can be constructed efficiently using the Cooley-Tukey FFT ("Fast
Fourier Transform") algorithm. Note that this requires the field to be
"FFT-friendly" as defined in Section 6.1.2.¶
The FLP described in Section 7.3.3 is defined in terms of a
validity circuit Valid
that implements the interface described here.¶
A concrete Valid
defines the following parameters:¶
Parameter | Description |
---|---|
GADGETS
|
A list of gadgets |
GADGET_CALLS
|
Number of times each gadget is called |
INPUT_LEN
|
Length of the input |
OUTPUT_LEN
|
Length of the aggregatable output |
JOINT_RAND_LEN
|
Length of the random input |
Measurement
|
The type of measurement |
AggResult
|
Type of the aggregate result |
Field
|
An FFT-friendly finite field as defined in Section 6.1.2 |
Each gadget G
in GADGETS
defines a constant DEGREE
that specifies the
circuit's "arithmetic degree". This is defined to be the degree of the
polynomial that computes it. For example, the Mul
circuit in
Section 7.3.1 is defined by the polynomial Mul(x) = x * x
, which
has degree 2
. Hence, the arithmetic degree of this gadget is 2
.¶
Each gadget also defines a parameter ARITY
that specifies the circuit's arity
(i.e., the number of input wires).¶
A concrete Valid
provides the following methods for encoding a measurement as
an input vector, truncating an input vector to the length of an aggregatable
output, and converting an aggregated output to an aggregate result:¶
Valid.encode(measurement: Measurement) -> Vec[Field]
returns a vector of
length INPUT_LEN
representing a measurement.¶
Valid.truncate(input: Vec[Field]) -> Vec[Field]
returns a vector of length
OUTPUT_LEN
representing an aggregatable output.¶
Valid.decode(output: Vec[Field], num_measurements: Unsigned) -> AggResult
returns an aggregate result.¶
Finally, the following class methods are derived for each concrete Valid
:¶
This section specifies FlpGeneric
, an implementation of the Flp
interface
(Section 7.1). It has as a generic parameter a validity circuit Valid
implementing
the interface defined in Section 7.3.2.¶
NOTE A reference implementation can be found in https://github.com/cfrg/draft-irtf-cfrg-vdaf/blob/main/poc/flp_generic.py.¶
The FLP parameters for FlpGeneric
are defined in Table 8. The
required methods for generating the proof, generating the verifier, and deciding
validity are specified in the remaining subsections.¶
In the remainder, we let [n]
denote the set {1, ..., n}
for positive integer
n
. We also define the following constants:¶
Parameter | Value |
---|---|
PROVE_RAND_LEN
|
Valid.prove_rand_len() (see Section 7.3.2) |
QUERY_RAND_LEN
|
Valid.query_rand_len() (see Section 7.3.2) |
JOINT_RAND_LEN
|
Valid.JOINT_RAND_LEN
|
INPUT_LEN
|
Valid.INPUT_LEN
|
OUTPUT_LEN
|
Valid.OUTPUT_LEN
|
PROOF_LEN
|
Valid.proof_len() (see Section 7.3.2) |
VERIFIER_LEN
|
Valid.verifier_len() (see Section 7.3.2) |
Measurement
|
Valid.Measurement
|
Field
|
Valid.Field
|
On input inp
, prove_rand
, and joint_rand
, the proof is computed as
follows:¶
i
in [H]
create an empty table wire_i
.¶
prove_rand
into sub-vectors seed_1, ...,
seed_H
where len(seed_i) == L_i
for all i
in [H]
. Let us call these
the "wire seeds" of each gadget.¶
Valid
on input of inp
and joint_rand
, recording the inputs of
each gadget in the corresponding table. Specifically, for every i
in [H]
,
set wire_i[j-1,k-1]
to the value on the j
th wire into the k
th call to
gadget G_i
.¶
Compute the "wire polynomials". That is, for every i
in [H]
and j
in
[L_i]
, construct poly_wire_i[j-1]
, the j
th wire polynomial for the
i
th gadget, as follows:¶
w = [seed_i[j-1], wire_i[j-1,0], ..., wire_i[j-1,M_i-1]]
.¶
padded_w = w + Field.zeros(P_i - len(w))
.¶
NOTE We pad w
to the nearest power of 2 so that we can use FFT for
interpolating the wire polynomials. Perhaps there is some clever math for
picking wire_inp
in a way that avoids having to pad.¶
poly_wire_i[j-1]
be the lowest degree polynomial for which
poly_wire_i[j-1](alpha_i^k) == padded_w[k]
for all k
in [P_i]
.¶
Compute the "gadget polynomials". That is, for every i
in [H]
:¶
poly_gadget_i = G_i(poly_wire_i[0], ..., poly_wire_i[L_i-1])
. That
is, evaluate the circuit G_i
on the wire polynomials for the i
th
gadget. (Arithmetic is in the ring of polynomials over Field
.)¶
The proof is the vector proof = seed_1 + coeff_1 + ... + seed_H + coeff_H
,
where coeff_i
is the vector of coefficients of poly_gadget_i
for each i
in
[H]
.¶
On input of inp
, proof
, query_rand
, and joint_rand
, the verifier message
is generated as follows:¶
i
in [H]
create an empty table wire_i
.¶
proof
into the sub-vectors seed_1
, coeff_1
, ..., seed_H
,
coeff_H
defined in Section 7.3.3.1.¶
Valid
on input of inp
and joint_rand
, recording the inputs of
each gadget in the corresponding table. This step is similar to the prover's
step (3.) except the verifier does not evaluate the gadgets. Instead, it
computes the output of the k
th call to G_i
by evaluating
poly_gadget_i(alpha_i^k)
. Let v
denote the output of the circuit
evaluation.¶
Compute the tests for well-formedness of the gadget polynomials. That is, for
every i
in [H]
:¶
The verifier message is the vector verifier = [v] + x_1 + [y_1] + ... + x_H +
[y_H]
.¶
This section specifies instantiations of Prio3 for various measurement types.
Each uses FlpGeneric
as the FLP (Section 7.3) and is determined by a
validity circuit (Section 7.3.2) and a PRG (Section 6.2). Test vectors for
each can be found in Appendix "Test Vectors".¶
NOTE Reference implementations of each of these VDAFs can be found in https://github.com/cfrg/draft-irtf-cfrg-vdaf/blob/main/poc/vdaf_prio3.sage.¶
Our first instance of Prio3 is for a simple counter: Each measurement is either one or zero and the aggregate result is the sum of the measurements.¶
This instance uses PrgSha3 (Section 6.2.1) as its PRG. Its validity
circuit, denoted Count
, uses Field64
(Table 3) as its finite field. Its
gadget, denoted Mul
, is the degree-2, arity-2 gadget defined as¶
def Mul(x, y): return x * y¶
The validity circuit is defined as¶
def Count(inp: Vec[Field64]): return Mul(inp[0], inp[0]) - inp[0]¶
The measurement is encoded and decoded as a singleton vector in the natural way. The parameters for this circuit are summarized below.¶
Parameter | Value |
---|---|
GADGETS
|
[Mul]
|
GADGET_CALLS
|
[1]
|
INPUT_LEN
|
1
|
OUTPUT_LEN
|
1
|
JOINT_RAND_LEN
|
0
|
Measurement
|
Unsigned , in range [0,2)
|
AggResult
|
Unsigned
|
Field
|
Field64 (Table 3) |
The next instance of Prio3 supports summing of integers in a pre-determined
range. Each measurement is an integer in range [0, 2^bits)
, where bits
is an
associated parameter.¶
This instance of Prio3 uses PrgSha3 (Section 6.2.1) as its PRG. Its validity
circuit, denoted Sum
, uses Field128
(Table 3) as its finite field. The
measurement is encoded as a length-bits
vector of field elements, where the
l
th element of the vector represents the l
th bit of the summand:¶
def encode(Sum, measurement: Integer): if 0 > measurement or measurement >= 2 ** Sum.INPUT_LEN: raise ERR_INPUT encoded = [] for l in range(Sum.INPUT_LEN): encoded.append(Sum.Field((measurement >> l) & 1)) return encoded def truncate(Sum, inp): decoded = Sum.Field(0) for (l, b) in enumerate(inp): w = Sum.Field(1 << l) decoded += w * b return [decoded] def decode(Sum, output, _num_measurements): return output[0].as_unsigned()¶
The validity circuit checks that the input consists of ones and zeros. Its
gadget, denoted Range2
, is the degree-2, arity-1 gadget defined as¶
def Range2(x): return x^2 - x¶
The validity circuit is defined as¶
def Sum(inp: Vec[Field128], joint_rand: Vec[Field128]): out = Field128(0) r = joint_rand[0] for x in inp: out += r * Range2(x) r *= joint_rand[0] return out¶
Parameter | Value |
---|---|
GADGETS
|
[Range2]
|
GADGET_CALLS
|
[bits]
|
INPUT_LEN
|
bits
|
OUTPUT_LEN
|
1
|
JOINT_RAND_LEN
|
1
|
Measurement
|
Unsigned , in range [0, 2^bits)
|
AggResult
|
Unsigned
|
Field
|
Field128 (Table 3) |
This instance of Prio3 allows for estimating the distribution of some quantity
by computing a simple histogram. Each measurement increments one histogram
bucket, out of a set of fixed buckets. (Bucket indexing begins at 0
.) For
example, the buckets might quantize the real numbers, and each measurement
would report the bucket that the corresponding client's real-numbered value
falls into. The aggregate result counts the number of measurements in each
bucket.¶
This instance of Prio3 uses PrgSha3 (Section 6.2.1) as its PRG. Its validity
circuit, denoted Histogram
, uses Field128
(Table 3) as its finite field.
Let length
be the number of histogram buckets. The measurement is encoded as a
one-hot vector representing the bucket into which the measurement falls:¶
def encode(Histogram, measurement: Integer): encoded = [Field128(0)] * length encoded[measurement] = Field128(1) return encoded def truncate(Histogram, inp: Vec[Field128]): return inp def decode(Histogram, output: Vec[Field128], _num_measurements): return [bucket_count.as_unsigned() for bucket_count in output]¶
The validity circuit uses Range2
(see Section 7.4.2) as its single gadget. It
checks for one-hotness in two steps, as follows:¶
def Histogram(inp: Vec[Field128], joint_rand: Vec[Field128], num_shares: Unsigned): # Check that each bucket is one or zero. range_check = Field128(0) r = joint_rand[0] for x in inp: range_check += r * Range2(x) r *= joint_rand[0] # Check that the buckets sum to 1. sum_check = -Field128(1) * Field128(num_shares).inv() for b in inp: sum_check += b out = joint_rand[1] * range_check + \ joint_rand[1] ** 2 * sum_check return out¶
Note that this circuit depends on the number of shares into which the input is sharded. This is provided to the FLP by Prio3.¶
Parameter | Value |
---|---|
GADGETS
|
[Range2]
|
GADGET_CALLS
|
[length]
|
INPUT_LEN
|
length
|
OUTPUT_LEN
|
length
|
JOINT_RAND_LEN
|
2
|
Measurement
|
Unsigned
|
AggResult
|
Vec[Unsigned]
|
Field
|
Field128 (Table 3) |
This section specifies Poplar1, a VDAF for the following task. Each Client holds
a string of length BITS
and the Aggregators hold a set of l
-bit strings,
where l <= BITS
. We will refer to the latter as the set of "candidate
prefixes". The Aggregators' goal is to count how many inputs are prefixed by
each candidate prefix.¶
This functionality is the core component of the Poplar protocol [BBCGGI21], which was designed to compute the heavy hitters over a set of input strings. At a high level, the protocol works as follows.¶
0
and
1
.¶
H
denote the set of prefixes that occurred at least t
times. If the
prefixes all have length BITS
, then H
is the set of t
-heavy-hitters.
Otherwise compute the next set of candidate prefixes, e.g., for each p
in
H
, add p || 0
and p || 1
to the set. Repeat step 3 with the new set of
candidate prefixes.¶
Poplar1 is constructed from an "Incremental Distributed Point Function (IDPF)", a primitive described by [BBCGGI21] that generalizes the notion of a Distributed Point Function (DPF) [GI14]. Briefly, a DPF is used to distribute the computation of a "point function", a function that evaluates to zero on every input except at a programmable "point". The computation is distributed in such a way that no one party knows either the point or what it evaluates to.¶
An IDPF generalizes this "point" to a path on a full binary tree from the root to one of the leaves. It is evaluated on an "index" representing a unique node of the tree. If the node is on the programmed path, then the function evaluates to a non-zero value; otherwise it evaluates to zero. This structure allows an IDPF to provide the functionality required for the above protocol: To compute the hit count for an index, just evaluate each set of IDPF shares at that index and add up the results.¶
Consider the sub-tree constructed from a set of input strings and a target
threshold t
by including all indices that prefix at least t
of the input
strings. We shall refer to this structure as the "prefix tree" for the batch of
inputs and target threshold. To compute the t
-heavy hitters for a set of
inputs, the Aggregators and Collector first compute the prefix tree, then
extract the heavy hitters from the leaves of this tree. (Note that the prefix
tree may leak more information about the set than the heavy hitters themselves;
see Section 9.3.1 for details.)¶
Poplar1 composes an IDPF with the "secure sketching" protocol of [BBCGGI21]. This protocol ensures that evaluating a set of input shares on a unique set of candidate prefixes results in shares of a "one-hot" vector, i.e., a vector that is zero everywhere except for one element, which is equal to one.¶
The remainder of this section is structured as follows. IDPFs are defined in Section 8.1; a concrete instantiation is given Section 8.3. The Poplar1 VDAF is defined in Section 8.2 in terms of a generic IDPF. Finally, a concrete instantiation of Poplar1 is specified in Section 8.4; test vectors can be found in Appendix "Test Vectors".¶
An IDPF is defined over a domain of size 2^BITS
, where BITS
is constant
defined by the IDPF. Indexes into the IDPF tree are encoded as integers in range
[0, 2^BITS)
. The Client specifies an index alpha
and a vector of
values beta
, one for each "level" L
in range [0, BITS)
. The key generation
algorithm generates one IDPF "key" for each Aggregator. When evaluated at level
L
and index 0 <= prefix < 2^L
, each IDPF key returns an additive share of
beta[L]
if prefix
is the L
-bit prefix of alpha
and shares of zero
otherwise.¶
An index x
is defined to be a prefix of another index y
as follows. Let
LSB(x, N)
denote the least significant N
bits of positive integer x
. By
definition, a positive integer 0 <= x < 2^L
is said to be the length-L
prefix of positive integer 0 <= y < 2^BITS
if LSB(x, L)
is equal to the most
significant L
bits of LSB(y, BITS)
, For example, 6 (110 in binary) is the
length-3 prefix of 25 (11001), but 7 (111) is not.¶
Each of the programmed points beta
is a vector of elements of some finite
field. We distinguish two types of fields: One for inner nodes (denoted
Idpf.FieldInner
), and one for leaf nodes (Idpf.FieldLeaf
). (Our
instantiation of Poplar1 (Section 8.4) will use a much larger field for
leaf nodes than for inner nodes. This is to ensure the IDPF is "extractable" as
defined in [BBCGGI21], Definition 1.)¶
A concrete IDPF defines the types and constants enumerated in Table 12. In
the remainder we write Idpf.Vec
as shorthand for the type
Union[Vec[Vec[Idpf.FieldInner]], Vec[Vec[Idpf.FieldLeaf]]]
. (This type denotes
either a vector of inner node field elements or leaf node field elements.) The
scheme is comprised of the following algorithms:¶
Idpf.gen(alpha: Unsigned, beta_inner: Vec[Vec[Idpf.FieldInner]], beta_leaf:
Vec[Idpf.FieldLeaf], binder: Bytes, rand: Bytes["Idpf.RAND_SIZE"]) -> Tuple[
Bytes, Vec[Bytes]]
is the randomized IDPF-key generation algorithm. (Input
rand
consists of the random bytes it consumes.) Its inputs are the index
alpha
the values beta
, and a binder string. The value of alpha
MUST be
in range [0, 2^BITS)
. The output is a public part that is sent to all
Aggregators and a vector of private IDPF keys, one for each aggregator.¶
Idpf.eval(agg_id: Unsigned, public_share: Bytes, key: Bytes, level:
Unsigned, prefixes: Tuple[Unsigned, ...], binder: Bytes) -> Idpf.Vec
is the
deterministic, stateless IDPF-key evaluation algorithm run by each
Aggregator. Its inputs are the Aggregator's unique identifier, the public
share distributed to all of the Aggregators, the Aggregator's IDPF key, the
"level" at which to evaluate the IDPF, the sequence of candidate prefixes,
and a binder string. It returns the share of the value corresponding to each
candidate prefix.¶
The output type depends on the value of level
: If level < Idpf.BITS-1
, the
output is the value for an inner node, which has type
Vec[Vec[Idpf.FieldInner]]
; otherwise, if level == Idpf.BITS-1
, then the
output is the value for a leaf node, which has type
Vec[Vec[Idpf.FieldLeaf]]
.¶
The value of level
MUST be in range [0, BITS)
. The indexes in prefixes
MUST all be distinct and in range [0, 2^level)
.¶
Applications MUST ensure that the Aggregator's identifier is equal to the
integer in range [0, SHARES)
that matches the index of key
in the sequence
of IDPF keys output by the Client.¶
In addition, the following method is derived for each concrete Idpf
:¶
def current_field(Idpf, level): return Idpf.FieldInner if level < Idpf.BITS-1 \ else Idpf.FieldLeaf¶
Finally, an implementation note. The interface for IDPFs specified here is stateless, in the sense that there is no state carried between IDPF evaluations. This is to align the IDPF syntax with the VDAF abstraction boundary, which does not include shared state across across VDAF evaluations. In practice, of course, it will often be beneficial to expose a stateful API for IDPFs and carry the state across evaluations. See Section 8.3 for details.¶
Parameter | Description |
---|---|
SHARES | Number of IDPF keys output by IDPF-key generator |
BITS | Length in bits of each input string |
VALUE_LEN | Number of field elements of each output value |
RAND_SIZE | Size of the random string consumed by the IDPF-key generator. Equal to twice the PRG's seed size. |
KEY_SIZE | Size in bytes of each IDPF key |
FieldInner | Implementation of Field (Section 6.1) used for values of inner nodes |
FieldLeaf | Implementation of Field used for values of leaf nodes |
This section specifies Poplar1
, an implementation of the Vdaf
interface
(Section 5). It is defined in terms of any Idpf
(Section 8.1) for which
Idpf.SHARES == 2
and Idpf.VALUE_LEN == 2
and an implementation of Prg
(Section 6.2). The associated constants and types required by the Vdaf
interface
are defined in Table 13. The methods required for sharding,
preparation, aggregation, and unsharding are described in the remaining
subsections. These methods make use of constants defined in Table 14.¶
Parameter | Value |
---|---|
VERIFY_KEY_SIZE
|
Prg.SEED_SIZE
|
RAND_SIZE
|
Prg.SEED_SIZE * 3 + Idpf.RAND_SIZE
|
NONCE_SIZE
|
16
|
ROUNDS
|
2
|
SHARES
|
2
|
Measurement
|
Unsigned
|
AggParam
|
Tuple[Unsigned, Tuple[Unsigned, ...]]
|
Prep
|
Tuple[Bytes, Unsigned, Idpf.Vec]
|
OutShare
|
Idpf.Vec
|
AggResult
|
Vec[Unsigned]
|
Variable | Value |
---|---|
USAGE_SHARD_RAND: Unsigned | 1 |
USAGE_CORR_INNER: Unsigned | 2 |
USAGE_CORR_LEAF: Unsigned | 3 |
USAGE_VERIFY_RAND: Unsigned | 4 |
The Client's input is an IDPF index, denoted alpha
. The programmed IDPF values
are pairs of field elements (1, k)
where each k
is chosen at random. This
random value is used as part of the secure sketching protocol of [BBCGGI21],
Appendix C.4. After evaluating their IDPF key shares on a given sequence of
candidate prefixes, the sketching protocol is used by the Aggregators to verify
that they hold shares of a one-hot vector. In addition, for each level of the
tree, the prover generates random elements a
, b
, and c
and computes¶
A = -2*a + k B = a^2 + b - k*a + c¶
and sends additive shares of a
, b
, c
, A
and B
to the Aggregators.
Putting everything together, the sharding algorithm is defined as
follows. Function encode_input_shares
is defined in Section 8.2.6.¶
The aggregation parameter encodes a sequence of candidate prefixes. When an
Aggregator receives an input share from the Client, it begins by evaluating its
IDPF share on each candidate prefix, recovering a data_share
and auth_share
for each. The Aggregators use these and the correlation shares provided by the
Client to verify that the sequence of data_share
values are additive shares of
a one-hot vector.¶
Aggregators MUST ensure the candidate prefixes are all unique and appear in
lexicographic order. (This is enforced in the definition of prep_init()
below.) Uniqueness is necessary to ensure the refined measurement (i.e., the sum
of the output shares) is in fact a one-hot vector. Otherwise, sketch
verification might fail, causing the Aggregators to erroneously reject a report
that is actually valid. Note that enforcing the order is not strictly necessary,
but this does allow uniqueness to be determined more efficiently.¶
The algorithms below make use of the auxiliary function decode_input_share()
defined in Section 8.2.6.¶
Aggregation parameters are valid for a given input share if no aggregation parameter with the same level has been used with the same input share before. The whole preparation phase MUST NOT be run more than once for a given combination of input share and level.¶
Aggregation involves simply adding up the output shares.¶
Finally, the Collector unshards the aggregate result by adding up the aggregate shares.¶
This section defines methods for serializing input shares, as required by the
Vdaf
interface. Optional serialization of the aggregation parameter is also
specified below.¶
Implementation note: The aggregation parameter includes the level of the IDPF tree and the sequence of indices to evaluate. For implementations that perform per-report caching across executions of the VDAF, this may be more information than is strictly needed. In particular, it may be sufficient to convey which indices from the previous execution will have their children included in the next. This would help reduce communication overhead.¶
def encode_input_shares(Poplar1, keys, corr_seed, corr_inner, corr_leaf): input_shares = [] for (key, seed, inner, leaf) in zip(keys, corr_seed, corr_inner, corr_leaf): encoded = Bytes() encoded += key encoded += seed encoded += Poplar1.Idpf.FieldInner.encode_vec(inner) encoded += Poplar1.Idpf.FieldLeaf.encode_vec(leaf) input_shares.append(encoded) return input_shares def decode_input_share(Poplar1, encoded): l = Poplar1.Idpf.KEY_SIZE key, encoded = encoded[:l], encoded[l:] l = Poplar1.Prg.SEED_SIZE corr_seed, encoded = encoded[:l], encoded[l:] l = Poplar1.Idpf.FieldInner.ENCODED_SIZE \ * 2 * (Poplar1.Idpf.BITS - 1) encoded_corr_inner, encoded = encoded[:l], encoded[l:] corr_inner = Poplar1.Idpf.FieldInner.decode_vec( encoded_corr_inner) l = Poplar1.Idpf.FieldLeaf.ENCODED_SIZE * 2 encoded_corr_leaf, encoded = encoded[:l], encoded[l:] corr_leaf = Poplar1.Idpf.FieldLeaf.decode_vec( encoded_corr_leaf) if len(encoded) != 0: raise ERR_INPUT return (key, corr_seed, corr_inner, corr_leaf) def encode_agg_param(Poplar1, level, prefixes): if level > 2 ** 16 - 1: raise ERR_INPUT # level too deep if len(prefixes) > 2 ** 32 - 1: raise ERR_INPUT # too many prefixes encoded = Bytes() encoded += to_be_bytes(level, 2) encoded += to_be_bytes(len(prefixes), 4) packed = 0 for (i, prefix) in enumerate(prefixes): packed |= prefix << ((level+1) * i) l = ((level+1) * len(prefixes) + 7) // 8 encoded += to_be_bytes(packed, l) return encoded def decode_agg_param(Poplar1, encoded): encoded_level, encoded = encoded[:2], encoded[2:] level = from_be_bytes(encoded_level) encoded_prefix_count, encoded = encoded[:4], encoded[4:] prefix_count = from_be_bytes(encoded_prefix_count) l = ((level+1) * prefix_count + 7) // 8 encoded_packed, encoded = encoded[:l], encoded[l:] packed = from_be_bytes(encoded_packed) prefixes = [] m = 2 ** (level+1) - 1 for i in range(prefix_count): prefixes.append(packed >> ((level+1) * i) & m) if len(encoded) != 0: raise ERR_INPUT return (level, tuple(prefixes))¶
In this section we specify a concrete IDPF, called IdpfPoplar, suitable for instantiating Poplar1. The scheme gets its name from the name of the protocol of [BBCGGI21].¶
TODO We should consider giving IdpfPoplar
a more distinctive name.¶
The constant and type definitions required by the Idpf
interface are given in
Table 15.¶
IdpfPoplar requires a PRG for deriving the output shares, as well as a variety of other artifacts used internally. For performance reasons, we instantiate this object using PrgFixedKeyAes128 (Section 6.2.2). See Section 9.4 for justification of this choice.¶
Parameter | Value |
---|---|
SHARES |
2
|
BITS | any positive integer |
VALUE_LEN | any positive integer |
KEY_SIZE |
Prg.SEED_SIZE
|
FieldInner |
Field64 (Table 3) |
FieldLeaf |
Field255 (Table 3) |
TODO Describe the construction in prose, beginning with a gentle introduction to the high level idea.¶
The description of the IDPF-key generation algorithm makes use of auxiliary
functions extend()
, convert()
, and encode_public_share()
defined in
Section 8.3.3. In the following, we let Field2
denote the
field GF(2)
.¶
TODO Describe in prose how IDPF-key evaluation algorithm works.¶
The description of the IDPF-evaluation algorithm makes use of auxiliary
functions extend()
, convert()
, and decode_public_share()
defined in
Section 8.3.3.¶
Here, pack_bits()
takes a list of bits, packs each group of eight bits into a
byte, in LSB to MSB order, padding the most significant bits of the last byte
with zeros as necessary, and returns the byte array. unpack_bits()
performs
the reverse operation: it takes in a byte array and a number of bits, and
returns a list of bits, extracting eight bits from each byte in turn, in LSB to
MSB order, and stopping after the requested number of bits. If the byte array
has an incorrect length, or if unused bits in the last bytes are not zero, it
throws an error.¶
By default, Poplar1 is instantiated with IdpfPoplar (VALUE_LEN == 2
) and
PrgSha3 (Section 6.2.1). This VDAF is suitable for any positive value of BITS
.
Test vectors can be found in Appendix "Test Vectors".¶
VDAFs have two essential security goals:¶
Formal definitions of privacy and robustness can be found in [DPRS23]. A VDAF is the core cryptographic primitive of a protocol that achieves the above privacy and robustness goals. It is not sufficient on its own, however. The application will need to assure a few security properties, for example:¶
Establishing secure channels:¶
In such an environment, a VDAF provides the high-level privacy property described above: The Collector learns only the aggregate measurement, and nothing about individual measurements aside from what can be inferred from the aggregate result. The Aggregators learn neither individual measurements nor the aggregate result. The Collector is assured that the aggregate statistic accurately reflects the inputs as long as the Aggregators correctly executed their role in the VDAF.¶
On their own, VDAFs do not mitigate Sybil attacks [Dou02]. In this attack, the adversary observes a subset of input shares transmitted by a Client it is interested in. It allows the input shares to be processed, but corrupts and picks bogus measurements for the remaining Clients. Applications can guard against these risks by adding additional controls on report submission, such as Client authentication and rate limits.¶
VDAFs do not inherently provide differential privacy [Dwo06]. The VDAF approach to private measurement can be viewed as complementary to differential privacy, relying on non-collusion instead of statistical noise to protect the privacy of the inputs. It is possible that a future VDAF could incorporate differential privacy features, e.g., by injecting noise before the sharding stage and removing it after unsharding.¶
The Aggregators are responsible for exchanging the verification key in advance of executing the VDAF. Any procedure is acceptable as long as the following conditions are met:¶
Meeting these conditions is required in order to leverage security analysis in the framework of [DPRS23]. Their definition of robustness allows the attacker, playing the role of a cohort of malicious Clients, to submit arbitrary reports to the Aggregators and eavesdrop on their communications as they process them. Security in this model is achievable as long as the verification key is kept secret from the attacker.¶
The privacy definition of [DPRS23] considers an active attacker that controls the network and a subset of Aggregators; in addition, the attacker is allowed to choose the verification key used by each honest Aggregator over the course of the experiment. Security is achievable in this model as long as the key is picked at the start of the experiment, prior to any reports being generated. (The model also requires nonces to be generated at random; see Section 9.2 below.)¶
Meeting these requirements is relatively straightforward. For example, the Aggregators may designate one of their peers to generate the verification key and distribute it to the others. To assure Clients of key commitment, the Clients and (honest) Aggregators could bind reports to a shared context string derived from the key. For instance, the "task ID" of DAP [DAP] could be set to the hash of the verification key; then as long as honest Aggregators only consume reports for the task indicated by the Client, forging a new key after the fact would reduce to finding collisions in the underlying hash function. (Keeping the key secret from the Clients would require the hash function to be one-way.) However, since rotating the key implies rotating the task ID, this scheme would not allow key rotation over the lifetime of a task.¶
The sharding and preparation steps of VDAF execution depend on a nonce associated with the Client's report. To ensure privacy of the underlying measurement, the Client MUST generate this nonce using a CSPRNG. This is required in order to leverage security analysis for the privacy definition of [DPRS23], which assumes the nonce is chosen at random prior to generating the report.¶
Other security considerations may require the nonce to be non-repeating. For example, to achieve differential privacy it is necessary to avoid "over exposing" a measurement by including it too many times in a single batch or across multiple batches. It is RECOMMENDED that the nonce generated by the Client be used by the Aggregators for replay protection.¶
As described in Section 4.3 and Section 5.3 respectively, DAFs and VDAFs may impose restrictions on the re-use of input shares. This is to ensure that correlated randomness provided by the Client through the input share is not used more than once, which might compromise confidentiality of the Client's measurements.¶
Protocols that make use of VDAFs therefore MUST call Vdaf.is_valid
on the set of all aggregation parameters used for a Client's input share, and
only proceed with the preparation and aggregation phases if that function call
returns True
.¶
Aggregating a batch of reports multiple times, each time with a different aggregation parameter, could result in information leakage beyond what is used by the application.¶
For example, when Poplar1 is used for heavy hitters, the Aggregators learn not only the heavy hitters themselves, but also the prefix tree (as defined in Section 8) computed along the way. Indeed, this leakage is inherent to any construction that uses an IDPF (Section 8.1) in the same way. Depending on the distribution of the measurements, the prefix tree can leak a significant amount of information about unpopular inputs. For instance, it is possible (though perhaps unlikely) for a large set of non-heavy-hitter values to share a common prefix, which would be leaked by a prefix tree with a sufficiently small threshold.¶
The only known, general-purpose approach to mitigating this leakage is via differential privacy.¶
The objects we describe in Section 6.2 share a common interface, which we have called Prg. However, these are not necessarily all modeled as cryptographic Pseudorandom Generators in the security analyses of our protocols. Instead, most of them are modeled as random oracles. For these use cases, we want to be conservative in our assumptions, and hence prescribe PrgSha3 as the only RECOMMENDED Prg instantiation.¶
The one exception is the PRG used in the Idpf implementation IdpfPoplar Section 8.3. Here, a random oracle is not needed to prove security, and hence a construction based on fixed-key AES Section 6.2.2 can be used. However, as PrgFixedKeyAes128 has been shown to be differentiable from a random oracle [GKWWY20], it is NOT RECOMMENDED to use it anywhere else.¶
OPEN ISSUE: We may want to drop the common interface for PRGs and random oracles. See issue #159.¶
A codepoint for each (V)DAF in this document is defined in the table below. Note
that 0xFFFF0000
through 0xFFFFFFFF
are reserved for private use.¶
Value | Scheme | Type | Reference |
---|---|---|---|
0x00000000
|
Prio3Count | VDAF | Section 7.4.1 |
0x00000001
|
Prio3Sum | VDAF | Section 7.4.2 |
0x00000002
|
Prio3Histogram | VDAF | Section 7.4.3 |
0x00000003 to 0x00000FFF
|
reserved for Prio3 | VDAF | n/a |
0x00001000
|
Poplar1 | VDAF | Section 8.4 |
0xFFFF0000 to 0xFFFFFFFF
|
reserved | n/a | n/a |
The security considerations in Section 9 are based largely on the security analysis of [DPRS23]. Thanks to Hannah Davis and Mike Rosulek, who lent their time to developing definitions and security proofs.¶
Thanks to Henry Corrigan-Gibbs, Armando Faz-Hernández, Simon Friedberger, Tim Geoghegan, Brandon Pitman, Mariana Raykova, Jacob Rothstein, Xiao Wang, and Christopher Wood for useful feedback on and contributions to the spec.¶
NOTE Machine-readable test vectors can be found at https://github.com/cfrg/draft-irtf-cfrg-vdaf/tree/main/poc/test_vec.¶
Test vectors cover the generation of input shares and the conversion of input
shares into output shares. Vectors specify the verification key, measurements,
aggregation parameter, and any parameters needed to construct the VDAF. (For
example, for Prio3Sum
, the user specifies the number of bits for representing
each summand.)¶
Byte strings are encoded in hexadecimal. To make the tests deterministic, the
random inputs of randomized algorithms were fixed to the byte sequence starting
with 0
, incrementing by 1
, and wrapping at 256
:¶
0, 1, 2, ..., 255, 0, 1, 2, ...¶
verify_key: "000102030405060708090a0b0c0d0e0f" upload_0: measurement: 1 nonce: "000102030405060708090a0b0c0d0e0f" public_share: >- input_share_0: >- 3ead59ec98fe1c4f70171b7a5f0b5c731ae0c48b62f687b98e981a811540934d76db 271df5a3a6e97105856c18576573 input_share_1: >- 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f round_0: prep_share_0: >- 4c151ee49ef43488213d8945b7aff36fc979166c714bd4b07676eea77634a432 prep_share_1: >- b5eae11b600bcb77827a46303c1e0f073ebc46fcdc9c3fe9aeeb4a5f09e9c163 prep_message: >- out_share_0: - 3ead59ec98fe1c4f out_share_1: - c452a6136601e3b0 agg_share_0: >- 3ead59ec98fe1c4f agg_share_1: >- c452a6136601e3b0 agg_result: 1¶
bits: 8 verify_key: "000102030405060708090a0b0c0d0e0f" upload_0: measurement: 100 nonce: "000102030405060708090a0b0c0d0e0f" public_share: >- d6ba304b5e6fb668b98629cbaa51b5e780000a045a98af5f34a4d71abb6b7885 input_share_0: >- c61ac8678ff4456241ff7d9f2182d8b4d007ae72f80d4e7fba171b7f17cfa14aedfd 10de4bb9180493872144743b8ac975d273e07b0a347f5f9af84a1573bcaa610f093d 013ead7503e6ac003975ae0d840333d65e7f62c70d271360bd404b17d4116ba46a3e 71edbddd6abc15c8aaedb1b8931350544a138497d10eaf77733800be917b08d87ed5 38e3812cd447335f46fb984e2779b3324bc602c31fe4745c34c7c5251f13dc402760 ce65c9a16fce5f171b98a1f3c33d8e44ea7ad1f02ab5fe7acc05187f160ef5692369 a105f9a6339249936563891682f8ffa5690a479f9876c49a753e3e982c7186f74a19 16ad2ad2b2f926fc47e6c9d1bdd5584e46d3b5d72f8f5a81b2a3fe181670bc75aafa c4c56c189c913b3b32cb6d21b246738301568c7d5c323a7b0aaa28747364b1d1b42f f9a01a13b40c1af75d7e965ec20e18ca729419dcb88b0428b329447ff0ab30337525 a58e2a28ea47579fa7b44d490c3d050ad253e8633fe972c689259a7807d7d149b231 69a26879be85183a23c00b58060fb09672a8d1197e30065d403d8578110ce5d9608f cc2479f61a94e83d66e1493f77963700f4660aa8d16a51b47920c1e7b9b39ede9dc1 c4acad858bc1c66d2b813e2955a4a57106c7905cffd73cea619a58d339bd3e582280 9d154d0f9343f49d14c755cecbb770f38b18cdc6928bba24f5f5409527de57bb249e fb5f673c18bd0481d87876e80b59a8805ff95d4d826162c511b54c91d62824c5af0d c0ec1bf8debfec0e5ba26682ba7179ec7e68806170fb04821f6625063d6b1a12a6a8 423a6ee4b4561759978de0adce61db70a131840d3d52c1dd6c0e709c9c91236c15da 49b468ffbc4ebf0505756aced52055d811753e463e2f0fdceb0bcbfa303132333435 363738393a3b3c3d3e3f input_share_1: >- 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021 22232425262728292a2b2c2d2e2f round_0: prep_share_0: >- 5879339d691b9230058dd5b6fdcf804306454c963883a700ed8251ead70e6a6ddf 5c02433a304d03f0280080a6eab201d6ba304b5e6fb668b98629cbaa51b5e7 prep_share_1: >- a986cc6296e46dcfde722a4902307fbcba25e7e7175787207014a8a1972756b0af e901f95ba76723b68531c445e83d7680000a045a98af5f34a4d71abb6b7885 prep_message: >- f6011479e21b4ef3146e0b849423e360 out_share_0: - 6de9984430d882b37f9eb596feeee52e out_share_1: - f81667bbcf277d4c64614a6901111ad1 agg_share_0: >- 6de9984430d882b37f9eb596feeee52e agg_share_1: >- f81667bbcf277d4c64614a6901111ad1 agg_result: 100¶
length: 4 verify_key: "000102030405060708090a0b0c0d0e0f" upload_0: measurement: 2 nonce: "000102030405060708090a0b0c0d0e0f" public_share: >- 1a84cd1f7c84b403ef8471cc15158c84b21b5733b6f53176ed5b8d8174a288e9 input_share_0: >- fb788fb4dd1ada7c27fa1c6bd2f3ba3de3ea9c976900e67a80152e8d81603d516d08 98cddce70a38bc5e6228b1bc4b67b0c779b2b93e73b4da90cab872f0f51ccf5b5bbc e30773cb5b0227b1c52cb2de52087f365317fa8bb1e6c15c809096b02104cc2a4680 88ec6c8ad9dd1289a98e750ee469d1c78fbc1796d9b7d225f7b9410596d0bf27a093 14d240d91f8bd194d24fff76524c5044d0939b53ceb724b49d417fe853d707617baa 0c75e2d107bfa90725d50bbd691ed65e0e93f946091dff046e2cdf2fef9a4586a3f0 d4b69177b290d3e7cbea8f5d70dfc5376537f1952339366a834e97363f8e5a9fb0ab 08ea5902d19e64aa4bef980fb007928cc319fbd2e7254df43c5b803bf0b9656b9484 aa1f4354166af16282ba51722a5768ce718c895f7a0ed3b4cad2c23fe954d62d564f 23f30388da09f1641be3efccff94303132333435363738393a3b3c3d3e3f input_share_1: >- 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021 22232425262728292a2b2c2d2e2f round_0: prep_share_0: >- 960cec2ab69f328cc5e790b8a65852d2bac43ed54fb150d487415d2795383f406f d58ffe957f8ee525b8f2407d3ce5d71a84cd1f7c84b403ef8471cc15158c84 prep_share_1: >- 6bf313d54960cd731e186f4759a7ad2d71916f8a508640739726528e260a458f22 a5cf556e866033059eb5e147c974a8b21b5733b6f53176ed5b8d8174a288e9 prep_message: >- 6af47a4b7d91c14993d2a4d40c8d62d7 out_share_0: - fb788fb4dd1ada7c27fa1c6bd2f3ba3d - e3ea9c976900e67a80152e8d81603d51 - 6d0898cddce70a38bc5e6228b1bc4b67 - b0c779b2b93e73b4da90cab872f0f51c out_share_1: - 0687704b22e52583bc05e3942d0c45c2 - 1e15636896ff198563ead1727e9fc2ae - 95f767322318f5c727a19dd74e43b498 - 5138864d46c18c4b096f35478d0f0ae3 agg_share_0: >- fb788fb4dd1ada7c27fa1c6bd2f3ba3de3ea9c976900e67a80152e8d81603d516d0898 cddce70a38bc5e6228b1bc4b67b0c779b2b93e73b4da90cab872f0f51c agg_share_1: >- 0687704b22e52583bc05e3942d0c45c21e15636896ff198563ead1727e9fc2ae95f767 322318f5c727a19dd74e43b4985138864d46c18c4b096f35478d0f0ae3 agg_result: [0, 0, 1, 0]¶
verify_key: "000102030405060708090a0b0c0d0e0f" agg_param: (0, (0, 1)) upload_0: round_0: prep_share_0: >- 4195a4c56e1260647413dc5fa0f1822844fb8750eea70573 prep_share_1: >- 7e530646b6adb0632367eb0b0eb39d1a79ec88f7bbc98f50 prep_message: >- bfe8aa0b25c010c8977ac76baea42043bde71048aa7195c3 round_1: prep_share_0: >- 24a5193d7d5bf285 prep_share_1: >- dd5ae6c281a40d7a prep_message: >- out_share_0: - e457b2981c956b15 - 79813da9034552cd out_share_1: - 1da84d67e26a94ea - 897ec256fbbaad32 agg_share_0: >- e457b2981c956b1579813da9034552cd agg_share_1: >- 1da84d67e26a94ea897ec256fbbaad32 agg_result: [0, 1]¶
verify_key: "000102030405060708090a0b0c0d0e0f" agg_param: (1, (0, 1, 2, 3)) upload_0: round_0: prep_share_0: >- dda737bbd51e94c5a8ecd1b3276a402446ddcc2d21bbf6b7 prep_share_1: >- 74baf93771f3714c3b40466cb9cf19f180f48934c1f1db3d prep_message: >- 506231f347120612e22c1820e2395a15c6d15662e2acd2f5 round_1: prep_share_0: >- a30e360c7d7e51fc prep_share_1: >- 5ef1c9f38181ae03 prep_message: >- out_share_0: - 078e84648c4ae70c - ac7a8371234c4540 - 69b3af8cdff3b459 - 91579ac64d319d58 out_share_1: - fa717b9b72b518f3 - 55857c8edbb3babf - 984c50731f0c4ba6 - 71a86539b1ce62a7 agg_share_0: >- 078e84648c4ae70cac7a8371234c454069b3af8cdff3b45991579ac64d319d58 agg_share_1: >- fa717b9b72b518f355857c8edbb3babf984c50731f0c4ba671a86539b1ce62a7 agg_result: [0, 0, 0, 1]¶
verify_key: "000102030405060708090a0b0c0d0e0f" agg_param: (2, (0, 2, 4, 6)) upload_0: round_0: prep_share_0: >- 675359765228af1fe557ab25196a1ad1399ad4c7c4affc66 prep_share_1: >- c87431627147a136eac6fba1d3f4e6bcb57a9b2449f8fe21 prep_message: >- 2fc88ad8c36f5056ce1ea7c7ed5e018eee1470ec0da8fb88 round_1: prep_share_0: >- 621b1271c1ec7b4a prep_share_1: >- 9fe4ed8e3d1384b5 prep_message: >- out_share_0: - a05be48631d9376b - 66cac23e03c7ca6d - 882152745673ba29 - 1d096863ef00faf5 out_share_1: - 61a41b79cd26c894 - 9b353dc1fb383592 - 79dead8ba88c45d6 - e5f6979c0fff050a agg_share_0: >- a05be48631d9376b66cac23e03c7ca6d882152745673ba291d096863ef00faf5 agg_share_1: >- 61a41b79cd26c8949b353dc1fb38359279dead8ba88c45d6e5f6979c0fff050a agg_result: [0, 0, 0, 1]¶
verify_key: "000102030405060708090a0b0c0d0e0f" agg_param: (3, (1, 3, 5, 7, 9, 13, 15)) upload_0: round_0: prep_share_0: >- 5d26d73b85e6c726830478fe973d8b4687dffaf324399a3e62962ab71a41841a12 93b70acb36828229dd8ee4fb0d437c2270472054dcef8fba9eb43fb3bb18387cf1 38d5e13f9a4207d7026e112fe3e51e9d88688e4cb3105308ec5a2cdd4364 prep_share_1: >- 9a8537c1e41bd3d693b03ec522278178bda4454014ba800f4bea45d9c500b51330 0a144b10fc37e3e5cfdda0f698519ae6301c8d0b41f623c19b125d6fe35c76143e 6ec8752a598cec3b5316a1782eac1584b8be9e15f93ad4ecd70c4061d77d prep_message: >- f7ab0efd69029bfd16b5b6c3ba640cbf4484403439f31a4ead807090e041392e55 9dcb55db32ba650fad6c85f2a6941609a163ad5f1de6b37b3ac79c229f752ea32f a79d576af3cef3125684b2a71192342141272d62ac4b27f5c3676c3e1b62 round_1: prep_share_0: >- 537a1a1fcdbbb4042dac5afb5c995abef6ffcbf2cb8375a357fd6b4697c84a47 prep_share_1: >- 9a85e5e032444bfbd253a504a366a5410900340d347c8a5ca80294b96837b538 prep_message: >- out_share_0: - 0f33eec522414e75f7094646ee1ca7c22baba5bac4a02ce4ab1e812e21a34211 - 013454e2f0b4046dac7287eac25ae1c398c30e2f1797507b546eaa36bc67a454 - e56e12917baff2b8eb367a2d9fca0fad3dfd86e24f320589202f23ce34816834 - af5d42b895abad21f05f3e73924b4d45533d5f9c63542c71a3343e1bd97fa61b - 5a3348a91fc4111a88528cba84c009228b6a5817b6b541c077edfd801489ec38 - 0a511695baad2eb33150a7e13950e35a19abd5bf1bef81533f0229c9c45f0164 - 7dc5f3900c63255f1418d3af04abb642fc4f92b3cc25325bcc15e11caabf8038 out_share_1: - decc113addbeb18a08f6b9b911e3583dd4545a453b5fd31b54e17ed1de5cbd6e - eccbab1d0f4bfb92538d78153da51e3c673cf1d0e868af84ab9155c943985b2b - 0891ed6e84500d4714c985d26035f052c202791db0cdfa76dfd0dc31cb7e974b - 3ea2bd476a5452de0fa0c18c6db4b2baacc2a0639cabd38e5ccbc1e426805964 - 93ccb756e03beee577ad73457b3ff6dd7495a7e8494abe3f8812027feb761347 - e4aee96a4552d14cceaf581ec6af1ca5e6542a40e4107eacc0fdd6363ba0fe1b - 703a0c6ff39cdaa0ebe72c50fb5449bd03b06d4c33dacda433ea1ee355407f47 agg_share_0: >- 0f33eec522414e75f7094646ee1ca7c22baba5bac4a02ce4ab1e812e21a34211013454 e2f0b4046dac7287eac25ae1c398c30e2f1797507b546eaa36bc67a454e56e12917baf f2b8eb367a2d9fca0fad3dfd86e24f320589202f23ce34816834af5d42b895abad21f0 5f3e73924b4d45533d5f9c63542c71a3343e1bd97fa61b5a3348a91fc4111a88528cba 84c009228b6a5817b6b541c077edfd801489ec380a511695baad2eb33150a7e13950e3 5a19abd5bf1bef81533f0229c9c45f01647dc5f3900c63255f1418d3af04abb642fc4f 92b3cc25325bcc15e11caabf8038 agg_share_1: >- decc113addbeb18a08f6b9b911e3583dd4545a453b5fd31b54e17ed1de5cbd6eeccbab 1d0f4bfb92538d78153da51e3c673cf1d0e868af84ab9155c943985b2b0891ed6e8450 0d4714c985d26035f052c202791db0cdfa76dfd0dc31cb7e974b3ea2bd476a5452de0f a0c18c6db4b2baacc2a0639cabd38e5ccbc1e42680596493ccb756e03beee577ad7345 7b3ff6dd7495a7e8494abe3f8812027feb761347e4aee96a4552d14cceaf581ec6af1c a5e6542a40e4107eacc0fdd6363ba0fe1b703a0c6ff39cdaa0ebe72c50fb5449bd03b0 6d4c33dacda433ea1ee355407f47 agg_result: [0, 0, 0, 0, 0, 1, 0]¶