0

Is there an official database with curve parameters for common curves? Asking for generator point, order, prime, a, b

I found one for secp256k1 in the mbedtls library.

static const mbedtls_mpi_uint secp256k1_p[] = {
    MBEDTLS_BYTES_TO_T_UINT_8(0x2F, 0xFC, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF),
    MBEDTLS_BYTES_TO_T_UINT_8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF),
    MBEDTLS_BYTES_TO_T_UINT_8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF),
    MBEDTLS_BYTES_TO_T_UINT_8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF),
};
static const mbedtls_mpi_uint secp256k1_a[] = {
    MBEDTLS_BYTES_TO_T_UINT_2(0x00, 0x00),
};
static const mbedtls_mpi_uint secp256k1_b[] = {
    MBEDTLS_BYTES_TO_T_UINT_2(0x07, 0x00),
};
static const mbedtls_mpi_uint secp256k1_gx[] = {
    MBEDTLS_BYTES_TO_T_UINT_8(0x98, 0x17, 0xF8, 0x16, 0x5B, 0x81, 0xF2, 0x59),
    MBEDTLS_BYTES_TO_T_UINT_8(0xD9, 0x28, 0xCE, 0x2D, 0xDB, 0xFC, 0x9B, 0x02),
    MBEDTLS_BYTES_TO_T_UINT_8(0x07, 0x0B, 0x87, 0xCE, 0x95, 0x62, 0xA0, 0x55),
    MBEDTLS_BYTES_TO_T_UINT_8(0xAC, 0xBB, 0xDC, 0xF9, 0x7E, 0x66, 0xBE, 0x79),
};
static const mbedtls_mpi_uint secp256k1_gy[] = {
    MBEDTLS_BYTES_TO_T_UINT_8(0xB8, 0xD4, 0x10, 0xFB, 0x8F, 0xD0, 0x47, 0x9C),
    MBEDTLS_BYTES_TO_T_UINT_8(0x19, 0x54, 0x85, 0xA6, 0x48, 0xB4, 0x17, 0xFD),
    MBEDTLS_BYTES_TO_T_UINT_8(0xA8, 0x08, 0x11, 0x0E, 0xFC, 0xFB, 0xA4, 0x5D),
    MBEDTLS_BYTES_TO_T_UINT_8(0x65, 0xC4, 0xA3, 0x26, 0x77, 0xDA, 0x3A, 0x48),
};
static const mbedtls_mpi_uint secp256k1_n[] = {
    MBEDTLS_BYTES_TO_T_UINT_8(0x41, 0x41, 0x36, 0xD0, 0x8C, 0x5E, 0xD2, 0xBF),
    MBEDTLS_BYTES_TO_T_UINT_8(0x3B, 0xA0, 0x48, 0xAF, 0xE6, 0xDC, 0xAE, 0xBA),
    MBEDTLS_BYTES_TO_T_UINT_8(0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF),
    MBEDTLS_BYTES_TO_T_UINT_8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF),
};

3 Answers3

4

This year (February 2023), NIST released Special Publication SP 800-186 "Recommendations for Discrete Logarithm-based Cryptography: Elliptic Curve Domain Parameters". This relatively new standards should have the latest approved curves, at least according to NIST, and all their parameters. It covers Weierstrass, Montgomery, Twisted Edwards, Koblitz, and pseudorandom curves.

hlayhel
  • 376
  • 1
  • 7
2

From IANA:

From SECG.org:

From me:

DannyNiu
  • 9,207
  • 2
  • 24
  • 57
2

In addition to these other answers, there are the 2005 Brainpool curves, which in a nutshell have been generated with the goal of being unobjectionable.

ECC Brainpool Standard Curves and Curve Generation v. 1.0 19.10.2005; the same and a site mirror thru WebArchive.

IETF informational RFC 5639+errata (160/192/224/256/320/384/512-bit prime field)

IETF informational RFC 7027 (with test vectors for brainpoolP256r1/brainpoolP384r1/brainpoolP512r1)

Although critics have emerged in Daniel J. Bernstein and Tanja Lange's SafeCurves: choosing safe curves for elliptic-curve cryptography against the Brainpool curves (both random and twisted, see this), they apply equally to the many other curves of prime order, except for twist security which is immaterial in many applications.

fgrieu
  • 140,762
  • 12
  • 307
  • 587