Skip to content

problem with ed25519 key #724

Answered by lcobucci
eman1986 asked this question in Q&A
Apr 23, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@eman1986 differently from the other algorithms, EdDSA doesn't use the PEM format as input.

Libsodium simplifies things quite a lot and provides functions to generate keys.

You first need to generate the keypair and then extract the secret/public keys from it:

$keypair = sodium_crypto_sign_keypair();
$secret = sodium_crypto_sign_secretkey($keypair);
$public = sodium_crypto_sign_publickey($keypair);

Here's a full signature/verification process: https://3v4l.org/SKdcp

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eman1986
Comment options

Answer selected by eman1986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants