public static CurveType fromParameterSpec(ECParameterSpec spec)
        throws GeneralSecurityException {
      if (EllipticCurvesUtil.isSameEcParameterSpec(spec, NIST_P256.toParameterSpec())) {
        return NIST_P256;
      }
      if (EllipticCurvesUtil.isSameEcParameterSpec(spec, NIST_P384.toParameterSpec())) {
        return NIST_P384;
      }
      if (EllipticCurvesUtil.isSameEcParameterSpec(spec, NIST_P521.toParameterSpec())) {
        return NIST_P521;
      }
      throw new GeneralSecurityException("unknown ECParameterSpec");
    }
The elliptic curve and its parameters.
java_src/src/main/java/com/google/crypto/tink/signature/EcdsaParameters.java