Everything runs on your machine — your input is processed right here in your browser and never uploaded to any server.

DH Parameters (dhparam)

ffdhe2048 · RFC 7919

Point your server at the file — nginx: ssl_dhparam /etc/nginx/dhparam.pem; · Apache: SSLOpenSSLConfCmd DHParameters /path/dhparam.pem

How it works

1

Pick a size — 2048-bit is the recommended default and what Mozilla ships; 3072/4096 trade slower TLS handshakes for a larger security margin.

2

Download dhparam.pem (or copy the PEM text).

3

Point your server at it: nginx ssl_dhparam /etc/nginx/dhparam.pem; — Apache SSLOpenSSLConfCmd DHParameters.

4

Reload the server. Done — no OpenSSL, no waiting.

About this tool

Nginx, Apache and HAProxy configs often call for an ssl_dhparam file, and the traditional way to make one — openssl dhparam — means installing OpenSSL (a real hurdle on Windows) and then waiting minutes while it grinds out a random prime. There is a better answer on both counts: RFC 7919 standardised a set of rigorously vetted finite-field Diffie-Hellman groups (ffdhe2048/3072/4096), and modern guidance — including Mozilla’s own SSL configuration generator — recommends using them instead of generating your own.

This page hands you those exact groups as a ready dhparam.pem, instantly. Counter-intuitively, this is more secure than a freshly generated file: the ffdhe primes were constructed transparently and validated exhaustively, while random generation has historically produced weak or non-safe primes that took servers down the Logjam path. Custom parameters add obscurity, not strength.

100% private

DH parameters are public by design — they are sent in the clear in every DHE handshake. Nothing here is generated from or tied to your data; the file is a published IETF constant, served from the page itself with no network requests.

Frequently asked questions

Isn’t a shared, well-known group less safe than generating my own?

No — the opposite, at these sizes. The concern about shared groups (the Logjam attack) applied to 512/1024-bit primes, where precomputation was feasible. Against 2048-bit ffdhe groups it is not, and the vetted construction eliminates the real risk: accidentally generating a weak prime. This is why RFC 7919 and Mozilla recommend the standard groups.

Do I even need a dhparam file?

Only if your config enables classic DHE cipher suites for TLS 1.2. TLS 1.3 negotiates groups itself, and ECDHE suites never used the file. If your template asks for ssl_dhparam, this file satisfies it correctly; if you serve only TLS 1.3/ECDHE, you can drop the directive instead.

Which size should I pick?

2048-bit, unless a compliance document says otherwise. It is the size Mozilla’s generator ships, comfortably beyond current attacks, and each step up makes every DHE handshake measurably slower for no practical gain today.

Related tools

Popular right now