Skip to content

Commit

Permalink
Remove captions from all code listings
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpatton committed Oct 8, 2024
1 parent 3bda1d8 commit 6c43671
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions draft-irtf-cfrg-vdaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,6 @@ def run_daf(
num_measurements)
return agg_result
~~~
{: #run-daf title="Execution of a DAF."}

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
Expand Down Expand Up @@ -1375,8 +1374,8 @@ methods:
share into an output share. Its inputs are the shared verification key
(`verify_key`), the application context (`ctx`), the Aggregator's unique
identifier (`agg_id`), the aggregation parameter (`agg_param`), the nonce
provided by the environment (`nonce`, see {{run-vdaf}}), the public share
(`public_share`), and one of the input shares generated by the Client
provided by the environment (`nonce`, see {{vdaf-execution}}), 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 and
initial prep share.

Expand Down Expand Up @@ -1575,7 +1574,6 @@ def run_vdaf(
num_measurements)
return agg_result
~~~
{: #run-vdaf title="Execution of a VDAF."}

The inputs to this algorithm are the aggregation parameter, a list of
measurements, and a nonce for each measurement. This document does not specify
Expand Down Expand Up @@ -2019,7 +2017,6 @@ def decode_vec(cls, encoded: bytes) -> list[Self]:
vec.append(cls(x))
return vec
~~~
{: #field-derived-methods title="Derived class methods for finite fields."}

Finally, `Field` implements the following methods for representing a value as
a sequence of field elements, each of which represents a bit of the input.
Expand Down Expand Up @@ -2062,7 +2059,6 @@ def decode_from_bit_vector(cls, vec: list[Self]) -> Self:
decoded += cls(1 << l) * bit
return decoded
~~~
{: #field-bit-rep title="Derived class methods to encode integers into bit vector representation."}

### Auxiliary Functions

Expand All @@ -2089,7 +2085,6 @@ def vec_neg(vec: list[F]) -> list[F]:
"""Negate the input vector."""
return list(map(lambda x: -x, vec))
~~~
{: #field-helper-functions title="Common functions for finite fields."}

### NTT-Friendly Fields {#field-ntt-friendly}

Expand Down Expand Up @@ -2202,7 +2197,6 @@ def expand_into_vec(cls,
xof = cls(seed, dst, binder)
return xof.next_vec(field, length)
~~~
{: #xof-derived-methods title="Derived methods for XOFs."}

### XofTurboShake128 {#xof-turboshake128}

Expand Down Expand Up @@ -2241,7 +2235,6 @@ class XofTurboShake128(Xof):
stream = TurboSHAKE128(self.m, 1, self.l)
return stream[-length:]
~~~
{: title="Definition of XOF XofTurboShake128."}

### XofFixedKeyAes128 {#xof-fixed-key-aes128}

Expand Down Expand Up @@ -2520,7 +2513,6 @@ def run_flp(
# Verifier decides if the measurement is valid.
return flp.decide(verifier)
~~~
{: #run-flp title="Execution of an FLP."}

The proof system is constructed so that, if `meas` is valid, then `run_flp(flp,
meas, 1)` always returns `True`. On the other hand, if `meas` is invalid, then
Expand Down Expand Up @@ -2697,14 +2689,13 @@ def shard(
else:
return self.shard_without_joint_rand(ctx, meas, seeds)
~~~
{: #prio3-eval-input title="Input-distribution algorithm for Prio3."}

It starts by splitting the randomness into seeds. It then encodes the
measurement as prescribed by the FLP and calls one of two methods, depending on
whether joint randomness is required by the FLP. The methods are defined in the
subsections below.

#### FLPs without joint randomness
#### FLPs without joint randomness {#prio3-shard-without-joint-rand}

The following method is used for FLPs that do not require joint randomness,
i.e., when `flp.JOINT_RAND_LEN == 0`:
Expand Down Expand Up @@ -2760,7 +2751,6 @@ def shard_without_joint_rand(
))
return (None, input_shares)
~~~
{: #prio3-shard-without-joint-rand title="Sharding an encoded measurement without joint randomness."}

The steps in this method are as follows:

Expand Down Expand Up @@ -2858,7 +2848,6 @@ def shard_with_joint_rand(
))
return (joint_rand_parts, input_shares)
~~~
{: #prio3-shard-with-joint-rand title="Sharding an encoded measurement with joint randomness."}

The difference between this procedure and previous one is that here we compute
joint randomnesses `joint_rands`, split it into multiple `joint_rand`, and pass
Expand Down Expand Up @@ -3013,7 +3002,6 @@ def prep_shares_to_prep(
joint_rand_seed = self.joint_rand_seed(ctx, joint_rand_parts)
return joint_rand_seed
~~~
{: #prio3-prep-state title="Preparation state for Prio3."}

### Validity of Aggregation Parameters

Expand All @@ -3031,7 +3019,6 @@ def is_valid(
"""
return len(previous_agg_params) == 0
~~~
{: #prio3-validity-scope title="Validity of aggregation parameters for Prio3."}

### Aggregation

Expand All @@ -3048,7 +3035,6 @@ def aggregate(
agg_share = vec_add(agg_share, out_share)
return agg_share
~~~
{: #prio3-out2agg title="Aggregation algorithm for Prio3."}

### Unsharding

Expand All @@ -3066,7 +3052,6 @@ def unshard(
agg = vec_add(agg, agg_share)
return self.flp.decode(agg, num_measurements)
~~~
{: #prio3-agg-output title="Computation of the aggregate result for Prio3."}

### Auxiliary Functions {#prio3-auxiliary}

Expand Down Expand Up @@ -4348,7 +4333,6 @@ def eval(
| `AggResult` | `list[int]` |
{: title="Parameters of validity circuit MultihotCountVec."}


# Poplar1 {#poplar1}

This section specifies Poplar1, a VDAF for the following task. Each Client
Expand Down Expand Up @@ -4718,7 +4702,6 @@ def shard(
input_shares = list(zip(keys, corr_seed, corr_inner, corr_leaf))
return (public_share, input_shares)
~~~
{: #poplar1-mes2inp title="The sharding algorithm for Poplar1."}

### Preparation {#poplar1-prep}

Expand Down Expand Up @@ -4889,7 +4872,6 @@ def prep_shares_to_prep(
else:
raise ValueError('incorrect sketch length')
~~~
{: #poplar1-prep-state title="Preparation state for Poplar1."}

### Validity of Aggregation Parameters

Expand Down Expand Up @@ -4938,8 +4920,6 @@ def is_valid(
return False
return True
~~~
{: #poplar1-validity-scope title="Validity of aggregation parameters for
Poplar1."}

### Aggregation

Expand All @@ -4957,7 +4937,6 @@ def aggregate(
agg_share = vec_add(agg_share, cast(list[Field], out_share))
return cast(FieldVec, agg_share)
~~~
{: #poplar1-out2agg title="Aggregation algorithm for Poplar1."}

### Unsharding

Expand All @@ -4977,7 +4956,6 @@ def unshard(
agg = vec_add(agg, cast(list[Field], agg_share))
return [x.as_unsigned() for x in agg]
~~~
{: #poplar1-agg-output title="Computation of the aggregate result for Poplar1."}

### Message Serialization {#poplar1-encode}

Expand Down Expand Up @@ -5365,7 +5343,6 @@ def gen(
public_share.append((seed_cw, ctrl_cw, w_cw))
return (public_share, key)
~~~
{: #idpf-bbcggi21-gen title="IDPF-key generation algorithm of BBCGGI21."}

### Key Evaluation

Expand Down Expand Up @@ -5481,7 +5458,6 @@ def eval_next(

return (next_seed, next_ctrl, cast(FieldVec, y))
~~~
{: #idpf-bbcggi21-eval title="IDPF-evaluation generation algorithm of BBCGGI21."}

### Auxiliary Functions {#idpf-bbcggi21-helper-functions}

Expand Down Expand Up @@ -5536,7 +5512,6 @@ def current_xof(self,
return XofFixedKeyAes128(seed, dst, nonce)
return XofTurboShake128(seed, dst, nonce)
~~~
{: #idpf-bbcggi21-helpers title="Helper functions for the IDPF."}

## Instantiation {#poplar1-inst}

Expand Down

0 comments on commit 6c43671

Please sign in to comment.