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-03-12 11:46:56 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-12 11:46:56 +0400
commitd81aefcbd4adf972b04133a2c52f890351dfbcf7 (patch)
treeafc1087133fc45d7b04eff209b9704440f1db7d5 /core/src/main/java/org
parentcd3c8c4acda48c28730a162c24a5944c0c3cb39e (diff)
Add new createRawPoint method on ECCurve that includes the Z coords
Diffstat (limited to 'core/src/main/java/org')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/ECCurve.java12
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224K1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP384R1Curve.java5
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP521R1Curve.java5
9 files changed, 52 insertions, 0 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 11cc2683..f9418d63 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
@@ -111,6 +111,8 @@ public abstract class ECCurve
protected abstract ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, boolean withCompression);
+ protected abstract ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression);
+
protected ECMultiplier createDefaultMultiplier()
{
return new WNafL2RMultiplier();
@@ -463,6 +465,11 @@ public abstract class ECCurve
return new ECPoint.Fp(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new ECPoint.Fp(this, x, y, zs, withCompression);
+ }
+
public ECPoint importPoint(ECPoint p)
{
if (this != p.getCurve() && this.getCoordinateSystem() == COORD_JACOBIAN && !p.isInfinity())
@@ -824,6 +831,11 @@ public abstract class ECCurve
return new ECPoint.F2m(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new ECPoint.F2m(this, x, y, zs, withCompression);
+ }
+
public ECPoint getInfinity()
{
return infinity;
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java
index b26348cd..cd122b63 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java
@@ -68,6 +68,11 @@ public class SecP192K1Curve extends ECCurve
return new SecP192K1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP192K1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java
index 8e00c5bc..5491609b 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java
@@ -69,6 +69,11 @@ public class SecP192R1Curve extends ECCurve
return new SecP192R1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP192R1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224K1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224K1Curve.java
index 4580da4e..44598908 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224K1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224K1Curve.java
@@ -67,6 +67,11 @@ public class SecP224K1Curve extends ECCurve
return new SecP224K1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP224K1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java
index 598b4a72..bbb02701 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java
@@ -69,6 +69,11 @@ public class SecP224R1Curve extends ECCurve
return new SecP224R1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP224R1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java
index 39c730d1..2bd04a1f 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java
@@ -67,6 +67,11 @@ public class SecP256K1Curve extends ECCurve
return new SecP256K1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP256K1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java
index f27ac876..ae3bfacb 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java
@@ -69,6 +69,11 @@ public class SecP256R1Curve extends ECCurve
return new SecP256R1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP256R1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP384R1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP384R1Curve.java
index ede502e2..ad37b0cd 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP384R1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP384R1Curve.java
@@ -69,6 +69,11 @@ public class SecP384R1Curve extends ECCurve
return new SecP384R1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP384R1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP521R1Curve.java b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP521R1Curve.java
index b58e34b7..ea42b578 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP521R1Curve.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP521R1Curve.java
@@ -69,6 +69,11 @@ public class SecP521R1Curve extends ECCurve
return new SecP521R1Point(this, x, y, withCompression);
}
+ protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression)
+ {
+ return new SecP521R1Point(this, x, y, zs, withCompression);
+ }
+
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);