Skip to content
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

Support decrypting PKCS1 keys #4

Open
jadamcrain opened this issue Mar 3, 2024 · 0 comments
Open

Support decrypting PKCS1 keys #4

jadamcrain opened this issue Mar 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jadamcrain
Copy link
Member

We're decrypting the pkcs8 keys using a crate designed to only handle pkcs8:

https://crates.io/crates/pkcs8

I don't see anything in the Rust ecosystem that can decrypt pkcs1 "out of the box". That said, the PEM file parser we're using can parse and expose the headers in the encrypted pcks1 PEM section....

Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,C335117F818B9FB719C75798A9063CDB

...which declares the content as encrypted and tells you the algorithm and initialization vector.

To implement it, we'd have to do our own password -> key derivation using those cryptographic primitives and support a number of common algorithms (e.g. AES-128-CBC).

@jadamcrain jadamcrain added the enhancement New feature or request label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant