-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
We do not currently force the VRF pre-output to lie in the prime order subgroup, but instead ask users call VRFInOut::make_ methods. In schnorrkel, if users missues the VRF pre-outout ala paritytech/substrate#5785 then they only loose the random oracle assumption or whatever, but here our cofactor creates a real exploit. We should maybe fix this by force the VRF pre-output to lie in the prime order subgroup.
I think this approach works cleanly:
dleq_proove: multiplyRandHrby the cofactor before hashing,dleq_verify: multiplycandsby the cofactor so thatRandHrget multiplied by the cofactorshorten_dleqandvrf_verify_batch: multiplyRandHrby the cofactor directly
We could however only push Hr and c * pk into the prime order subgroup, and avoid doing so for R, which marginally speeds up verification and might improve something somehow.
I'd rather address some zcash issues first though, so that vrf_verify_batch works and tests work for it and shorten_dleq.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels