You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request to support ed25519. The reason is explained there mike-engel/jwt-cli#173. Sadly I'm not able to make the related PR, because I know nothing about rust.
Best regards,
Reacted by Michał Hanusek, Jim Finn, Paul Colin Hennig, Gunnar and arg3nt
Is this feature supported? It seems to be in the library (e.g., from_ed_der), but attempts to use it don't seem to round-trip. (Verification always fails.)
It seems like DecodingKey::from_ed_der function actually expects raw 32 bytes public key, which ring's Ed25519KeyPair::public_key returns.
Also running openssl asn1parse -inform der -in file-with-pubkey shows again that these 32 bytes are not DER encoded. I've also additionally checked it using ed25519-dalek crate.
So essentially it seems DecodingKey::from_ed_der name is just misleading and DecodingKey doesn't yet support DER encoded ed25519 public keys. Maybe it would be a good idea to add a new method like DecodingKey::from_ed behaving exactly the same as existing DecodingKey::from_ed_der, but specified in the descrition that it expects raw 32 bytes public key.
What to do with existing misleading name of DecodingKey::from_ed_der I'm not sure, changing implementation would be a (potentially) quite annoying breaking change.
Activity
Keats commentedon Mar 8, 2022
I wouldn't be against it but someone would have to submit the PR.
roy-work commentedon Jun 21, 2022
Is this feature supported? It seems to be in the library (e.g.,
from_ed_der), but attempts to use it don't seem to round-trip. (Verification always fails.)Keats commentedon Jun 22, 2022
It's not supported
Cubxity commentedon Jul 11, 2022
Would be nice to see support for Ed25519 as the other curves may have some weaknesses
chanced commentedon Jan 25, 2023
What exactly isn't supported? It seems to be working fine for me. I'm not sure what I'm missing.
Output:
GunnarMorrigan commentedon Jun 15, 2023
Reading a pem ed25519 key definitely does not work.
tokarevart commentedon Jan 13, 2024
It seems like
DecodingKey::from_ed_derfunction actually expects raw 32 bytes public key, which ring'sEd25519KeyPair::public_keyreturns.Also running
openssl asn1parse -inform der -in file-with-pubkeyshows again that these 32 bytes are not DER encoded. I've also additionally checked it usinged25519-dalekcrate.So essentially it seems
DecodingKey::from_ed_dername is just misleading andDecodingKeydoesn't yet support DER encoded ed25519 public keys. Maybe it would be a good idea to add a new method likeDecodingKey::from_edbehaving exactly the same as existingDecodingKey::from_ed_der, but specified in the descrition that it expects raw 32 bytes public key.What to do with existing misleading name of
DecodingKey::from_ed_derI'm not sure, changing implementation would be a (potentially) quite annoying breaking change.tokarevart commentedon Jan 13, 2024
Regarding PEM format I had no issues while testing just now.