Fix it, step by step
Turn on post-quantum key exchange on nginx.
Pick what serves your site. We'll go one step at a time, and the last step checks it worked.
By Brian Gagne, Co-founder and CTO, Kief Studio. Checked against its sources .
- Check which OpenSSL nginx uses, Completed
- Don't pin an old group list, Completed
- Test the config and reload, Completed
- Check it from outside, In progress
- Scan again, Not started
Rather not touch the config? Kief Studio can turn it on for you and prove it from outside.
Have us do itEvery step for nginx on one page
1. Check which OpenSSL nginx uses
ML-KEM needs OpenSSL 3.5 or later. From 3.5, OpenSSL offers and prefers X25519MLKEM768 by default. If nginx was built against an older OpenSSL, upgrade the package or your distribution first.
nginx -V 2>&1 | grep -i openssl2. Don't pin an old group list
nginx's default, ssl_ecdh_curve auto, hands the choice to OpenSSL, which is hybrid-first on 3.5. The usual way to lose post-quantum is an old ssl_ecdh_curve line that lists classical curves only. Remove it, or put the hybrid first.
Or delete ssl_ecdh_curve to use OpenSSL's default # In the server block for port 443ssl_protocols TLSv1.2 TLSv1.3;ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;3. Test the config and reload
A syntax error stops the reload, so test first.
sudo nginx -t && sudo systemctl reload nginx4. Check it from outside
Ask for the hybrid group on its own. A handshake that completes and names X25519MLKEM768 means it's offered. Then offer it alongside X25519 and check the hybrid still wins, which is what a browser sees.
Needs OpenSSL 3.5 or later on the machine you test from openssl s_client -connect yourcompany.com:443 -tls1_3 -groups X25519MLKEM768 </dev/null 2>&1 | grep -i groupopenssl s_client -connect yourcompany.com:443 -tls1_3 -groups X25519MLKEM768:X25519 </dev/null 2>&1 | grep -i group5. Scan again
Run the check on your address again. Key exchange should now pass, and the grade moves with it.