get_ecc_key_parameters (int curve, int *r_n_bits, const char **r_curve_oid)
{
  if (curve == CURVE_NIST_P256)
    {
      *r_n_bits = 256;
      *r_curve_oid = "1.2.840.10045.3.1.7";
    }
  else if (curve == CURVE_NIST_P384)
    {
      *r_n_bits = 384;
      *r_curve_oid = "1.3.132.0.34";
    }
  else if (curve == CURVE_NIST_P521)
    {
      *r_n_bits = 521;
      *r_curve_oid = "1.3.132.0.35";
    }
  else if (curve == CURVE_SEC_P256K1)
    {
      *r_n_bits = 256;
      *r_curve_oid = "1.3.132.0.10";
    }
  else if (curve == CURVE_ED25519)
    {
      *r_n_bits = 255;
      *r_curve_oid = "1.3.6.1.4.1.11591.15.1";
    }
  else
    {
      *r_n_bits = 0;
      *r_curve_oid = "1.3.6.1.4.1.11591.2.12242973"; /* gnu.gnupg.badoid */
    }
}
get_ecc_key_parameters (int curve, int *r_n_bits, const char **r_curve_oid)
{
  if (curve == CURVE_NIST_P256)
    {
      *r_n_bits = 256;
      *r_curve_oid = "1.2.840.10045.3.1.7";
    }
  else if (curve == CURVE_NIST_P384)
    {
      *r_n_bits = 384;
      *r_curve_oid = "1.3.132.0.34";
    }
  else if (curve == CURVE_NIST_P521)
    {
      *r_n_bits = 521;
      *r_curve_oid = "1.3.132.0.35";
    }
  else if (curve == CURVE_SEC_P256K1)
    {
      *r_n_bits = 256;
      *r_curve_oid = "1.3.132.0.10";
    }
  else if (curve == CURVE_ED25519)
    {
      *r_n_bits = 255;
      *r_curve_oid = "1.3.6.1.4.1.11591.15.1";
    }
  else
    {
      *r_n_bits = 0;
      *r_curve_oid = "1.3.6.1.4.1.11591.2.12242973";  
    }
}