@Override
    @SuppressWarnings("unchecked")
    protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> aClass)
            throws InvalidParameterSpecException {
        if (aClass == ECParameterSpec.class) {
            return (T) curve.getECParameterSpec();
        } else if (aClass == ECGenParameterSpec.class) {
            return (T) new ECGenParameterSpec(curve.getCurveName());
        } else {
            throw new InvalidParameterSpecException("Unsupported class: " + aClass);
        }
    }
AlgorithmParameters implementation for elliptic curves.  The only supported encoding format is
ASN.1, as specified in RFC 3279, section 2.3.5.  However, only named curves are supported.
common/src/main/java/org/conscrypt/ECParameters.java