surbhi
surbhi

Reputation: 397

OpenSSL NID for prime256v1 curve

I am trying to create EC Diffie Hellman keys using OpenSSL. I am using the below line. I am trying to find the nid of prime256v1 curve but am not able to. I looked up in openssl documentation also. Does openssl not support prime256v1 curve?

key = EC_KEY_new_by_curve_name(NID_secp256k1); // prime256v1

Upvotes: 2

Views: 8938

Answers (1)

You can list all supported curves with the following command:

openssl ecparam -list_curves

Once you know whether the curve is supported, you can find the corresponding NID in openssl/include/openssl/obj_mac.h file.

Upvotes: 3

Related Questions