-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: fixed-argument emulated pairing #708
Conversation
For a single fixed-argument BN254 pairing, i.e.
For a double BN254 pairing where only one is fixed-argument, i.e.
Same goes for BLS12-381. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few changes:
- for native I just made the computated lines private.
- for emulated I made the computed lines private and also initalise lazily as there is small overhead. It is not significant, but in the future when we maybe want to provide fixed point as a paremeter, then it is bigger.
Otherwise looks good as always!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your modifications also approved.
This PR adds circuits for emulated pairing
e(P,G₂)
ande(P,G₂)*e(T,Q)
whereG₂
is a fixed point (the canonical generator of the G2 subgroup). The idea is to precompute all the lines and avoid to do EC arithmetic in-circuit. This scenario happens for e.g. BLS signature (minimal-signature-size variant) and KZG.TODO for later PRs:
G₂
(KZG has 2 pairings, one with fixedG₂
and one with fixed[α]G₂
from the SRS)