Skip to content

Commit

Permalink
Including zkronos optz
Browse files Browse the repository at this point in the history
  • Loading branch information
hecmas committed Mar 25, 2024
1 parent 037b410 commit dcd7ec6
Show file tree
Hide file tree
Showing 6 changed files with 2,775 additions and 524 deletions.
6 changes: 2 additions & 4 deletions main/ecrecover/FNSECP256K1/mulFnSecp256k1.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; RESOURCES:
; 1 arith + 4 steps
; 1 arith + 3 steps

mulFnSecp256k1:

; A·B + 0 = op (mod SECP256K1_N)
0 => C
%SECP256K1_N => D
${(A*B + C) % D} => E :ARITH_MOD

E => C :RETURN
${(A*B) % D} => C :ARITH_MOD, RETURN
6 changes: 2 additions & 4 deletions main/ecrecover/FPSECP256K1/addFpSecp256k1.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; RESOURCES:
; 1 arith + 4 steps
; 1 arith + 3 steps

addFpSecp256k1:

; A·1 + C = op (mod SECP256K1_P)
1 => B
%SECP256K1_P => D
${(A*B + C) % D} => E :ARITH_MOD

E => C :RETURN
${(A + C) % D} => C :ARITH_MOD, RETURN
Loading

0 comments on commit dcd7ec6

Please sign in to comment.