Canonical: https://ai-release.org/guides/kak-podgotovitsya-k-perehodu-na-postkvantovuyu-kriptogr.html · Markdown · JSON · Updated: 2026-12-04
openssl version), nginx with ssl_ecdh_curve support, curl, a Linux test host with root access, and a staging domain you can restart (<your-domain>)4433 that negotiates the hybrid post-quantum group X25519MLKEM768 — confirmed by a client-side Server Temp Key line.mldsa65.key / mldsa65.pub) plus a signature file produced and verified locally.nginx.conf snippet and a filled-in crypto inventory checklist that lists every RSA/ECDSA endpoint you must migrate.openssl version
openssl list -kem-algorithms | grep -i "ML-KEM"
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -noenc -keyout test.key -out test.crt -days 2 -subj "/CN=localhost"
openssl s_server -accept 4433 -cert test.crt -key test.key -groups X25519MLKEM768 -tls1_3Details and verification — in the steps below.

bash as your shell.PATH. Older builds do not expose ML-KEM or ML-DSA; check the documentation for your distribution's package name if openssl version reports something older.nginx.conf and restart the service.Inventory checklist — fill it in during Step 1:
What to do: Confirm that the crypto library on the host ships ML-KEM (a key-encapsulation mechanism, i.e. the "key exchange" half, standardized as FIPS 203) and ML-DSA (a digital signature scheme, the "signing" half, FIPS 204). Compare it against the running endpoints on your network.
openssl version -a
openssl list -kem-algorithms | grep -i "ML-KEM"
openssl list -signature-algorithms | grep -i "ML-DSA"
openssl s_client -connect <your-domain>:443 -tls1_3 </dev/null 2>/dev/null | grep -E "Protocol|Server Temp Key"Why: Post-quantum migration has two independent halves. Key exchange is fixed by a server config change; signatures need new certificates and new PKI support. Knowing which half your build supports tells you which change you can ship this week. The last command shows what your production endpoint negotiates today — for example Server Temp Key: X25519, 253 bits, which means the classical group is still in use.
How to check: Expect lines like ML-KEM-768 and ML-DSA-65 from the first two commands. If both greps return nothing, your build predates PQC support — swap the package or rebuild before continuing. Existing algorithms are still listed, so a build that prints only RSA/X25519 is a pre-PQC one.
Example: openssl list -signature-algorithms | grep -i "ML-DSA" printing ML-DSA-44, ML-DSA-65, ML-DSA-87 means the signature side is available; the number is the security level, higher is stronger and slower.

What to do: Start the lab server with the hybrid group X25519MLKEM768, then make a real ML-DSA keypair and sign a file. After the lab works, apply the nginx snippet to staging.
Terminal 1:
openssl s_server -accept 4433 -cert test.crt -key test.key -groups X25519MLKEM768 -tls1_3Terminal 2:
openssl genpkey -algorithm ML-DSA-65 -out mldsa65.key
openssl pkey -in mldsa65.key -pubout -out mldsa65.pub
printf 'release-2026.10' > app.bin
openssl dgst -sha512 -rawin -sign mldsa65.key -out app.sig app.bin
openssl dgst -sha512 -rawin -verify mldsa65.pub -signature app.sig app.bin
wc -c mldsa65.key app.sigWhy: X25519MLKEM768 is a hybrid group: it runs the classical X25519 exchange and the ML-KEM-768 encapsulation together and mixes both results. An attacker must break both to read the session, so you get post-quantum protection without losing compatibility. Signing with ML-DSA proves your build can produce quantum-resistant signatures before you ask a CA for a certificate.
For nginx on staging, add to the http or server block:
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:P-256;
ssl_prefer_server_ciphers off;How to check: The signing commands must end with Verified OK. openssl pkey -in mldsa65.key -text -noout should print ML-DSA-65 as the key type, and wc -c shows an ML-DSA key file in the multi-kilobyte range — far larger than an RSA-2048 PEM.
Example: printf 'release-2026.10' > app.bin then a successful verify prints exactly Verified OK. If you see Signature Verification failure, the public key and private key do not belong to the same pair. Note that some builds reject -rawin; check the documentation for your OpenSSL version and use the signing form it lists.

