-
Notifications
You must be signed in to change notification settings - Fork 41
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
ECPAIRING test vectors #822
Comments
@OlivierBBB, @lorenzogentile404 - providing test inputs: Small points
Large points
|
@ivokub could you specify, in the cases described as "not necessarily satisfying curve equation", if they |
In case "not necessarily satisfying curve equation" the coordinates do not satisfy curve equations. I'm not sure about the trace - here we have ![]() |
I was looking at the wrong row, my bad. It seems you are in the |
But neither of the points is at infinity? func TestIsInfinity(t *testing.T) {
var p bn254.G1Affine
p.X.SetString("0x26d7d8759964ac70b4d5cdf698ad5f70da246752481ea37da637551a60a2a57f")
p.Y.SetString("0x13991eda70bd3bd91c43e7c93f8f89c949bd271ba8f9f5a38bce7248f1f6056b")
var q bn254.G2Affine
q.X.A0.SetString("0x13eb8555f322c3885846df8a505693a0012493a30c34196a529f964a684c0cb2")
q.X.A1.SetString("0x18335a998f3db61d3d0b63cd1371789a9a8a5ed4fb1a4adaa20ab9573251a9d0")
q.Y.A0.SetString("0x20494259608bfb4cd04716ba62e1350ce90d00d8af00a5170f46f59ae72d060c")
q.Y.A1.SetString("0x257a64fbc5a9cf9c3f7be349d09efa099305fe61f364c31c082ef6a81c815c1d")
if p.IsInfinity() {
t.Fatal("point is infinity")
}
if q.IsInfinity() {
t.Fatal("point is infinity")
}
} passes |
The issue was that I forgot to |
@ivokub Thank you for those points. Could you also provide us with the following:
I take it that the examples you provided were more or less random points, here I'm asking for test vectors of 2, 3 or even 4 pairs of points that would be output by a valid snark proof so that we can also test the "standard" case where the result is 1. |
Valid pairings
|
thanks @ivokub. Note that I inverted the order of imaginary and real parts since this is the way they appear in the trace and it was convenient to keep the same order in the code for me. |
Below is a description of many of the various tests scenarios which we should cover in the
arithmetization
to test it. We also include some tests (with large n's) that are of use potentially forGNARK + the glue
as they will test the circuit's ability to accumulate the results of Miller loops and do a large final exponentiation.The text was updated successfully, but these errors were encountered: