OpenSSL "genrsa 10240" - Generate RSA Long Keys

Q

How to generate a new RSA key pair with a longer key size using OpenSSL "genrsa" command?

✍: FYIcenter.com

A

If you need a new RSA key pair with a longer key size for testing purpose, you can use the OpenSSL "genrsa" command as shown below:

C:\Users\fyicenter>time
The current time is: 22:03:25.43

C:\Users\fyicenter>\local\openssl\openssl genrsa -out my_rsa_long.key 10240
Generating RSA private key, 10240 bit long modulus
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.......................................................................++
................................................................................
................................................................................
.........................++
e is 65537 (0x10001)

C:\Users\fyicenter>time
The current time is: 22:07:31.22

What this test tells us:

  • OpenSSL allows you to generate longer RSA keys. But it will take a longer time. A 10240-bit RSA key pair took about 4 minutes to generate on a laptop computer.

 

OpenSSL "genrsa -des" - DES Encrypt RSA Keys

OpenSSL "genrsa 32" - Generate RSA Short Keys

OpenSSL "genrsa" and "rsa" Commands

⇑⇑ OpenSSL Tutorials

2017-01-29, 2425🔥, 0💬