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-31 11:02:48 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-31 11:02:48 +0400
commit3c6cfaed001e5a9596fe05aff7f2e52efde4d065 (patch)
tree6ef9bae2d08d953122533d11dbc04d11312008ac /core/src/main/java/org/bouncycastle/math
parentce1c1983752593fb888bd3f65bb70e6ed850b4e2 (diff)
Refactor decompressPoint in custom curves
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192K1Curve.java2
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP192R1Curve.java2
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256K1Curve.java2
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP256R1Curve.java2
4 files changed, 4 insertions, 4 deletions
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 10bd7537..b26348cd 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
@@ -71,7 +71,7 @@ public class SecP192K1Curve extends ECCurve
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
- ECFieldElement alpha = x.square().add(a).multiply(x).add(b);
+ ECFieldElement alpha = x.square().multiply(x).add(getB());
ECFieldElement beta = alpha.sqrt();
//
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 24147fe6..8e00c5bc 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
@@ -72,7 +72,7 @@ public class SecP192R1Curve extends ECCurve
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
- ECFieldElement alpha = x.square().add(a).multiply(x).add(b);
+ ECFieldElement alpha = x.square().add(getA()).multiply(x).add(getB());
ECFieldElement beta = alpha.sqrt();
//
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 5f5f17cf..39c730d1 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
@@ -70,7 +70,7 @@ public class SecP256K1Curve extends ECCurve
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
- ECFieldElement alpha = x.square().add(a).multiply(x).add(b);
+ ECFieldElement alpha = x.square().multiply(x).add(getB());
ECFieldElement beta = alpha.sqrt();
//
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 d0a49b9e..f27ac876 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
@@ -72,7 +72,7 @@ public class SecP256R1Curve extends ECCurve
protected ECPoint decompressPoint(int yTilde, BigInteger X1)
{
ECFieldElement x = fromBigInteger(X1);
- ECFieldElement alpha = x.square().add(a).multiply(x).add(b);
+ ECFieldElement alpha = x.square().add(getA()).multiply(x).add(getB());
ECFieldElement beta = alpha.sqrt();
//