package
0.2.0
Repository: https://github.com/vanadium/core.git
Documentation: pkg.go.dev

# Packages

Package indirectkeyfiles provides support for key files whose contents refer to another keyfile.
Package sshkeys provides support for using ssh keys with the security/keys package, including private keys hosted within an ssh agent.
Package x509 provides support for using x509/ssl keys with the security/keys package.

# Functions

DecryptPEMBlock decrypts an encrypted PEM block.
DecryptPKCS8Block decrypts a private key encrypted using PKCS8.
IndirectMatcherFunc returns a function that can be used to match an 'indirect' PEM block's IndirectionTypePEMHeader.
MarshalFuncForIndirection returns a function that can be used to marshal its contents to an 'indirect' PEM block as understood by registrar.ParsePrivateKey for the specified indirectionType.
MarshalPKCS8PrivateKey uses x509.MarshalPKCS8PrivateKey to marshal the key to PEM block type of 'PRIVATE KEY'.
MarshalPKIXPublicKey uses MarshalPKIXPublicKey to marshal the key to PEM block of type 'PUBLIC 'KEY'.
MustRegister is like Register but panics on error.
NewPrivateKeyForAlgo creates a new private key for the requested algorithm.
NewRegistrar returns an intialized instance of Registrar.
ParseECPrivateKey calls x509.ParseECPrivateKey with block.Bytes.
ParsePKCS8PrivateKey calls x509.ParsePKCS8PrivateKey with block.Bytes.
ParsePKIXPublicKey calls x509.ParsePKIXPublicKey with block.Bytes.
Register registers the required functions for handling the Vanadium built in key types and commonly used formats.
ZeroPassphrase overwrites the passphrase.

# Constants

Supported key types.
Supported key types.
Supported key types.
Supported key types.
IndirectionPrivateKeyPEMType is the PEM type used for the 'indirect' PEM blocks intepreted by registrar.ParsePrivateKey.
IndirectionTypePEMHeader is a PEM header used to match an 'indirect' PEM block to a particular parser.
Supported key types.
Supported key types.
Supported key types.

# Structs

ErrBadPassphrase is returned when the supplied passphrase is unable to decrypt the key.
ErrPassphraseRequired is returned when an attempt is made to read an encrypted block without a passphrase.
Registrar represents an extensible collection of functions for marshaling and parsing keys.

# Interfaces

API represents a common set of operations that can be implemented for specific key types.
IndirectPrivateKey represents the interface returned when an 'indirect' PEM block is encountered by registrar.ParsePrivateKey.

# Type aliases

CryptoAlgo represents the supported cryptographic algorithms.
DecryptFunc decrypts a pem block using the supplied passphrase.
MarshalPrivateKeyFunc marshals the supplied key to PEM optionally encrypting it using the supplied passphrase.
MarshalPublicKeyFunc marshals the supplied key to PEM.
ParsePrivateKeyFunc parses a private key from PEM.
ParsePublicKeyFunc parses a public key from PEM.
ParsePublicKeyTextFunc parses a public key from a format other than PEM.