Versions in this module Expand all Collapse all v0 v0.2.0 Feb 26, 2019 v0.1.0 Aug 20, 2018 Changes in this version + const ECDSAPublicPEMLabel + const ECDSASecretPEMLabel + const ED25519 + const ED25519PublicPEMLabel + const ED25519SecretPEMLabel + const GenericPublicPEMLabel + const RSAKeySize + const RSAPublicPEMLabel + const RSASecretPEMLabel + var ErrNotImplemented = errors.New("key algorithm not implemented") + var HandledPublicKeys = []string + var OIDPublicKeyDSA = asn1.ObjectIdentifier + var OIDPublicKeyECDSA = asn1.ObjectIdentifier + var OIDPublicKeyED25519 = asn1.ObjectIdentifier + var OIDPublicKeyRSA = asn1.ObjectIdentifier + func EncodeECDSASecretKey(sk *ecdsa.PrivateKey) ([]byte, error) + func EncodeED25519SecretKey(sk *ed25519.PrivateKey) ([]byte, error) + func EncodePublicKey(pub crypto.PublicKey) ([]byte, error) + func EncodeRSASecretKey(sk *rsa.PrivateKey) ([]byte, error) + func EncodeSecretkey(priv crypto.PrivateKey) ([]byte, error) + func GenerateKey(algo x509.PublicKeyAlgorithm) (pubBytes []byte, privBytes []byte, err error) + func MarshalPKIXPublicKey(pub crypto.PublicKey) ([]byte, error) + func NewECDSAKeyPair() (crypto.PublicKey, *ecdsa.PrivateKey, error) + func NewEd25519KeyPair() (crypto.PublicKey, *ed25519.PrivateKey, error) + func NewRSAKeyPair() (crypto.PublicKey, *rsa.PrivateKey, error) + func ParseECDSAPKCS8Key(sk []byte) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) + func ParsePKIXPublicKey(pk []byte) (crypto.PublicKey, *pkix.AlgorithmIdentifier, error) + func ParsePublicKey(pk []byte) (crypto.PublicKey, *pkix.AlgorithmIdentifier, error) + func ParseRSAPKCS8Key(sk []byte) (*rsa.PrivateKey, *rsa.PublicKey, error) + func ParseSecretKey(sk []byte) (priv crypto.PrivateKey, pub crypto.PublicKey, err error) + func UnmarshalED25519Key(sk []byte) (*ed25519.PrivateKey, *ed25519.PublicKey, error)