$  openssl ecparam -in param-ec.pem -text -noout
ASN1 OID: secp384r1

The file param-ec.pem indicates the curve is P-384, also known as secp384r1.

In the same way:

secp521r1 = P-521 and secp256k1 = P-256 prime256v1 = P-256 (thank you for the correction, @dave_thompson_085)

Question: Why? Where did the two names come from? Does it matter? Is one name preferred in more instances? What is the difference between the ASN1 OID and NIST CURVE representation?

  • 1
    P-256 is secp256r1 NOT secp256k1. NIST adopted both random and Koblitz 'binary' (GF(2^m)) curves but only random 'prime' curves. Apr 30, 2022 at 1:50
  • @dave_thompson_085 Thanks for the correction. I've updated my initial post. But just to double check, I've also read P-256 as prime256v1... can you clarify whether prime256v1 or secp256r1 is the correct ASN1 reference for P-256?
    – Eddie
    May 3, 2022 at 0:13
  • @dave_thompson_085 Actually, I quickly tested it with OpenSSL 1.1.1 and it seems: prime256v1 = P-256, secp384r1 = P-384, secp521r1 = P-521
    – Eddie
    May 3, 2022 at 1:00
  • 1
    You're right, I should have added that. prime256v1 is the X9 name, secp256r1 SECG (Certicom), and P-256 NIST; OpenSSL uses the X9 name because it was first, and the NIST name probably because it's widely used (and was more so during the days of NSA Suite B). May 3, 2022 at 1:33
  • @dave_thompson_085 Perfect. Thank you. Fixed =)
    – Eddie
    May 3, 2022 at 2:32

1 Answer 1


Most of the X.509 standards are based on a format called ASN.1 (Abstract Syntax Notation). This is a tag-length-value (TLV) format that describes the structure of data. One of those data structures is an object ID or OID, which is typically represented in text as a set of integers, separated by dots. These are assigned to various organizations in a structured hierarchy and each organization can assign a meaning to items in their own hierarchy. One use for an OID is as a standard descriptor for an algorithm or parameter set.

In this case, the output from OpenSSL is simply telling you that the OID here is known to OpenSSL, and OpenSSL calls it secp384r1 (the real OID is, as mentioned above, a sequence of integers). This name comes from SECG, which is a consortium which specified standards for elliptic curve cryptography. You can see a list of the curves which OpenSSL supports with openssl ecparam -list_curves, which includes many other curves from SECG.

It happens that NIST, an agency of the U.S. government, also standardized this curve under the name P-384. In both cases, the p refers to a curve over a prime field, and the r in the SECG name means it is generated at random. NIST has only standardized a small number of curves, though, so you may also see curves with different names that don't have a field for the NIST curve.

Finally, it is allowed to use custom curves in many of these specifications, in which case you might not see either of those entries at all. However, as a practical matter, using a well-known curve means that you can generally benefit from a faster, specialized implementation, and usually one that is constant time (which is important for any sort of online processing). Therefore, using a standard curve is highly recommended and custom curves, having no benefits and plenty of potential downsides, are practically never used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .