Skip to content

Commit

Permalink
Update ecdsa.py
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan authored May 7, 2021
1 parent 4a46a45 commit f53358c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ellipticcurve/ecdsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ def verify(cls, message, signature, publicKey, hashfunc=sha256):
u1 = Math.multiply(curve.G, n=(numberMessage * inv) % curve.N, A=curve.A, P=curve.P, N=curve.N)
u2 = Math.multiply(publicKey.point, n=(sigR * inv) % curve.N, A=curve.A, P=curve.P, N=curve.N)
add = Math.add(u1, u2, P=curve.P, A=curve.A)
return sigR == add.x
modX = add.x % curve.N
return sigR == modX

0 comments on commit f53358c

Please sign in to comment.