service/vendor/github.com/youmark/pkcs8
lwl0608 9a00286db6 service 2023-12-21 22:17:40 +08:00
..
.gitignore service 2023-12-21 22:17:40 +08:00
.travis.yml service 2023-12-21 22:17:40 +08:00
LICENSE service 2023-12-21 22:17:40 +08:00
README service 2023-12-21 22:17:40 +08:00
README.md service 2023-12-21 22:17:40 +08:00
pkcs8.go service 2023-12-21 22:17:40 +08:00

README.md

pkcs8

OpenSSL can generate private keys in both "traditional format" and PKCS#8 format. Newer applications are advised to use more secure PKCS#8 format. Go standard crypto package provides a function to parse private key in PKCS#8 format. There is a limitation to this function. It can only handle unencrypted PKCS#8 private keys. To use this function, the user has to save the private key in file without encryption, which is a bad practice to leave private keys unprotected on file systems. In addition, Go standard package lacks the functions to convert RSA/ECDSA private keys into PKCS#8 format.

pkcs8 package fills the gap here. It implements functions to process private keys in PKCS#8 format, as defined in RFC5208 and RFC5958. It can handle both unencrypted PKCS#8 PrivateKeyInfo format and EncryptedPrivateKeyInfo format with PKCS#5 (v2.0) algorithms.

Godoc

Installation

Supports Go 1.9+

go get github.com/youmark/pkcs8

dependency

This package depends on golang.org/x/crypto/pbkdf2 package. Use the following command to retrive pbkdf2 package

go get golang.org/x/crypto/pbkdf2