Ethereum provides pre-compiled contracts for alt_bn128 curve pairing check, and point addition and scalar multiplication on G1. However, I could not find any such thing for point addition and multiplication on G2. I am working on a paper designing a system that requires verifying one point multiplication on G2 once. I used a solidity library for that and a single G2 scalar multiplication used so much gas that, I had to check it indirectly, by doing scalar multiplication on G1 checking pairing. Is there some precompiled contract or something for G2? Or some library with a gas efficient G2 scalar multiplication. Or is scalar multiplication on G2 really less efficient than scalar multiplication on G1 + pairing.
1 Answer
Here is an image that includes the precompile info:
Source: https://medium.com/coinmonks/fuzzing-the-bls-precompiles-ba3728dec622.
You should likely find a more reputable source than a medium article but I'm sure you can narrow the search with the information from the precompile info provided.
-
Thanks. But I was looking for G2 in alt_bn128. Had I known about this I would have used bls12 from the get go. Commented Jan 22 at 21:06