Knowledge Base
Diffie-Hellman Parameter
A+

2048-bit Postfix 3.7 builtin DH parameter

Summary

Name:
2048-bit Postfix 3.7 builtin DH parameter
Key size:
2048 bits

Check your host!

Type a URL to analyze a service

Get a prompt and clear overview of your security configuration. Right now!

Security

A+
Key Size
Name

2048

Security

The Diffie-Hellman ephemeral public key parameter[409][410][411] with prime size greater than 2048[422] is considered secure, not weakened against logjam attack[7][8][9][10].

Recommendations

Use a well-known Diffie-Hellman ephemeral public key parameter[426][427][428], or generate a custom Diffie-Hellman ephemeral public key parameter[409][410][411] with a size greater or equal than 2048 bits but less or equal than 4096 bits. In the case of custom parameters, validate that the prime is a safe prime[176] to avoid a small subgroup confinement attack[72][73].

A+
Prime
Name

Safe Prime

Security

Diffie-Hellman ephemeral public key parameter[409][410][411] contains a safe prime[176], so the connection is certainly not vulnerable to a small subgroup confinement attack[72][73].

A
Post-Quantum
Name

False

Security

The Diffie-Hellman[99][100][101][102][103] key exchange provides no protection against a cryptanalytic attack by a quantum computer, and no classical Diffie-Hellman does — just as no classical elliptic curve does — because a quantum computer breaks the hardness assumption they rely on. Only a hybrid key exchange (a classical algorithm combined with a post-quantum cryptography[158][159] one) or a pure post-quantum algorithm is quantum-safe.

Recommendations

Enable a hybrid key exchange or a pure post-quantum algorithm on your server, and prefer it where the configuration allows, so the connection stays secure against a future quantum computer.

Parameter Numbers

Prime (p)
0x308201080282010100ec027b74c6d4b48968fdbce082aed6f14d93aa4707843d86f847f7df087bca04a472ec11e23843b794abafe28559434e7185fe520ce01cb6c7b01b06b34d1b4ff64b45bd1db8e4a448092819d7ceb1e59ac49455de4d860f4c5e25516c96cafae30169826c8ff5e70eb78e52f1cf0b6710d0b37779a4c1d00f3ff55c35f946d2c7fb976dd5bee48b5af288fa47dcc24a4d69d32adf556c5f71111e870368e1f4210663d965d40c4da71f15533a501af59b5035e016a1d7e6bfd7d9d953e58bf87b4546b6ac50164642ca76384b8e83c673139c03d17a3d8d99341079672123f96f489aa6debf7f9c1653fff72096eb34cb5b852b7c98002347cec25812862c57020102
Copy to clipboard
Generator (g)
0x2
Copy to clipboard

Representations

PEM

Default private value length
-----BEGIN DH PARAMETERS-----
MIIBEwKCAQwwggEIAoIBAQDsAnt0xtS0iWj9vOCCrtbxTZOqRweEPYb4R/ffCHvK
BKRy7BHiOEO3lKuv4oVZQ05xhf5SDOActsewGwazTRtP9ktFvR245KRICSgZ186x
5ZrElFXeTYYPTF4lUWyWyvrjAWmCbI/15w63jlLxzwtnENCzd3mkwdAPP/VcNflG
0sf7l23VvuSLWvKI+kfcwkpNadMq31VsX3ERHocDaOH0IQZj2WXUDE2nHxVTOlAa
9ZtQNeAWodfmv9fZ2VPli/h7RUa2rFAWRkLKdjhLjoPGcxOcA9F6PY2ZNBB5ZyEj
+W9Imqbev3+cFlP/9yCW6zTLW4UrfJgAI0fOwlgShixXAgECAgEC
-----END DH PARAMETERS-----
Download dhparam.pem
Copy to clipboard
Small private value length
-----BEGIN DH PARAMETERS-----
MIIBFwKCAQwwggEIAoIBAQDsAnt0xtS0iWj9vOCCrtbxTZOqRweEPYb4R/ffCHvK
BKRy7BHiOEO3lKuv4oVZQ05xhf5SDOActsewGwazTRtP9ktFvR245KRICSgZ186x
5ZrElFXeTYYPTF4lUWyWyvrjAWmCbI/15w63jlLxzwtnENCzd3mkwdAPP/VcNflG
0sf7l23VvuSLWvKI+kfcwkpNadMq31VsX3ERHocDaOH0IQZj2WXUDE2nHxVTOlAa
9ZtQNeAWodfmv9fZ2VPli/h7RUa2rFAWRkLKdjhLjoPGcxOcA9F6PY2ZNBB5ZyEj
+W9Imqbev3+cFlP/9yCW6zTLW4UrfJgAI0fOwlgShixXAgECAgECAgIA4Q==
-----END DH PARAMETERS-----
Download dhparam-small.pem
Copy to clipboard

PARI/GP

powermod(x, k, m) = lift(Mod(x, m) ^ k);

g = 0x2;
p = 0x308201080282010100ec027b74c6d4b48968fdbce082aed6f14d93aa4707843d86f847f7df087bca04a472ec11e23843b794abafe28559434e7185fe520ce01cb6c7b01b06b34d1b4ff64b45bd1db8e4a448092819d7ceb1e59ac49455de4d860f4c5e25516c96cafae30169826c8ff5e70eb78e52f1cf0b6710d0b37779a4c1d00f3ff55c35f946d2c7fb976dd5bee48b5af288fa47dcc24a4d69d32adf556c5f71111e870368e1f4210663d965d40c4da71f15533a501af59b5035e016a1d7e6bfd7d9d953e58bf87b4546b6ac50164642ca76384b8e83c673139c03d17a3d8d99341079672123f96f489aa6debf7f9c1653fff72096eb34cb5b852b7c98002347cec25812862c57020102;
s = 256;

a = 2 ^ (s - 1) + random(2 ^ (s - 1));
A = powermod(g, a, p);

b = 2 ^ (s - 1) + random(2 ^ (s - 1));
B = powermod(g, b, p);

S = powermod(B, a, p);
Copy to clipboard

LaTeX

$\begin{eqnarray}
p \equiv 0x308201080282010100ec027b74c6d4b48968fdbce082aed6f14d93aa4707843d86f847f7df087bca04a472ec11e23843b794abafe28559434e7185fe520ce01cb6c7b01b06b34d1b4ff64b45bd1db8e4a448092819d7ceb1e59ac49455de4d860f4c5e25516c96cafae30169826c8ff5e70eb78e52f1cf0b6710d0b37779a4c1d00f3ff55c35f946d2c7fb976dd5bee48b5af288fa47dcc24a4d69d32adf556c5f71111e870368e1f4210663d965d40c4da71f15533a501af59b5035e016a1d7e6bfd7d9d953e58bf87b4546b6ac50164642ca76384b8e83c673139c03d17a3d8d99341079672123f96f489aa6debf7f9c1653fff72096eb34cb5b852b7c98002347cec25812862c57020102 \\
g \equiv 0x2 \\
\\
a \in \mathbb{Z}_q \\
b \in \mathbb{Z}_q \\
\\
A \equiv g^a \pmod{p} \\
B \equiv g^b \pmod{p} \\
\\
S \equiv {(g^{a})}^{b}={(g^{b})}^{a}=g^{ab} \pmod{p}
\end{eqnarray}$
Copy to clipboard