From 66d49caf3f89f4e559aad7d75514e57f8b6b63bf Mon Sep 17 00:00:00 2001 From: querolita Date: Wed, 11 Dec 2024 13:55:53 +0100 Subject: [PATCH] fix typo in sign of twisted add --- crypto/elliptic-curve.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/elliptic-curve.ts b/crypto/elliptic-curve.ts index 357c82fa..376859aa 100644 --- a/crypto/elliptic-curve.ts +++ b/crypto/elliptic-curve.ts @@ -798,7 +798,7 @@ function twistedAdd( let ax1x2 = mod(a * x1x2, p); let x3Num = mod(x1y2 + y1x2, p); - let y3Num = mod(y1y2 + ax1x2, p); + let y3Num = mod(y1y2 - ax1x2, p); let dx1x2y1y2 = mod(d * x1x2 * y1y2, p);