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:
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1Curve.java29
1 files changed, 2 insertions, 27 deletions
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 bbb02701..c8443299 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
@@ -5,10 +5,9 @@ import java.math.BigInteger;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECFieldElement;
import org.bouncycastle.math.ec.ECPoint;
-import org.bouncycastle.math.field.FiniteFields;
import org.bouncycastle.util.encoders.Hex;
-public class SecP224R1Curve extends ECCurve
+public class SecP224R1Curve extends ECCurve.AbstractFp
{
public static final BigInteger q = new BigInteger(1,
Hex.decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"));
@@ -19,7 +18,7 @@ public class SecP224R1Curve extends ECCurve
public SecP224R1Curve()
{
- super(FiniteFields.getPrimeField(q));
+ super(q);
this.infinity = new SecP224R1Point(this, null, null);
@@ -74,30 +73,6 @@ public class SecP224R1Curve extends ECCurve
return new SecP224R1Point(this, x, y, zs, withCompression);
}
- protected ECPoint decompressPoint(int yTilde, BigInteger X1)
- {
- ECFieldElement x = fromBigInteger(X1);
- ECFieldElement alpha = x.square().add(getA()).multiply(x).add(getB());
- ECFieldElement beta = alpha.sqrt();
-
- //
- // if we can't find a sqrt we haven't got a point on the
- // curve - run!
- //
- if (beta == null)
- {
- throw new RuntimeException("Invalid point compression");
- }
-
- if (beta.testBitZero() != (yTilde == 1))
- {
- // Use the other root
- beta = beta.negate();
- }
-
- return new SecP224R1Point(this, x, beta, true);
- }
-
public ECPoint getInfinity()
{
return infinity;