diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-28 15:39:19 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-28 15:39:19 +0700 |
commit | 72b1c6689870a7e0e1a0946e5862e54a2a5bdd4f (patch) | |
tree | 71cad24f4be4ffee3f07417e0171eaefba127678 /crypto | |
parent | Avoid division when decompressing a lambda-projective point (diff) | |
download | BouncyCastle.NET-ed25519-72b1c6689870a7e0e1a0946e5862e54a2a5bdd4f.tar.xz |
Refactoring
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/math/ec/ECPoint.cs | 3 |
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]; |