...
Package pkcs8
PKCS#8 is a specification for encoding private keys into an ASN.1 structure.
See RFC 5208
The Go standard library implements parsing PKCS#8 keys but does not support
marshalling them; this module provides that function.
func MarshalPKCS8PrivateKey(priv crypto.PrivateKey) ([]byte, error)
Marshal a RSA or ECDSA private key as an unencrypted PKCS#8 blob