This commit is contained in:
Dmitry Vagner 2023-04-24 08:08:26 -07:00
parent 2620446128
commit 0f662ed043
2 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@
/// return result == @GENERATOR_PAIRING
global bn254_pairing:
// stack:
// stack: k, inp, out, retdest
DUP1
bn254_input_check:
@ -134,7 +134,7 @@ bn254_pairing_output_validation:
// stack: checkj, out, check
%stack (checkj, out, check) -> (check, checkj, out)
// stack: check, checkj, out
AND
MUL
// stack: check, out
%endmacro

View File

@ -11,7 +11,7 @@
// stack: range, x, x_, y, y_
%bn_check_twisted_curve
// stack: curve , range, x, x_, y, y_
AND
MUL // Cheaper than AND
// stack: curve & range, x, x_, y, y_
SWAP4
// stack: y_, x, x_, y, curve & range
@ -49,9 +49,9 @@
// stack: x , N, x_ < N, y < N, y_ < N, x, x_, y, y_
LT
// stack: x < N, x_ < N, y < N, y_ < N, x, x_, y, y_
AND
AND
AND
MUL // Cheaper than AND
MUL // Cheaper than AND
MUL // Cheaper than AND
// stack: range, x, x_, y, y_
%endmacro
@ -88,7 +88,7 @@
// stack: b , c==0, d==0, a==0
ISZERO
// stack: b==0, c==0, d==0, a==0
AND
AND
AND
MUL // Cheaper than AND
MUL // Cheaper than AND
MUL // Cheaper than AND
%endmacro