Pairing check optimisation#1335
Conversation
|
cc. @yelhousni. |
There was a problem hiding this comment.
initial idea was to constrain the Fp12 scalingFactor to be in Fp6 to avoid additional check in-circuit as per 7.1 of https://eprint.iacr.org/2024/640. But this also should work and is sound IMO.
|
Yeah, This uses enums, known values (roots) and a custom Fq6 mul formulas. |
|
Actually in our case the scaling factor is even just 1 because we do the easy part (that kills the non-residue) before doing Novakovic-Eagen final exp check. But I kept the trivial multiplication by 1 just in case anyone would use this check right after the Miller loop. |
Description
Minor optimisation on residue witness scaling cofactor mul.
Changed it to E6 (from E12) for fewer constraints and logic gates.
Optimization Results By Curve
116709045868899900013879548116678245867099897853879428-308-180-216-120How has this been tested?
How has this been benchmarked?
Checklist:
golangci-lintdoes not output errors locallyAny dependent changes have been merged and published in downstream modulesI have added tests that prove my fix is effective or that my feature worksna