Decrypting a Password Protected RSA Private Key

I got a password protected RSA private key with headers like (I have the password):

Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,...

How to decrypt a password protected RSA private key?

You can use the openssl command to decrypt the key:

openssl rsa -in /path/to/encrypted/key -out /paht/to/decrypted/key

For example, if you have a encrypted key file ssl.key and you want to decrypt it and store it as mykey.key, the command will be

openssl rsa -in ssl.key -out mykey.key

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *