Skip to content

Commit f53358c

Browse files
authored
Update ecdsa.py
1 parent 4a46a45 commit f53358c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ellipticcurve/ecdsa.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ def verify(cls, message, signature, publicKey, hashfunc=sha256):
3737
u1 = Math.multiply(curve.G, n=(numberMessage * inv) % curve.N, A=curve.A, P=curve.P, N=curve.N)
3838
u2 = Math.multiply(publicKey.point, n=(sigR * inv) % curve.N, A=curve.A, P=curve.P, N=curve.N)
3939
add = Math.add(u1, u2, P=curve.P, A=curve.A)
40-
return sigR == add.x
40+
modX = add.x % curve.N
41+
return sigR == modX

0 commit comments

Comments
 (0)