What to do: After nginx -t and a reload, connect to the staging host while forcing the hybrid group, and read the negotiated parameters.
nginx -t && systemctl reload nginx
openssl s_client -connect <your-domain>:443 -tls1_3 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -E "Protocol|Cipher|Server Temp Key"
curl -sS -o /dev/null -w "%{http_code}\n" https://<your-domain>/Why: A config line that nginx accepts is not proof the group is offered; only the handshake result proves it. Forcing -groups on the client removes ambiguity — if the server cannot honour it, the handshake fails instead of silently falling back to X25519.
How to check: Expect Protocol: TLSv1.3, a TLS 1.3 cipher line, and Server Temp Key: X25519MLKEM768. The exact formatting of that line varies between builds; what matters is the group name. curl must return 200. Repeat the check from a browser on the internal test page — if you want to automate it, the setup in How to Connect an AI Agent to Chrome: Browser Automation Setup lets you script the page load and see whether the app still renders.
Example: Before the change the grep prints Server Temp Key: X25519, 253 bits; after the reload the same command prints Server Temp Key: X25519MLKEM768. If the number is missing or different, the hybrid group is not active on that listener.
Problem. nginx refuses to start after adding the group
nginx: [emerg] SSL_CTX_set1_curves_list("X25519MLKEM768:X25519:P-256") failed (SSL:)nginx -V and read the built with OpenSSL ... part. If the version is older than the PQC-capable build you verified in Step 1, install a build linked against a newer OpenSSL and restart: systemctl restart nginx. Keep the old ssl_ecdh_curve line while you swap.Problem. Client handshake fails with a group error
Failed to set groups or no suitable key share-groups to confirm the endpoint works, then check the exact group name in the documentation for your OpenSSL version and use it verbatim. On curl the same limit appears as curl: (35) ... error: ....Problem. ML-DSA certificate breaks the client
no suitable signature algorithm or sslv3 alert handshake failure right after you replace the certificatessl_certificate/ssl_certificate_key point at the old pair, ssl_ecdh_curve X25519MLKEM768:X25519 stays. Use ML-DSA first for internal signing (Step 2), not for public TLS.You now have a verified hybrid TLS 1.3 listener, a working ML-DSA keypair, and an inventory of endpoints still using classical cryptography. Next, repeat Step 3 on every listener in the checklist, then decide with your CA when ML-DSA certificates can replace the current pair.
Is ML-KEM the same thing as Kyber?
ML-KEM is the standardized key-encapsulation mechanism derived from the Kyber submission; in TLS it is normally used in a hybrid group together with X25519, as in X25519MLKEM768. Check the FIPS 203 documentation for the exact definition your auditors expect.
Do I need a new TLS certificate for post-quantum TLS?
No. Hybrid key exchange works with your existing ECDSA or RSA certificate, which is why Step 2 is the fastest change to ship. A post-quantum certificate is only needed if you also want ML-DSA signatures on the certificate itself.
Will old clients stop working after I enable X25519MLKEM768?
If you list fallbacks, they keep working: ssl_ecdh_curve X25519MLKEM768:X25519:P-256 lets a client that does not know the hybrid group negotiate X25519 or P-256 instead. Remove the fallbacks only after your client inventory is clean.
Where do I start if I have hundreds of endpoints?
Start with the checklist from Step 1 and sort by exposure: public HTTPS first, internal services second, code-signing pipelines last. Each endpoint gets the Step 3 check before you move to the next one.
Status: practical guide. Some statements come from vendors; verify in your environment.
Time to complete: 60 minutes Difficulty: Intermediate
Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.
| Entity | Type | Role |
|---|---|---|
| постквантовая криптография | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| переход на постквантовую криптографию | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| ML-KEM | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| X25519MLKEM768 настройка | продукт/модель | упоминается в заголовке, TL;DR или разделах гайда |
| как включить PQC в OpenSSL | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| Linux | платформа/технология | упоминается в заголовке, TL;DR или разделах гайда |
No independent confirmation is provided; source claims and editorial conclusions are separated below.
| Source | Type | Role |
|---|---|---|
| No external links | — | — |
Cite as: AI Release. Как подготовиться к переходу на постквантовую криптографию: ML-KEM, ML-DSA и настройка TLS. ai-release.org.