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:
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/ECCurve.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java b/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
index 6af49f0c..0d60bdbe 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
@@ -166,7 +166,7 @@ public abstract class ECCurve
for (int i = 0; i < points.length; ++i)
{
ECPoint p = points[i];
- if (!p.isNormalized())
+ if (null != p && !p.isNormalized())
{
zs[count] = p.getZCoord(0);
indices[count++] = i;
@@ -294,7 +294,11 @@ public abstract class ECCurve
for (int i = 0; i < points.length; ++i)
{
- checkPoint(points[i]);
+ ECPoint point = points[i];
+ if (null != point && this != point.getCurve())
+ {
+ throw new IllegalArgumentException("'points' entries must be null or on this curve");
+ }
}
}
@@ -700,10 +704,7 @@ public abstract class ECCurve
protected ECMultiplier createDefaultMultiplier()
{
- // TODO Check what's needed for Tau-support in lambda coordinates
- if (isKoblitz()
- && COORD_LAMBDA_AFFINE != getCoordinateSystem()
- && COORD_LAMBDA_PROJECTIVE != getCoordinateSystem())
+ if (isKoblitz())
{
return new WTauNafMultiplier();
}