How can i generate ec curve25519 keys using openSSL? When I run

openssl ecparam -name curve25519 -genkey -noout -out private.ec.key

I have this message

unknown curve name (curve25519)

Use the genpkey command:

openssl genpkey -algorithm x25519

or, for edwards25519:

openssl genpkey -algorithm ed25519

This requires a recent OpenSSL version.

  • $\begingroup$ openssl say: Algorithm x25519 not found $\endgroup$ – Vito Lipari Jun 25 '19 at 9:20
  • $\begingroup$ Your OpenSSL version is too old. $\endgroup$ – Frank Denis Jun 25 '19 at 9:34
  • $\begingroup$ when i run openssl version it answer with LibreSSL 2.6.5 $\endgroup$ – Vito Lipari Jun 25 '19 at 9:52
  • 1
    $\begingroup$ You need to update your openssl version to 1.1.1 minimum $\endgroup$ – camp0 Jun 25 '19 at 10:14
  • $\begingroup$ @camp0+ 1.1.0 has x25519; 1.1.1 adds ed25519 x448 ed448 . Libre, although it started as a fork, is now separate and I don't know its status/history. $\endgroup$ – dave_thompson_085 Jun 28 '19 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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