6
$\begingroup$

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

1 Answer 1

8
$\begingroup$

Use the genpkey command:

openssl genpkey -algorithm x25519

or, for edwards25519:

openssl genpkey -algorithm ed25519

This requires a recent OpenSSL version.

$\endgroup$
5
  • $\begingroup$ openssl say: Algorithm x25519 not found $\endgroup$ Commented Jun 25, 2019 at 9:20
  • $\begingroup$ Your OpenSSL version is too old. $\endgroup$ Commented Jun 25, 2019 at 9:34
  • $\begingroup$ when i run openssl version it answer with LibreSSL 2.6.5 $\endgroup$ Commented Jun 25, 2019 at 9:52
  • 1
    $\begingroup$ You need to update your openssl version to 1.1.1 minimum $\endgroup$
    – camp0
    Commented Jun 25, 2019 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$ Commented Jun 28, 2019 at 0:22

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.