summary refs log tree commit diff
path: root/crypto/src/math
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-28 15:39:19 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-28 15:39:19 +0700
commit72b1c6689870a7e0e1a0946e5862e54a2a5bdd4f (patch)
tree71cad24f4be4ffee3f07417e0171eaefba127678 /crypto/src/math
parentAvoid division when decompressing a lambda-projective point (diff)
downloadBouncyCastle.NET-ed25519-72b1c6689870a7e0e1a0946e5862e54a2a5bdd4f.tar.xz
Refactoring
Diffstat (limited to 'crypto/src/math')
-rw-r--r--crypto/src/math/ec/ECPoint.cs3
1 files changed, 1 insertions, 2 deletions
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];