OpenSSL "genrsa -des" - DES Encrypt RSA Keys

Q

How to generate a new RSA key pair and encrypt the output with a DES password using OpenSSL "genrsa" command?

✍: FYIcenter.com

A

If you want to secure your new RSA private key with a DES encryption, you can use the OpenSSL "genrsa -des" command as shown below:

C:\Users\fyicenter>\local\openssl\openssl

OpenSSL> genrsa -out my_rsa_des.key -des
Generating RSA private key, 2048 bit long modulus
.......................+++
.........+++
e is 65537 (0x10001)
Enter pass phrase for my_rsa_des.key: fyicenter
Verifying - Enter pass phrase for my_rsa_des.key: fyicenter

Options used in this command are:

  • "-out my_rsa_des.key" - Save output (the new RSA private and public key) in a file.
  • "-des" - Encrypt the output with DES algorithm.
  • "fyicenter" - The password of the DES encryption.

 

OpenSSL "rsa" - Open Encrypted RSA Keys

OpenSSL "genrsa 10240" - Generate RSA Long Keys

OpenSSL "genrsa" and "rsa" Commands

⇑⇑ OpenSSL Tutorials

2017-01-14, 5078👍, 0💬