0
$\begingroup$

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),
};
$\endgroup$

3 Answers 3

2
$\begingroup$

From IANA:

From SECG.org:

From me:

$\endgroup$
5
  • $\begingroup$ Thanks, but I don't really find the concrete parameters of these curves. $\endgroup$ Dec 19, 2023 at 8:44
  • 1
    $\begingroup$ I found some here: herongyang.com/EC-Cryptography/… and secg.org/sec2-v2.pdf $\endgroup$ Dec 19, 2023 at 8:46
  • $\begingroup$ @unalignedmemoryaccess I would've posted the reference to SEC#2, but considering it didn't provide reference to brainpool curves, and that a research anchor best be provided, I posted links to IANA pages. $\endgroup$
    – DannyNiu
    Dec 19, 2023 at 8:55
  • 1
    $\begingroup$ neuromancer.sk/std $\endgroup$
    – kelalaka
    Dec 19, 2023 at 20:23
  • $\begingroup$ The SEC#2 is the best one I found. $\endgroup$ Dec 20, 2023 at 9:52
4
$\begingroup$

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.

$\endgroup$
1
  • 3
    $\begingroup$ Hey, it even contains Goldilocks & Brainpool (but the latter only by reference). Missed that update. $\endgroup$
    – Maarten Bodewes
    Dec 20, 2023 at 4:22
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.