junyechen1996 / draft-chen-cfrg-vdaf-pine

VDAF to support aggregating real number vectors with L2-norm bound
Other
5 stars 0 forks source link

Use squaring gadget to compute the squared norm #97

Closed cjpatton closed 2 months ago

cjpatton commented 2 months ago

Based on #96 (merge that first).

The PineValidNormEquality circuit uses the Mul gadget to square each element of the encoded gradient, i.e., Mul(x, x) = x^2. We could instead use PolyEval to square each x, which reduces the arity of gadget by a factor of 2. This pays off especially when we use ParallelSum, as the arity counts against the size of the proof and verifier.

In Daphne's benchmarks, this improves prove time 14% and query time by 50% after re-tuning the chunk length so that the proof and verifier are as large as before. (We see a more modest improvement with a smaller chunk length.) This equates in a 3% improvement in shard time and a 5% improvement in prep time.

cjpatton commented 2 months ago

Rebased.