[openssl-users] ed25519 key generation
Viktor Dukhovni
openssl-users at dukhovni.org
Sun Mar 25 01:05:43 UTC 2018
> On Mar 24, 2018, at 7:28 PM, Jeremy Harris <jgh at wizmail.org> wrote:
>
> Is there a way yet to get the raw public-key out,
> documented or not? As you may guess, this is for DKIM.
Not sure what format DKIM wants the key in, but if it is SKPI
in base64 form then:
$ openssl genpkey -algorithm Ed25519 -out /tmp/key.pem
$ openssl pkey -in /tmp/key.pem -pubout |
openssl pkey -pubin -text
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA92VFLCjUOrNcediYNNr6z9ZU/cqnJoKHA75Pp9rT7u8=
-----END PUBLIC KEY-----
ED25519 Public-Key:
pub:
f7:65:45:2c:28:d4:3a:b3:5c:79:d8:98:34:da:fa:
cf:d6:54:fd:ca:a7:26:82:87:03:be:4f:a7:da:d3:
ee:ef
So for just the base64:
$ openssl pkey -in /tmp/key.pem -pubout |
openssl pkey -pubin -outform DER |
openssl base64 -A; echo
MCowBQYDK2VwAyEA92VFLCjUOrNcediYNNr6z9ZU/cqnJoKHA75Pp9rT7u8=
--
Viktor.
More information about the openssl-users
mailing list