Skip to content

Commit a20db21

Browse files
committed
Clarify description of FLP consistency checks
1 parent 9825c28 commit a20db21

2 files changed

Lines changed: 27 additions & 9 deletions

File tree

draft-irtf-cfrg-vdaf.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4022,8 +4022,13 @@ def query(self,
40224022

40234023
# To test the gadget, we re-compute the wire polynomials and
40244024
# check for consistency with the gadget polynomial provided
4025-
# by the prover. To start, evaluate the gadget polynomial
4026-
# and each of the wire polynomials at the random point `t`.
4025+
# by the prover. Here, we evaluate secret shares of the
4026+
# gadget polynomial and secret shares of each of the wire
4027+
# polynomials at the random point `t`. These secret shares
4028+
# will be combined into polynomial evaluations at `t` when
4029+
# verifier shares are combined into a verifier message.
4030+
# Then, the `decide()` procedure will perform nonlinear
4031+
# computations and the final consistency checks.
40274032
wire_checks = lag.poly_eval_batched(g.wires[:g.ARITY], t)
40284033
gadget_check = lag.poly_eval(g.poly, t)
40294034

@@ -4050,11 +4055,13 @@ The decision algorithm consumes the verifier message. (Each of the Aggregators
40504055
computes an additive share of the verifier message after the previous step.) The
40514056
verifier message consists of the reduced circuit output and the gadget tests.
40524057

4053-
To finish each gadget test, evaluate the gadget on the wire checks: if the
4058+
To finish each gadget test, evaluate the gadget on the evaluations of the wire
4059+
polynomials parsed from the verifier message: if the
40544060
encoded measurement and joint randomness used to generate the proof are the
40554061
same as the measurement (share) and joint randomness used to verify the proof,
4056-
then the output of the gadget will be equal to the gadget check; otherwise, the
4057-
output will not equal the gadget check with high probability.
4062+
then the output of the gadget will be equal to the evaluation of the wire
4063+
polynomial in the verifier message; otherwise, the
4064+
output will not equal the gadget polynomial evaluation with high probability.
40584065

40594066
~~~ python
40604067
def decide(self, verifier: list[F]) -> bool:
@@ -4063,7 +4070,10 @@ def decide(self, verifier: list[F]) -> bool:
40634070
if v != self.field(0):
40644071
return False
40654072

4066-
# Complete each gadget test.
4073+
# Complete each gadget test. Check if the evaluations of gadget
4074+
# polynomials are consistent with evaluations of wire polynomials
4075+
# by evaluating the gadgets on the evaluations of the wire
4076+
# polynomials.
40674077
for g in self.valid.GADGETS:
40684078
(wire_checks, verifier) = front(g.ARITY, verifier)
40694079
([gadget_check], verifier) = front(1, verifier)

poc/vdaf_poc/flp_bbcggi19.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,13 @@ def query(self,
464464

465465
# To test the gadget, we re-compute the wire polynomials and
466466
# check for consistency with the gadget polynomial provided
467-
# by the prover. To start, evaluate the gadget polynomial
468-
# and each of the wire polynomials at the random point `t`.
467+
# by the prover. Here, we evaluate secret shares of the
468+
# gadget polynomial and secret shares of each of the wire
469+
# polynomials at the random point `t`. These secret shares
470+
# will be combined into polynomial evaluations at `t` when
471+
# verifier shares are combined into a verifier message.
472+
# Then, the `decide()` procedure will perform nonlinear
473+
# computations and the final consistency checks.
469474
wire_checks = lag.poly_eval_batched(g.wires[:g.ARITY], t)
470475
gadget_check = lag.poly_eval(g.poly, t)
471476

@@ -482,7 +487,10 @@ def decide(self, verifier: list[F]) -> bool:
482487
if v != self.field(0):
483488
return False
484489

485-
# Complete each gadget test.
490+
# Complete each gadget test. Check if the evaluations of gadget
491+
# polynomials are consistent with evaluations of wire polynomials
492+
# by evaluating the gadgets on the evaluations of the wire
493+
# polynomials.
486494
for g in self.valid.GADGETS:
487495
(wire_checks, verifier) = front(g.ARITY, verifier)
488496
([gadget_check], verifier) = front(1, verifier)

0 commit comments

Comments
 (0)