 private key using default parameters:</p>

<pre><code>openssl genpkey -algorithm RSA -out key.pem</code></pre>

<p>Encrypt output private key using 128 bit AES and the passphrase &quot;hello&quot;:</p>

<pre><code>openssl genpkey -algorithm RSA -out key.pem -aes-128-cbc -pass pass:hello</code></pre>

<p>Generate a 2048 bit RSA key using 3 as the public exponent:</p>

<pre><code>openssl genpkey -algorithm RSA -out key.pem \
    -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:3</code></pre>

<p>Gene