private static EcdsaParameters.CurveType toCurveType(EllipticCurveType protoCurveType)
      throws GeneralSecurityException {
    switch (protoCurveType) {
      case NIST_P256:
        return EcdsaParameters.CurveType.NIST_P256;
      case NIST_P384:
        return EcdsaParameters.CurveType.NIST_P384;
      case NIST_P521:
        return EcdsaParameters.CurveType.NIST_P521;
      default:
        throw new GeneralSecurityException(
            "Unable to parse EllipticCurveType: " + protoCurveType.getNumber());
    }
  }
Methods to serialize and parse {@link EcdsaPrivateKey} and {@link EcdsaPublicKey} objects and
{@link EcdsaParameters} objects.
java_src/src/main/java/com/google/crypto/tink/signature/internal/EcdsaProtoSerialization.java