Categorygithub.com/youmark/pkcs8
modulepackage
0.0.0-20240726163527-a2c0da244d78
Repository: https://github.com/youmark/pkcs8.git
Documentation: pkg.go.dev

# README

pkcs8 package: implement PKCS#8 private key parsing and conversion as defined in RFC5208 and RFC5958

# Functions

ConvertPrivateKeyToPKCS8 converts the private key into PKCS#8 format.
MarshalPrivateKey encodes a private key into DER-encoded PKCS#8 with the given options.
ParsePKCS8PrivateKey parses encrypted/unencrypted private keys in PKCS#8 format.
ParsePKCS8PrivateKeyECDSA parses encrypted/unencrypted private keys in PKCS#8 format.
ParsePKCS8PrivateKeyRSA parses encrypted/unencrypted private keys in PKCS#8 format.
ParsePrivateKey parses a DER-encoded PKCS#8 private key.
RegisterCipher registers a function that returns a new instance of the given cipher.
RegisterKDF registers a function that returns a new instance of the given KDF parameters.

# Variables

AES128CBC is the 128-bit key AES cipher in CBC mode.
AES128GCM is the 128-bit key AES cipher in GCM mode.
AES192CBC is the 192-bit key AES cipher in CBC mode.
AES192GCM is the 912-bit key AES cipher in GCM mode.
AES256CBC is the 256-bit key AES cipher in CBC mode.
AES256GCM is the 256-bit key AES cipher in GCM mode.
DefaultOpts are the default options for encrypting a key if none are given.
TripleDESCBC is the 168-bit key 3DES cipher in CBC mode.

# Structs

Opts contains options for encrypting a PKCS#8 key.
PBKDF2Opts contains options for the PBKDF2 key derivation function.
ScryptOpts contains options for the scrypt key derivation function.

# Interfaces

Cipher represents a cipher for encrypting the key material.
KDFOpts contains options for a key derivation function.
KDFParameters contains parameters (salt, etc.) for a key deriviation function.