Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-28 12:38:41 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-28 12:38:41 +0400
commit646925daf65dc68f84a337bf1bda7ee0a116465e (patch)
treea7d0ac42bcfc3fc1cd7747f980aee911dd42a112 /core/src/main/java/org/bouncycastle/math
parent6bea16bc135e131eec93af93130cc1a1a1a916dd (diff)
Refactoring
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/ECPoint.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java b/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
index 51d01a39..ec3c3217 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
@@ -1215,15 +1215,15 @@ public abstract class ECPoint
case ECCurve.COORD_LAMBDA_AFFINE:
case ECCurve.COORD_LAMBDA_PROJECTIVE:
{
- // TODO The X == 0 stuff needs further thought
- if (this.isInfinity() || x.isZero())
+ ECFieldElement X = x, L = y;
+
+ if (this.isInfinity() || X.isZero())
{
- return y;
+ return L;
}
// Y is actually Lambda (X + Y/X) here; convert to affine value on the fly
- ECFieldElement X = x, L = y;
- ECFieldElement Y = L.subtract(X).multiply(X);
+ ECFieldElement Y = L.add(X).multiply(X);
if (ECCurve.COORD_LAMBDA_PROJECTIVE == coord)
{
ECFieldElement Z = zs[0];