Skip to content

Commit 48c3b6a

Browse files
committed
ed25519: Fix isEqual to handle points with Z=0.
1 parent b3ea082 commit 48c3b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sign/ed25519/point.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (P *pointR1) isEqual(Q *pointR1) bool {
164164
fp.Mul(r, r, &P.z)
165165
fp.Sub(l, l, r)
166166
b = b && fp.IsZero(l)
167-
return b
167+
return b && !fp.IsZero(&P.z) && !fp.IsZero(&Q.z)
168168
}
169169

170170
func (P *pointR3) neg() {

0 commit comments

Comments
 (0)