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>2013-10-02 09:02:14 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-10-02 09:02:14 +0400
commit1c3de12b547d91cb19987e7ef6e666bd383bd9e7 (patch)
treec1ae2de100e5a280d64979c4630fbd74c32b39ee /core/src/main/java/org/bouncycastle/math
parentad4a8568c646b1f87c14f15aab82b9f13a4eab74 (diff)
Allow null entries in the argument to normalizeAll
Always return WTauNafMultiplier as default for koblitz curves
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-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();
}