Knowledge Base
Diffie-Hellman Parameter
A+

2048-bit HAProxy 1.6 builtin DH parameter

Summary

Name:
2048-bit HAProxy 1.6 builtin DH parameter
Key size:
2048 bits
Publishers:

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)
0xec86f870a03316ec051a7359cd1f8bf829e4d2cf52ddc2248db5389afb5ca4e4b2dace665074a6854d4b1d30b82bf310e9a72d0571e781df8b59523b5f430b68f1db07be086b1b23ee4dcc9e0e43a01edf438cecbebe90b45154b92f7b64764e5dd42eaec29eae514359c7779c503c0eed73045ff14c762ad8f8cffc3440d1b442618466423904f868b262d755ed1b747591e0c569c1315cdb7b442ece84580d1e660cc8449efd4008675dfba7768f001187e993f97dc4bc745520d44a412f43421ac1f297174927376b2f887e1ca0a1899227d9565a71c156377e3a9d05e7ee5d8f8217bce9c2933082f9f4c9ae49dbd054b4d9754dfa06b8d63841b71f77f3
Copy to clipboard
Generator (g)
0x2
Copy to clipboard

Representations

PEM

Default private value length
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA7Ib4cKAzFuwFGnNZzR+L+Cnk0s9S3cIkjbU4mvtcpOSy2s5mUHSm
hU1LHTC4K/MQ6actBXHngd+LWVI7X0MLaPHbB74Iaxsj7k3Mng5DoB7fQ4zsvr6Q
tFFUuS97ZHZOXdQursKerlFDWcd3nFA8Du1zBF/xTHYq2PjP/DRA0bRCYYRmQjkE
+GiyYtdV7Rt0dZHgxWnBMVzbe0QuzoRYDR5mDMhEnv1ACGdd+6d2jwARh+mT+X3E
vHRVINRKQS9DQhrB8pcXSSc3ay+IfhygoYmSJ9lWWnHBVjd+Op0F5+5dj4IXvOnC
kzCC+fTJrknb0FS02XVN+ga41jhBtx938wIBAg==
-----END DH PARAMETERS-----
Download dhparam.pem
Copy to clipboard
Small private value length
-----BEGIN DH PARAMETERS-----
MIIBDAKCAQEA7Ib4cKAzFuwFGnNZzR+L+Cnk0s9S3cIkjbU4mvtcpOSy2s5mUHSm
hU1LHTC4K/MQ6actBXHngd+LWVI7X0MLaPHbB74Iaxsj7k3Mng5DoB7fQ4zsvr6Q
tFFUuS97ZHZOXdQursKerlFDWcd3nFA8Du1zBF/xTHYq2PjP/DRA0bRCYYRmQjkE
+GiyYtdV7Rt0dZHgxWnBMVzbe0QuzoRYDR5mDMhEnv1ACGdd+6d2jwARh+mT+X3E
vHRVINRKQS9DQhrB8pcXSSc3ay+IfhygoYmSJ9lWWnHBVjd+Op0F5+5dj4IXvOnC
kzCC+fTJrknb0FS02XVN+ga41jhBtx938wIBAgICAOE=
-----END DH PARAMETERS-----
Download dhparam-small.pem
Copy to clipboard

PARI/GP

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

g = 0x2;
p = 0xec86f870a03316ec051a7359cd1f8bf829e4d2cf52ddc2248db5389afb5ca4e4b2dace665074a6854d4b1d30b82bf310e9a72d0571e781df8b59523b5f430b68f1db07be086b1b23ee4dcc9e0e43a01edf438cecbebe90b45154b92f7b64764e5dd42eaec29eae514359c7779c503c0eed73045ff14c762ad8f8cffc3440d1b442618466423904f868b262d755ed1b747591e0c569c1315cdb7b442ece84580d1e660cc8449efd4008675dfba7768f001187e993f97dc4bc745520d44a412f43421ac1f297174927376b2f887e1ca0a1899227d9565a71c156377e3a9d05e7ee5d8f8217bce9c2933082f9f4c9ae49dbd054b4d9754dfa06b8d63841b71f77f3;
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 0xec86f870a03316ec051a7359cd1f8bf829e4d2cf52ddc2248db5389afb5ca4e4b2dace665074a6854d4b1d30b82bf310e9a72d0571e781df8b59523b5f430b68f1db07be086b1b23ee4dcc9e0e43a01edf438cecbebe90b45154b92f7b64764e5dd42eaec29eae514359c7779c503c0eed73045ff14c762ad8f8cffc3440d1b442618466423904f868b262d755ed1b747591e0c569c1315cdb7b442ece84580d1e660cc8449efd4008675dfba7768f001187e993f97dc4bc745520d44a412f43421ac1f297174927376b2f887e1ca0a1899227d9565a71c156377e3a9d05e7ee5d8f8217bce9c2933082f9f4c9ae49dbd054b4d9754dfa06b8d63841b71f77f3 \\
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