0

Web Crypto API allows creating ECC keys with some known curves: https://developer.mozilla.org/en-US/docs/Web/API/EcKeyGenParams

Those are P-256, P-384, P-521.

However as answered at this answer https://crypto.stackexchange.com/a/30273/99862

There are secp256k1, and secp256r1, and maybe more?

Which is the exact P-256 implemented by Web Crypto API?

Maarten Bodewes
  • 92,551
  • 13
  • 161
  • 313
Dan D.
  • 103
  • 3
  • 2
    P-256 always refer to secp256r1, there's no "which". When the context is clearly about bitcoin, then it'd be secp256k1, and this curve is rarely used in more formal internet protocols. – DannyNiu Nov 15 '22 at 12:06
  • https://neuromancer.sk/std/nist/P-256 – kelalaka Nov 15 '22 at 12:26

1 Answers1

2

These are the NIST curves as specified in NIST SP800-186. In terms of the IETF designation of RFC4492 they are the same as secp256r1, secp384r1 and secp521r1 (see appendix A of the RFC).

Daniel S
  • 23,716
  • 1
  • 29
  • 67
  • 1
    A bit of history about the Certicom curves and NIST decided to standardize them (at least I presume that's how this went) might be interesting. – Maarten Bodewes Nov 15 '22 at 10:55
  • @MaartenBodewes Definitely interesting, though the background to the choice of elliptic curve parameters has been the subject of "intense debate" in recent times and I'd prefer not to open that particular can of worms. – Daniel S Nov 15 '22 at 11:08