This commit is contained in:
Dmitry Vagner 2023-01-25 16:48:28 +07:00
parent 0eef28af66
commit 6e8d4a57a4
3 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,9 @@
// stack: cx, cy
%endmacro
// cost: 9; note this returns y, x for the output x + yi
/// Given z = x + iy: Fp254_2, return complex conjugate z': Fp254_2
/// where input is represented z.re, z.im and output as z'.im, z'.re
/// cost: 9; note this returns y, x for the output x + yi
%macro i9
// stack: a , b
DUP2

View File

@ -53,7 +53,7 @@ ecrecover_valid_input:
// stack: y, hash, r, s, retdest
DUP3
// stack: r, y, hash, x, s, retdest (r=x)
%inv_fp254_secp_scalar
%inverse_secp_scalar
// stack: r^(-1), y, hash, x, s, retdest
DUP1
// stack: r^(-1), r^(-1), y, hash, x, s, retdest

View File

@ -4,7 +4,7 @@
// Returns y * (x^-1) where the inverse is taken modulo N
%macro moddiv_secp_base
// stack: x, y
%inv_fp254_secp_base
%inverse_secp_base
// stack: x^-1, y
%mulmodn_secp_base
%endmacro