Enable post-quantum key exchange with OpenSSL 3.5
OpenSSL 3.5 is the first release with ML-KEM built in. Servers that use its default group list offer and prefer X25519MLKEM768 with no change.
Before you start
- Check the version your server links:
openssl versionshows the command-line tool; your web server or application may link a different copy (for nginx:nginx -V). - Earlier OpenSSL releases need the separate OQS provider; upgrading to 3.5 is simpler.
Option 1: keep the defaults
OpenSSL 3.5's default list puts X25519MLKEM768 first, with X25519 and the NIST curves as fallbacks.
- Look for a group list your server sets:
grep -rni "groups\|curve" /etc/ssl/openssl.cnfand your server's own TLS settings. - Remove any list that leaves out X25519MLKEM768, then restart the server.
Option 2: set the groups system-wide
- Find the
openssl.cnfyour server reads:openssl version -dshows the directory. - Under the section your system default points to, set:
[system_default_sect]
Groups = X25519MLKEM768:X25519:P-256
- Restart the server so it reads the file again.
Option 3: set the groups in your own code
For an application that sets up TLS itself:
SSL_CTX_set1_groups_list(ctx, "X25519MLKEM768:X25519:P-256");
Keep X25519MLKEM768 first in every list, or clients that offer both get classical key exchange.
Check
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "group"
Then scan your domain below.