OpenSSL "genpkey rsa_keygen_bits:10240" - RSA Long Keys

Q

How to generate a new RSA key pair with a longer key size using OpenSSL "genpkey" 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 "genpkey" command as shown below:

C:\Users\fyicenter>time
The current time is: 18:43:27.27

C:\Users\fyicenter>\local\openssl\openssl
OpenSSL> genpkey -algorithm rsa -out rsa_test.key -pkeyopt rsa_keygen_bits:10240
........................................++
................................................................................
................................................................................
................................................................................
++
OpenSSL> exit

C:\Users\fyicenter>time
The current time is: 18:46:46.85

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 more than 3 minutes to generate on a laptop computer.

 

OpenSSL "genpkey" Command for RSA Keys

⇒⇒OpenSSL Tutorials

2018-01-13, 745👍, 0💬