QuantaFeed · Fix Playbook · Nginx + OpenSSL 3.5

How to Enable X25519MLKEM768 Post-Quantum TLS in Nginx

Finding / Symptom: Nginx negotiates classical X25519 or secp256r1 (flagged PP_26_4956_EXPOSED) instead of X25519MLKEM768.

Upgrade Nginx to a build linked against OpenSSL 3.5+ (Nginx >= 1.27.3), enable TLSv1.3, and prepend X25519MLKEM768 to ssl_ecdh_curve with zero downtime.

Copy-Paste Configuration Fix

# /etc/nginx/conf.d/ssl-pqc.conf (requires Nginx linked with OpenSSL >= 3.5)
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:SecP384r1MLKEM1024:X25519:secp384r1;
ssl_prefer_server_ciphers off;

# Verify OpenSSL linkage before reloading:
# nginx -V 2>&1 | grep -i openssl
# nginx -t && systemctl reload nginx

Verify Live

openssl s_client -connect yourdomain.com:443 -servername yourdomain.com -tls1_3 -groups X25519MLKEM768 </dev/null | grep -i "Server Temp Key"

Test your stack live: SSL / TLS 1.3 & Post-Quantum Checker

Frequently Asked Questions

Why does Nginx still negotiate X25519 after upgrading OpenSSL to 3.5?
Usually an older config file pins `ssl_ecdh_curve X25519:prime256v1;` which overrides OpenSSL 3.5 defaults. Update or remove that legacy directive and reload Nginx.