code></pre>

<p>Read a DER unencrypted PKCS#8 format private key:</p>

<pre><code>openssl pkcs8 -inform DER -nocrypt -in key.der -out key.pem</code></pre>

<p>Convert a private key from any PKCS#8 encrypted format to traditional format:</p>

<pre><code>openssl pkcs8 -in pk8.pem -traditional -out key.pem</code></pre>

<p>Convert a private key to PKCS#8 format, encrypting with AES-256 and with one million iterations of the password:</p>

<pre><code>openssl pkcs8 -in key.pem -topk8 -v2 aes-256-cbc -iter 100000