Skip to content

pkcs8: encryption support #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2021
Merged

pkcs8: encryption support #302

merged 1 commit into from
Feb 23, 2021

Conversation

tarcieri
Copy link
Member

Following up on #293 which added PKCS#8 decryption support, this adds the corresponding support for encrypting PrivateKeyInfo as EncryptedPrivateKeyInfo.

It provides a simple API which generates a random salt and IV using a provided CryptoRng, then uses PBES2 with PBKDF2-SHA256 and AES-256-CBC.

It also provides a parameterized encrypt_with_params which allows for supplying a pbes2::Parameters structure.

Following up on #293 which added PKCS#8 decryption support, this
adds the corresponding support for encrypting `PrivateKeyInfo` as
`EncryptedPrivateKeyInfo`.

It provides a simple API which generates a random salt and IV using a
provided `CryptoRng`, then uses PBES2 with PBKDF2-SHA256 and
AES-256-CBC.

It also provides a paramaterized `encrypt_with_params` which allows for
supplying a `pbes2::Parameters` structure.
@tarcieri tarcieri merged commit 69afde7 into master Feb 23, 2021
@tarcieri tarcieri deleted the pkcs8/encryption branch February 23, 2021 19:27
@tarcieri tarcieri mentioned this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant