}
JCEECPrivateKey(
PrivateKeyInfo info)
{
X962Parameters params = new X962Parameters((DERObject)info.getAlgorithmId().getParameters());
if (params.isNamedCurve())
{
DERObjectIdentifier oid = (DERObjectIdentifier)params.getParameters();
X9ECParameters ecP = ECUtil.getNamedCurveByOid(oid);
if (ecP == null) // GOST Curve
{
ECDomainParameters gParam = ECGOST3410NamedCurves.getByOID(oid);
EllipticCurve ellipticCurve = EC5Util.convertCurve(gParam.getCurve(), gParam.getSeed());
ecSpec = new ECNamedCurveSpec(
ECGOST3410NamedCurves.getName(oid),
ellipticCurve,
new ECPoint(
gParam.getG().getX().toBigInteger(),
gParam.getG().getY().toBigInteger()),
gParam.getN(),
gParam.getH());
}
else
{
EllipticCurve ellipticCurve = EC5Util.convertCurve(ecP.getCurve(), ecP.getSeed());
ecSpec = new ECNamedCurveSpec(
ECUtil.getCurveName(oid),
ellipticCurve,
new ECPoint(
ecP.getG().getX().toBigInteger(),
ecP.getG().getY().toBigInteger()),
ecP.getN(),
ecP.getH());
}
}
else if (params.isImplicitlyCA())
{
ecSpec = null;
}
else
{
X9ECParameters ecP = new X9ECParameters((ASN1Sequence)params.getParameters());
EllipticCurve ellipticCurve = EC5Util.convertCurve(ecP.getCurve(), ecP.getSeed());
this.ecSpec = new ECParameterSpec(
ellipticCurve,
new ECPoint(