cfssl: Index | Files

package derhelpers

import ""

Package derhelpers implements common functionality on DER encoded data


Package Files

derhelpers.go ed25519.go

func MarshalEd25519PrivateKey Uses

func MarshalEd25519PrivateKey(sk crypto.PrivateKey) ([]byte, error)

MarshalEd25519PrivateKey returns a DER encoding of the input private key as specified in

func MarshalEd25519PublicKey Uses

func MarshalEd25519PublicKey(pk crypto.PublicKey) ([]byte, error)

MarshalEd25519PublicKey creates a DER-encoded SubjectPublicKeyInfo for an ed25519 public key, as defined in This is analogous to MarshalPKIXPublicKey in crypto/x509, which doesn't currently support Ed25519.

func ParseEd25519PrivateKey Uses

func ParseEd25519PrivateKey(der []byte) (crypto.PrivateKey, error)

ParseEd25519PrivateKey returns the Ed25519 private key encoded by the input.

func ParseEd25519PublicKey Uses

func ParseEd25519PublicKey(der []byte) (crypto.PublicKey, error)

ParseEd25519PublicKey returns the Ed25519 public key encoded by the input.

func ParsePrivateKeyDER Uses

func ParsePrivateKeyDER(keyDER []byte) (key crypto.Signer, err error)

ParsePrivateKeyDER parses a PKCS #1, PKCS #8, ECDSA, or Ed25519 DER-encoded private key. The key must not be in PEM format.

Package derhelpers imports 10 packages (graph) and is imported by 90 packages. Updated 2020-11-30. Refresh now. Tools for package owners.