I am playing around with ssh keys with ED25519. I have seen a couple of libraries playing with generating the public/private key pair. Another parsing the openssh private key to get the key, but the challenge I'm running into is getting the pk value from the public key.
From OpenSSH https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys
I find this:
pk is the encoded Ed25519 public key as defined by draft-josefsson-eddsa-ed25519-03.
So I am trying to get the actual public key value (32 bytes) from the public key, and then encode them.
Can someone explain how to extract the actual public key from the the ssh key public key (removing all the extra stuff and leaving just the key)?
Could someone put in human speak (or code) an example of encoding the public key?
(I'm doing this in python, cryptography.hazmat doesn't support this yet. I've waded through the C code for openssh keygen signing, which needs the pk, and I'm not familiar enough with C to dig through the pointers to pointers, etc to figure out well enough what it's doing.)
Happy to do more research if needs be, but just looking for a next place to look.