Java 类org.bouncycastle.asn1.eac.ECDSAPublicKey 实例源码

项目:ipack    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();
               // TODO: update to use JDK 1.5 EC API
    ECParameterSpec ecspec = new ECParameterSpec(curve, G, order, coFactor);

    return ecspec;
}
项目:Aki-SSL    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB(), key.getOrderOfBasePointR(), key.getCofactorF());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();

    EllipticCurve jcaCurve = convertCurve(curve);

    return new ECParameterSpec(jcaCurve, new java.security.spec.ECPoint(G.getAffineXCoord().toBigInteger(), G.getAffineYCoord().toBigInteger()), order, coFactor.intValue());
}
项目:irma_future_id    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();
               // TODO: update to use JDK 1.5 EC API
    ECParameterSpec ecspec = new ECParameterSpec(curve, G, order, coFactor);

    return ecspec;
}
项目:irma_future_id    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();

    ECParameterSpec ecspec = new ECParameterSpec(curve, G, order, coFactor);

    return ecspec;
}
项目:bc-java    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();
               // TODO: update to use JDK 1.5 EC API
    ECParameterSpec ecspec = new ECParameterSpec(curve, G, order, coFactor);

    return ecspec;
}
项目:bc-java    文件:JcaPublicKeyConverter.java   
private ECParameterSpec getParams(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB());

    ECPoint G = curve.decodePoint(key.getBasePointG());

    BigInteger order = key.getOrderOfBasePointR();
    BigInteger coFactor = key.getCofactorF();

    ECParameterSpec ecspec = new ECParameterSpec(curve, G, order, coFactor);

    return ecspec;
}
项目:Aki-SSL    文件:JcaPublicKeyConverter.java   
private java.security.spec.ECPoint getPublicPoint(ECDSAPublicKey key)
{
    if (!key.hasParameters())
    {
        throw new IllegalArgumentException("Public key does not contains EC Params");
    }

    BigInteger p = key.getPrimeModulusP();
    ECCurve.Fp curve = new ECCurve.Fp(p, key.getFirstCoefA(), key.getSecondCoefB(), key.getOrderOfBasePointR(), key.getCofactorF());

    ECPoint.Fp pubY = (ECPoint.Fp)curve.decodePoint(key.getPublicPointY());

    return new java.security.spec.ECPoint(pubY.getAffineXCoord().toBigInteger(), pubY.getAffineYCoord().toBigInteger());
}