You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: multiply R and Hr by the cofactor before hashing,
dleq_verify: multiply c and s by the cofactor so that R and Hr get multiplied by the cofactor
shorten_dleq and vrf_verify_batch: multiply R and Hr by 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.
The text was updated successfully, but these errors were encountered:
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
: multiplyR
andHr
by the cofactor before hashing,dleq_verify
: multiplyc
ands
by the cofactor so thatR
andHr
get multiplied by the cofactorshorten_dleq
andvrf_verify_batch
: multiplyR
andHr
by the cofactor directlyWe could however only push
Hr
andc * pk
into the prime order subgroup, and avoid doing so forR
, 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 andshorten_dleq
.The text was updated successfully, but these errors were encountered: