ith a named safe prime group by calling:</p>

<pre><code>int priv_len = 2 * 112;
OSSL_PARAM params[3];
EVP_PKEY *pkey = NULL;
EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_from_name(NULL, &quot;DH&quot;, NULL);

params[0] = OSSL_PARAM_construct_utf8_string(&quot;group&quot;, &quot;ffdhe2048&quot;, 0);
/* &quot;priv_len&quot; is optional */
params[1] = OSSL_PARAM_construct_int(&quot;priv_len&quot;, &amp;priv_len);
params[2] = OSSL_PARAM_construct_end();

EVP_PKEY_keygen_init(pctx);
EVP_PKEY_CTX_set_params(pctx, para