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-09-27 17:07:48 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-09-27 17:07:48 +0400
commit6711d5560a4a91cbc093b2c1a98d260a1b701479 (patch)
treefaad003728ce371d3afb9b757fe5a759d0ccc858 /prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java
parentcf62f1091900a1ced6b3bb976b6923c676f7c440 (diff)
Review EC code in the provider to ensure points are normalized to affine
coordinates and that this is checked by accessing coordinates using getAffine[XY]Coord methods
Diffstat (limited to 'prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java')
-rw-r--r--prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java b/prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java
index 02bf4533..2b1c3fae 100644
--- a/prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java
+++ b/prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ecgost/BCECGOST3410PrivateKey.java
@@ -126,8 +126,8 @@ public class BCECGOST3410PrivateKey
this.ecSpec = new ECParameterSpec(
ellipticCurve,
new ECPoint(
- dp.getG().getX().toBigInteger(),
- dp.getG().getY().toBigInteger()),
+ dp.getG().getAffineXCoord().toBigInteger(),
+ dp.getG().getAffineYCoord().toBigInteger()),
dp.getN(),
dp.getH().intValue());
}
@@ -159,8 +159,8 @@ public class BCECGOST3410PrivateKey
this.ecSpec = new ECParameterSpec(
ellipticCurve,
new ECPoint(
- dp.getG().getX().toBigInteger(),
- dp.getG().getY().toBigInteger()),
+ dp.getG().getAffineXCoord().toBigInteger(),
+ dp.getG().getAffineYCoord().toBigInteger()),
dp.getN(),
dp.getH().intValue());
}
@@ -171,8 +171,8 @@ public class BCECGOST3410PrivateKey
this.ecSpec = new ECParameterSpec(
ellipticCurve,
new ECPoint(
- spec.getG().getX().toBigInteger(),
- spec.getG().getY().toBigInteger()),
+ spec.getG().getAffineXCoord().toBigInteger(),
+ spec.getG().getAffineYCoord().toBigInteger()),
spec.getN(),
spec.getH().intValue());
}
@@ -216,8 +216,8 @@ public class BCECGOST3410PrivateKey
ECGOST3410NamedCurves.getName(gostParams.getPublicKeyParamSet()),
ellipticCurve,
new ECPoint(
- spec.getG().getX().toBigInteger(),
- spec.getG().getY().toBigInteger()),
+ spec.getG().getAffineXCoord().toBigInteger(),
+ spec.getG().getAffineYCoord().toBigInteger()),
spec.getN(), spec.getH());
ASN1Encodable privKey = info.parsePrivateKey();
@@ -251,8 +251,8 @@ public class BCECGOST3410PrivateKey
ECGOST3410NamedCurves.getName(oid),
ellipticCurve,
new ECPoint(
- gParam.getG().getX().toBigInteger(),
- gParam.getG().getY().toBigInteger()),
+ gParam.getG().getAffineXCoord().toBigInteger(),
+ gParam.getG().getAffineYCoord().toBigInteger()),
gParam.getN(),
gParam.getH());
}
@@ -264,8 +264,8 @@ public class BCECGOST3410PrivateKey
ECUtil.getCurveName(oid),
ellipticCurve,
new ECPoint(
- ecP.getG().getX().toBigInteger(),
- ecP.getG().getY().toBigInteger()),
+ ecP.getG().getAffineXCoord().toBigInteger(),
+ ecP.getG().getAffineYCoord().toBigInteger()),
ecP.getN(),
ecP.getH());
}
@@ -282,8 +282,8 @@ public class BCECGOST3410PrivateKey
this.ecSpec = new ECParameterSpec(
ellipticCurve,
new ECPoint(
- ecP.getG().getX().toBigInteger(),
- ecP.getG().getY().toBigInteger()),
+ ecP.getG().getAffineXCoord().toBigInteger(),
+ ecP.getG().getAffineYCoord().toBigInteger()),
ecP.getN(),
ecP.getH().intValue());
}