 -genparam -algorithm DH -out dhp.pem -pkeyopt group:ffdhe2048</code></pre>

<p>Output 2048 bit X9.42 DH parameters with 224 bit subgroup using RFC5114 group2:</p>

<pre><code>openssl genpkey -genparam -algorithm DHX -out dhp.pem -pkeyopt dh_rfc5114:2</code></pre>

<p>Output 2048 bit X9.42 DH parameters with 224 bit subgroup using FIP186-4 keygen:</p>

<pre><code>openssl genpkey -genparam -algorithm DHX -out dhp.pem -text \
    -pkeyopt pbits:2048 -pkeyopt qbits:224 -pkeyopt digest:SHA256 \
    -pkeyopt gin