This commit is contained in:
Paul Miller 2022-12-28 05:20:08 +00:00
parent 8b5819b12d
commit 1ab77b95dd
No known key found for this signature in database
GPG Key ID: 697079DA6878B89B

@ -263,7 +263,7 @@ export function twistedEdwards(curveDef: CurveType): CurveFn {
const A = modP((Y1 - X1) * (Y2 + X2));
const B = modP((Y1 + X1) * (Y2 - X2));
const F = modP(B - A);
if (F === _0n) return this.double(); // Same point.
if (F === _0n) return this.double(); // Same point. Tests say it doesn't affect timing
const C = modP(Z1 * _2n * T2);
const D = modP(T1 * _2n * Z2);
const E = D + C;