Here's a blog post from Tim Bray describing his experience trying to do something that should be fairly simple: interchange an Ed25519 public key between a Go and a Java app.
https://www.tbray.org/ongoing/When/202x/2021/04/19/PKI-Detective
This ended up being quite a struggle, and on the Go side he ended up basically implementing his own versions of x509.MarshalPKIXPublicKey and x509.ParsePKIXPublicKey.
The Godocs for crypto/ed25519, crypto/rsa, and crypto/ecdsa don't provide any guidance for this, and it's not very intuitive that you have to look in crypto/x509 for functions to marshal and unmarshal keys. Perhaps the Godocs should mention the functions in crypto/x509?
Here's a blog post from Tim Bray describing his experience trying to do something that should be fairly simple: interchange an Ed25519 public key between a Go and a Java app.
https://www.tbray.org/ongoing/When/202x/2021/04/19/PKI-Detective
This ended up being quite a struggle, and on the Go side he ended up basically implementing his own versions of
x509.MarshalPKIXPublicKeyandx509.ParsePKIXPublicKey.The Godocs for crypto/ed25519, crypto/rsa, and crypto/ecdsa don't provide any guidance for this, and it's not very intuitive that you have to look in crypto/x509 for functions to marshal and unmarshal keys. Perhaps the Godocs should mention the functions in crypto/x509?