Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you don't use a passphrase, then the private key is not encrypted with any symmetric cipher - it is output completely unprotected.</p> <p>You can generate a keypair, supplying the password on the command-line using an invocation like (in this case, the password is <code>foobar</code>):</p> <pre><code>openssl genrsa -aes128 -passout pass:foobar 3072 </code></pre> <p>However, note that this passphrase could be grabbed by any other process running on the machine at the time, since command-line arguments are generally visible to all processes.</p> <p>A better alternative is to write the passphrase into a temporary file that is protected with file permissions, and specify that:</p> <pre><code>openssl genrsa -aes128 -passout file:passphrase.txt 3072 </code></pre> <p>Or supply the passphrase on standard input:</p> <pre><code>openssl genrsa -aes128 -passout stdin 3072 </code></pre> <p>You can also used a named pipe with the <code>file:</code> option, or a file descriptor.</p> <hr> <p>To then obtain the matching public key, you need to use <code>openssl rsa</code>, supplying the same passphrase with the <code>-passin</code> parameter as was used to encrypt the private key:</p> <pre><code>openssl rsa -passin file:passphrase.txt -pubout </code></pre> <p>(This expects the encrypted private key on standard input - you can instead read it from a file using <code>-in &lt;file&gt;</code>).</p> <hr> <p>Example of creating a 3072-bit private and public key pair in files, with the private key pair encrypted with password <code>foobar</code>:</p> <pre><code>openssl genrsa -aes128 -passout pass:foobar -out privkey.pem 3072 openssl rsa -in privkey.pem -passin pass:foobar -pubout -out privkey.pub </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload