cfrg/draft-irtf-cfrg-vdaf

Review: 05: Chris Wood: Branching in Prio3 reduces readability

Closed this issue · 1 comments

In particular, the sharding and preparation algorithms have lots of branching for generating joint randomness or not (depending on if JOINT_RAND_LEN == 0). Figure out how to refactor these algorithms so that the branching logic is handled by auxiliary functions.

The sharding algorithm is now much more clear. While technically we could add variants for preparation with and without joint randomness, I think the gains here would be less significant, as the code is already pretty short.

Closing this as completed.