From 72b1c6689870a7e0e1a0946e5862e54a2a5bdd4f Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 28 Jan 2014 15:39:19 +0700 Subject: Refactoring --- crypto/src/math/ec/ECPoint.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/math/ec/ECPoint.cs b/crypto/src/math/ec/ECPoint.cs index bc7a1e04c..d26cfb914 100644 --- a/crypto/src/math/ec/ECPoint.cs +++ b/crypto/src/math/ec/ECPoint.cs @@ -1204,12 +1204,11 @@ namespace Org.BouncyCastle.Math.EC { ECFieldElement X = RawXCoord, L = RawYCoord; - // TODO The X == 0 stuff needs further thought if (this.IsInfinity || X.IsZero) return L; // Y is actually Lambda (X + Y/X) here; convert to affine value on the fly - ECFieldElement Y = L.Subtract(X).Multiply(X); + ECFieldElement Y = L.Add(X).Multiply(X); if (ECCurve.COORD_LAMBDA_PROJECTIVE == coord) { ECFieldElement Z = RawZCoords[0]; -- cgit 1.4.1