This commit is contained in:
Dmitry Vagner 2023-04-19 23:34:50 -07:00
parent 82bca7fa34
commit 099c4b9702
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@
global bn254_pairing:
// stack: k, inp, out, retdest
%jump(bn254_pairing_loop) // this short circuits the input checks
DUP1
// stack: k, k, inp, out, retdest

View File

@ -1,9 +1,9 @@
// Check if (X,Y) is a valid curve point.
// Returns (range & curve) || is_identity
// Returns (range & curve) || ident
// where
// range = (x < N) & (x_ < N) & (y < N) & (y_ < N)
// curve = Y^2 == X^3 + A
// ident = (x,y) == (0,0)
// ident = (X,Y) == (0,0)
%macro bn_check_twisted
// stack: x, x_, y, y_