Knowledge Base
Diffie-Hellman Parameter
A+

2048-bit socat 1.7.3 builtin DH parameter

Summary

Name:
2048-bit socat 1.7.3 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)
0xdc216456bd9cb2acbec998ef953e26fab557bcd9e675c043a21c7a85df34ab57a8f6bcf6847d056904834cd556d385090a08ffb537a1a38a370446d2933196f4e40d9fbd3e7f9e4daf08e2e8039473c4dc0687bb6dae662d181fd847065ccf8ab50051579bea1ed8db8e3c1fd32fba1f5f3d15c13b2c8242c88c87795b38863aebfd81a9baf7265b93c53e03304b005cb6233eea94c3b471c76e643bf89265ad606cd47ba9672604a80ab206ebe07d90ddddf5cfb4117cabc1a384be2777c7de20576647a735fe0d6a1c52b858bf2633815eb7a9c0ee581174861908891c370d524770758ba88b3011713662f07341ee349d0a2b674e6aa3e299921bf5327363
Copy to clipboard
Generator (g)
0x2
Copy to clipboard

Representations

PEM

Default private value length
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA3CFkVr2csqy+yZjvlT4m+rVXvNnmdcBDohx6hd80q1eo9rz2hH0F
aQSDTNVW04UJCgj/tTeho4o3BEbSkzGW9OQNn70+f55Nrwji6AOUc8TcBoe7ba5m
LRgf2EcGXM+KtQBRV5vqHtjbjjwf0y+6H189FcE7LIJCyIyHeVs4hjrr/YGpuvcm
W5PFPgMwSwBctiM+6pTDtHHHbmQ7+JJlrWBs1HupZyYEqAqyBuvgfZDd3fXPtBF8
q8GjhL4nd8feIFdmR6c1/g1qHFK4WL8mM4Fet6nA7lgRdIYZCIkcNw1SR3B1i6iL
MBFxNmLwc0HuNJ0KK2dOaqPimZIb9TJzYwIBAg==
-----END DH PARAMETERS-----
Download dhparam.pem
Copy to clipboard
Small private value length
-----BEGIN DH PARAMETERS-----
MIIBDAKCAQEA3CFkVr2csqy+yZjvlT4m+rVXvNnmdcBDohx6hd80q1eo9rz2hH0F
aQSDTNVW04UJCgj/tTeho4o3BEbSkzGW9OQNn70+f55Nrwji6AOUc8TcBoe7ba5m
LRgf2EcGXM+KtQBRV5vqHtjbjjwf0y+6H189FcE7LIJCyIyHeVs4hjrr/YGpuvcm
W5PFPgMwSwBctiM+6pTDtHHHbmQ7+JJlrWBs1HupZyYEqAqyBuvgfZDd3fXPtBF8
q8GjhL4nd8feIFdmR6c1/g1qHFK4WL8mM4Fet6nA7lgRdIYZCIkcNw1SR3B1i6iL
MBFxNmLwc0HuNJ0KK2dOaqPimZIb9TJzYwIBAgICAOE=
-----END DH PARAMETERS-----
Download dhparam-small.pem
Copy to clipboard

PARI/GP

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

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