ZirkoMirko tools / pq-shift Copy for agent

SECURITY UPDATE3 DEC 2026v1.0MIT

0x00 PQ Shift · post-quantum migration kit

Move off RSA and elliptic curves, in order, with proof.

Find common uses of RSA, elliptic-curve and classic Diffie-Hellman in your code and servers. Rank what to move first and test hybrid key exchange using the NIST post-quantum standards. Run it yourself or with your coding agent.

Copy prompt for your agentRun it yourself

One line for Claude Code, Codex, Cursor or any coding agent. It lists what it finds, stops at the plan and changes nothing until you approve. New here? Three things this week.

STATUS No public break. Migration urged.

Scroll six steps down through the old layers

0x01 Scan

Find every classic layer.

The scan reads your code, server and SSH configs, VPN configs, keys, certificates and dependency files, offline. It lists each use of RSA, elliptic curves and classic Diffie-Hellman with file and line. It changes nothing.

python pqshift.py scan . --json pq/before.json

The four tools, with real output

0x02 Probe

Check the front door.

The probe asks a server you own which key exchange it picks for a client that prefers the hybrid. It reads the server’s HelloRetryRequest, so it needs no post-quantum library. If the answer names X25519MLKEM768, visitors with a current browser already get the hybrid.

python pqshift.py probe yourdomain.com --authorized

What changes on the wire

0x03 Rank

Move what can be recorded first.

Traffic captured today can be stored and decrypted later if the algorithm falls (harvest now, decrypt later), so key exchange goes first. Signatures follow, ordered by how long the key is trusted. Weak-today findings get their own wave 0. The report writes the plan and a CBOM.

python pqshift.py report pq/before.json --plan pq/plan.md --cbom pq/cbom.json

What goes first, and the five waves

0x04 Migrate

Lay the new layer over the old.

The plan links a recipe for each finding: TLS servers, SSH, VPN, code, tokens and certificates. Key exchange moves to the hybrid: the classic part stays, so the connection is at least as strong as before. You approve each change, on a branch.

What supports the new algorithms

0x05 Guard

Stop adding to the pile.

The guard blocks new classic-only key exchange and encryption in a commit or pull request, with a fix line for each hit. It looks only at what is new, so old findings do not block today’s work. Rules for your agent keep new code on current standards.

python pqshift.py guard --staged

Hook, pre-commit and CI setup

0x06 Prove

Show the layer closed.

Run the same scan again to a new file and diff it: the check fails unless the findings you named are gone. A real handshake confirms a server change. The evidence is files you can hand on: a CycloneDX 1.6 CBOM and SARIF for your code host.

python pqshift.py report pq/after.json --diff pq/before.json --expect-closed IDS

prove.md · Tested, misses included

Watch: 50 seconds down through the layers

0x00 → 0x06 · scan, probe, rank, migrate, guard, prove

01What happened, and what this is

Words with a dotted underline explain themselves: point at one, tab to it or tap it.Words with a dotted underline link to a short explanation. All of them are in the glossary.

What happened
On 2 December 2026 Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle jointly backed US government guidance to move to NIST’s post-quantum standards “as soon as possible” (statement). The guidance itself, from ONCD, NSA and CISA, says recent advances disclosed by US AI companies, whose details have not been published, “do not present an immediate and widespread threat” to the cryptography in use (guidance).
In plain words
The public-key algorithms behind most encrypted connections and signatures today, RSA and elliptic curves, are being retired. Their replacements are standardised and already ship in current software, so for most systems the move is upgrades and settings, done in the right order. The slow part is finding every place the old ones are used.
What this does
PQ Shift inventories recognizable uses of classic public-key cryptography and ranks them for migration. It includes recipes for hybrid key exchange and post-quantum signatures. You approve each change. A re-scan, handshake or application test provides the evidence.
What it does not claim
Nobody has published proof that RSA or elliptic-curve cryptography is broken, and this project does not say it is; a finding means “uses an algorithm the guidance says to migrate”, not “exploitable today”, and a clean scan is not an audit or a guarantee.
Who it is for
People who are responsible for software or servers and are not cryptographers: founders, IT generalists, developers. You need Python or an AI coding agent. You do not need the maths.
How it was checked
43 rules, checked against a planted test repository and 9 published open-source packages (78 of 80 sampled findings correct). The results, misses included, are under Tested. Nothing here was reviewed by an outside party.

02If you only do three things this week

Nothing here says you are in danger today, and nobody finishes this move in a week. These three steps take an afternoon, change nothing in production and tell you where you stand.

  1. Get the list

    Run the scan on your main repository, or paste the prompt into your AI agent and let it do this step. The scan only reads files. You get every place a classic algorithm is used, with file and line, sorted by what to move first.

    python pqshift.py scan . --json pq/before.json
    python pqshift.py report pq/before.json --plan pq/plan.md --cbom pq/cbom.json

    You now have three files in pq/: the list, before.json; the order of work, plan.md; and cbom.json, an inventory (a CBOM) you can hand to an auditor or a customer.

  2. Check your front door, then fix what is weak today

    Ask each site you own which key exchange it picks. If the answer names X25519MLKEM768, visitors with a current browser already get the hybrid, often because a CDN in front of you switched it on. If it does not, the fix is usually one upgrade or one settings line, and the plan links the recipe.

    python pqshift.py probe yourdomain.com --authorized

    --authorized is you stating that the system is yours or that you have permission to test it.

    Then clear wave 0 in the plan. Those findings are weak against ordinary computers and are worth fixing whatever happens next.

  3. Stop adding to the pile

    Paste the rules into your agent’s instruction file and add the commit check. New code then starts on current standards while you work through the old.

    python pqshift.py guard --staged

After that. Work through the plan one wave at a time, on a branch, with a scan before and after as proof. Run the second scan with exactly the same command as the first, to a new file; the check in prove.md refuses to compare two different scans. For anything you do not run yourself (hosting, VPN, single sign-on, payment devices), ask the vendor when hybrid key exchange will be available. Give the answers to your agent at the triage step (agent.md, phase 2) and the plan gets a row for each.

03Run it

Two ways in, same result. With an AI coding agent, paste prompt A: the agent fetches the tool, makes the inventory, asks you a few plain questions and stops at the plan. Without one, run the tool yourself with B.

APrompt

Paste this into Claude Code, Codex, Cursor or any agent that can read a URL and run commands, inside your project folder.

It will ask how long each system’s data must stay secret and what faces the internet. “I don’t know” is an accepted answer.

Read https://zirkomirko.com/tools/pq-shift/agent.md and follow it on this project. Do the inventory and stop at the plan. Change nothing until I approve.

BTool

One file, Python 3.8+, no packages, works offline. Read it before you run it. Add --help to see every command with examples.

macOS, Linux, Git Bash

curl -fsSLO https://zirkomirko.com/tools/pq-shift/pqshift.py
python pqshift.py scan .

Windows PowerShell

iwr https://zirkomirko.com/tools/pq-shift/pqshift.py -OutFile pqshift.py
python pqshift.py scan .

CMCP optional

Skip this unless you want the agent to call the tool directly instead of through the shell. Five tools over MCP stdio: pq_scan, pq_probe, pq_report, pq_guard, pq_explain. Same JSON as the command line.

Claude Code

claude mcp add --transport stdio pqshift -- python /path/to/pqshift.py mcp

Codex

codex mcp add pqshift -- python /path/to/pqshift.py mcp

Cursor and other mcpServers clients

{
  "mcpServers": {
    "pqshift": {
      "command": "python",
      "args": [
        "/path/to/pqshift.py",
        "mcp"
      ]
    }
  }
}

Checksum: compare your download with SHA256SUMS (sha256sum -c SHA256SUMS.txt --ignore-missing, or Get-FileHash pqshift.py in PowerShell). This catches a damaged download, not a compromised website.

04The key share, to scale

At the start of a TLS connection the client sends a key share. Moving to the hybrid makes that one message bigger, and that is nearly all that changes on the wire.

Classic X25519 32 bytes

Hybrid X25519MLKEM768 1,216 bytes

Hover or tap a block.

Classic X25519 sends a 32-byte key share. Hybrid X25519MLKEM768 sends 1,216 bytes: a 1,184-byte ML-KEM-768 encapsulation key plus the same 32-byte X25519 share. The server answers with 1,120 bytes: a 1,088-byte ML-KEM-768 ciphertext plus 32.

One square is one byte. This is what changes in the handshake: the key share grows from 32 bytes to 1,216. The classic part stays, so the connection is at least as strong as before. Sizes: FIPS 203 (ML-KEM-768), RFC 10024 (X25519MLKEM768).

Why it matters to you: some older servers and network devices mishandle a first message this large. That is the reason every change is checked with a real handshake, and the reason the classic option stays available as a fallback.

05Four tools

One Python file. Four commands do the work; each prints a short summary for people and writes JSON for tools. The output below is real, captured by the release script, not a mock-up.

pqshift.py scan .

Reads your code, config, keys, certificates and dependency files offline and lists every classic public-key use, with file and line.

Use it to get the list. It changes nothing. Third-party and build folders are skipped and named under “not checked”; --include-vendored reads them too.

$ python pqshift.py scan . --json findings.json
PQ Shift 1.0.0  scan .  71 files  0.2 s  horizon 2030-01-01 (a policy date, not a prediction)
CRIT  WEAK-DH-SMALL              certs/dh1024.params:1                        PEM block: dh parameters 1024-bit
CRIT  WEAK-RSA-SMALL             certs/old.crt:1                              certificate CN=scanner-gw.harbor.example RSA-1024 sha1WithRSAEncryptio
CRIT  WEAK-SIG-SHA1              certs/old.crt:1                              certificate CN=scanner-gw.harbor.example RSA-1024 sha1WithRSAEncryptio
CRIT  WEAK-TLS-OLD               deploy/apache/ssl.conf:10                    SSLProtocol -all +TLSv1 +TLSv1.2 +TLSv1.3
CRIT  WEAK-DH-SMALL              deploy/ssh/sshd_config:8                     KexAlgorithms curve25519-sha256,ecdh-sha2-nistp256,diffie-hellman-grou
CRIT  WEAK-SIG-SHA1              deploy/ssh/sshd_config:9                     HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,ssh-rsa
CRIT  OBS-PQ-BROKEN              pq/sike_demo.c:5                             static const char *kem_name = "SIKE";
CRIT  OBS-PQ-BROKEN              pq/sike_demo.c:11                            int rc = sikep434_keypair(pk, sk);
CRIT  WEAK-DH-SMALL              scripts/make-certs.sh:10                     openssl dhparam 1024 > "$OUT/dh1024.params"
CRIT  WEAK-RSA-SMALL             services/api/app/crypto_utils.py:22          return rsa.generate_private_key(public_exponent=65537, key_size=1024)
HIGH  CRT-CA-HORIZON             certs/ca.crt:1                               CA CN=Harbor Root CA 2026 RSA-4096 sha256WithRSAEncryption until 2041-
HIGH  KEX-TLS-PINNED             deploy/apache/ssl.conf:11                    SSLOpenSSLConfCmd Curves secp384r1
HIGH  KEX-TLS-PINNED             deploy/haproxy/haproxy.cfg:4                 ssl-default-bind-curves X25519:P-256
HIGH  KEX-TLS-NO13               deploy/haproxy/haproxy.cfg:5                 ssl-default-bind-options ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 no-tl
... 118 more (use --json for all)
10 critical | 43 high | 50 medium | 7 low | 22 info || 12 already post-quantum | 4 not checked | 0 suppressed
Severity is migration priority, not "exploitable today" (except CRIT, which is weak with ordinary computers).
Next: python pqshift.py report findings.json --plan plan.md --cbom cbom.json

pqshift.py probe zirkomirko.com --authorized

Asks a live server which key exchange it picks for a client that prefers hybrid, without doing any post-quantum maths itself (it reads the server’s HelloRetryRequest). Only on systems you own or may test.

Use it to see what a server does, as opposed to what its config file says. It sees the edge, not the servers behind it.

$ python pqshift.py probe zirkomirko.com:443 --authorized --confirm-handshake
PQ Shift 1.0.0  probe  2026-12-03T11:17:55Z
zirkomirko.com:443           TLS 1.3 observed  hybrid-first client gets: X25519MLKEM768  hybrids accepted: X25519MLKEM768
                             classic-only client gets: x25519  TLS 1.2: ECDHE-ECDSA-AES128-GCM-SHA256
                             certificate: EC P-256, ecdsa-with-SHA256, until 2027-01-25
                             handshake with hybrid only: confirmed via node 24.11.1 / OpenSSL 3.5.4, hybrid-only offer (X25519MLKEM768)
0 critical | 0 high | 0 medium | 1 low | 2 info
Not checked: STARTTLS services; QUIC / HTTP/3; client-certificate endpoints; the hop behind a CDN or load balancer (only the edge answers); other IP addresses behind this name

pqshift.py report findings.json --plan plan.md

Turns findings into a ranked plan in waves, a CycloneDX CBOM, and a before/after diff that proves which findings closed.

Use it to decide the order, and after each change to prove it closed what it was meant to close.

$ python pqshift.py report findings.json --plan plan.md --cbom cbom.json
PQ Shift 1.0.0  report  132 findings from findings.json
  wave 0   10 findings  weak with ordinary computers (fix now, unrelated to quantum)
  wave 1   40 findings  key exchange and encryption that is internet-facing or guards long-lived data
  wave 2    6 findings  remaining key exchange and encryption, trust anchors
  wave 3   49 findings  signatures, tokens, certificates
  wave 4    5 findings  hygiene and items waiting on a fact
  plan  -> plan.md
  cbom  -> cbom.json (CycloneDX 1.6)

pqshift.py guard --staged

Blocks new classic-only key exchange and encryption in a commit or pull request, with a fix line for each hit.

Use it so the list stops growing. It looks only at what is new, so old findings do not block today’s work.

$ python pqshift.py guard --staged
FAIL  server.js:2  KEX-TLS-PINNED  high  const opts = { minVersion: 'TLSv1.2', ecdhCurve: 'X25519:P-256' };  | fix: Put X25519MLKEM768 first, keep X25519 and P-256 behind it; or delete the pin on a runtime whose default includes the hybrid.
warn  server.js:3  KEY-GEN  medium  const { publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLeng
pqshift guard: 1 failing, 1 warning, 0 allowed by policy
How to clear a failure: add the hybrid next to the classic algorithm (python pqshift.py explain RULE), or record a dated exception in .pqshift.json (see guard/pqshift.policy.example.json).

Also in the file

  • explain RULE-ID says what a finding means, why it matters and what to replace it with.
  • --sarif FILE on scan and guard writes SARIF 2.1.0, so findings show up in your code host’s scanning view.
  • mcp serves the same tools to an agent; rules and support print the tables on this page.
  • --help on any command shows its options and examples.

Exit codes, the same for every command

0Finished, and no check you asked for failed.
1Finished, and a check failed: scan --fail-on, guard or report --expect-closed.
2Could not run: wrong arguments, a missing file, git not available, or a probe that was not authorized or got no answer.
130Stopped with Ctrl+C.

06What goes first

The plan sorts work by when the damage would start, not by how alarming a finding looks.

Recorded now, read later. Traffic or files captured today can be stored and decrypted later if the algorithm falls (harvest now, decrypt later). That makes key exchange and public-key encryption first: it is the only category where waiting costs you retroactively.

Signatures next. A future break lets someone forge a signature from that day on; nothing recorded today is exposed. Order them by how long the key is trusted and how hard it is to replace, so long-lived roots move early.

Weak today is a separate list. Short RSA keys, SHA-1 signatures and similar are breakable or deprecated with ordinary computers. That is unrelated to quantum. Fix them now.

Traffic already recorded stays exposed after you switch. Once a connection is hybrid, rotate the long-lived secrets that crossed it before.

Default planning horizon: 2030-01-01. It is a policy date you can change, not a prediction. NIST IR 8547: “NIST will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use under NIST standards and guidelines after 2035” (source).

  1. 0
    Weak today Every critical finding. Fix now, regardless of quantum.
  2. 1
    Score 90 and up Key exchange and public-key encryption that faces the internet or guards long-lived data, plus the libraries that block them.
  3. 2
    Score 70 to 89 The remaining key exchange and encryption, and trust anchors.
  4. 3
    Score 40 to 69 Signatures, tokens and certificates.
  5. 4
    Below 40 Hygiene, and items waiting on one more fact.

How the score is made: a base for the rule, plus points for exposure to recording, for how long the data must stay secret and for being reachable from the internet. The plan shows the sum and its parts on every row, so you can argue with it.

07What it looks for

Every rule the scan and the probe apply; the same list as data is in rules.json. Priority is migration order, not exploitability: only critical means weak today. The second label says why a rule matters: recorded now, read later for secrecy that can be lost retroactively, trust anchor for long-lived keys, forgery for signatures. For the full story on one rule, run python pqshift.py explain KEX-TLS-PINNED.

43 rules: 5 critical, 17 high, 12 medium, 4 low, 5 info.

All 43 rules
IDPriorityWhatReplace with
OBS-PQ-BROKENcriticalweak todayBroken pre-standard post-quantum scheme (SIKE/SIDH/Rainbow)ML-KEM (FIPS 203) / ML-DSA (FIPS 204).
WEAK-DH-SMALLcriticalweak todayDiffie-Hellman group under 2048 bitsRemove it; use the hybrid group (X25519MLKEM768) with X25519 as fallback.
WEAK-RSA-SMALLcriticalweak todayRSA key under 2048 bitsGenerate a new key on the migration path; RSA 3072+ only as a stopgap.
WEAK-SIG-SHA1criticalweak todaySHA-1 / MD5 signature or DSASHA-256+ signatures; Ed25519 or ECDSA now, ML-DSA when the stack has it.
WEAK-TLS-OLDcriticalweak todaySSLv3, TLS 1.0 or TLS 1.1 enabledTLS 1.2 minimum, TLS 1.3 preferred.
CRT-CA-HORIZONhightrust anchorClassic CA certificate valid past the horizonPlan a re-root; do not issue new long-lived classic CAs.
KEX-CODE-DHhighrecorded now, read laterFinite-field Diffie-Hellman in codeTLS 1.3 hybrid, or the library's ML-KEM hybrid KEM.
KEX-CODE-ECDHhighrecorded now, read laterElliptic-curve / X25519 key agreement in codeTLS 1.3 hybrid between your own services; otherwise the library's ML-KEM hybrid KEM. No home-made combiner.
KEX-ENDPOINT-NO-PQhighrecorded now, read laterTLS endpoint does not accept any ML-KEM hybridEnable X25519MLKEM768 on the server or the edge in front of it.
KEX-ENDPOINT-SSH-NO-PQhighrecorded now, read laterSSH server offers no post-quantum key exchangeOpenSSH 10.0+ or list mlkem768x25519-sha256 first.
KEX-SSH-PINNEDhighrecorded now, read laterSSH key exchange pinned without a post-quantum methodRemove the line (OpenSSH 9.0+) or list mlkem768x25519-sha256,sntrup761x25519-sha512 first.
KEX-TLS-NO13highrecorded now, read laterTLS 1.3 disabled or capped at TLS 1.2Enable TLS 1.3 (post-quantum groups exist only in TLS 1.3); keep 1.2 as fallback.
KEX-TLS-PINNEDhighrecorded now, read laterTLS key-exchange groups pinned to classic curvesPut X25519MLKEM768 first, keep X25519 and P-256 behind it; or delete the pin on a runtime whose default includes the hybrid.
KEX-TLS-STATIC-RSAhighrecorded now, read laterCipher list allows RSA key transportRemove static-RSA suites; ECDHE suites only (static RSA also lacks forward secrecy).
KEX-VPN-IKEhighrecorded now, read laterIKE/IPsec proposals with classic key exchange onlyRFC 9370 additional key exchange with ML-KEM, or RFC 8784 post-quantum preshared key.
KEX-VPN-OVPNhighrecorded now, read laterOpenVPN without tls-crypt or a post-quantum TLS grouptls-crypt-v2; a post-quantum tls-groups entry where the build supports it.
KEX-VPN-WG-NOPSKhighrecorded now, read laterWireGuard peer without a PresharedKeyPer-peer PresharedKey (wg genpsk), distributed out of band.
PKE-CODE-EChighrecorded now, read laterElliptic-curve public-key encryption (ECIES, sealed box, JWE ECDH-ES)Library hybrid KEM + AEAD; re-wrap stored data keys.
PKE-CODE-RSAhighrecorded now, read laterRSA encryption or key wrappingLibrary hybrid KEM + AEAD (HPKE with an ML-KEM hybrid where available); re-wrap stored data keys.
PKE-TOOLhighrecorded now, read laterScript encrypts to a classic public keyTool version with post-quantum recipients where it exists; else record as open.
POLICY-EXPIREDhighinventoryPolicy exception past its end dateRenew it with a new reason and date, or fix the finding.
SIG-CODESIGNhightrust anchorRelease, package or firmware signing with a classic keyPlan ML-DSA or SLH-DSA (LMS/XMSS for firmware) with the signing vendor; keep the algorithm in config.
CRT-CLASSICmediumforgeryCertificate or CSR with a classic key or signatureShort lifetimes and automated reissue now; ML-DSA when your CA offers it.
DEP-RUNTIME-OLDmediumblockerRuntime or library too old for ML-KEM hybridsUpgrade to the version listed in support.json.
ENDPOINT-CERT-CLASSICmediumforgeryServed certificate uses a classic keyShort lifetimes and automated reissue now; ML-DSA when your CA offers it.
KEX-ENDPOINT-NOT-PREFERREDmediumrecorded now, read laterTLS endpoint supports the hybrid but prefers a classic groupPut the hybrid first in the server's group order.
KEX-LB-POLICYmediumrecorded now, read laterCloud load-balancer TLS policy without post-quantum key exchangeThe provider's post-quantum TLS policy; confirm with probe.
KEX-TLS-DHEmediumrecorded now, read laterClassic finite-field DHE in useHybrid group first; drop DHE.
KEY-FILEmediumunknown useClassic key fileDepends on use: see the KEX-* or SIG-* rule that applies.
KEY-GENmediumunknown useClassic key generationDepends on use: see the KEX-* or SIG-* rule that applies.
OBS-PQ-DRAFTmediumpre-standard PQPre-standard Kyber / Dilithium / draft hybridX25519MLKEM768, ML-KEM (FIPS 203), ML-DSA (FIPS 204).
SIG-CODE-ECmediumforgeryECDSA / EdDSA signatures in codeAlgorithm from config; ML-DSA where both ends are yours and the library supports it.
SIG-CODE-RSAmediumforgeryRSA signatures in codeAlgorithm from config; ML-DSA where both ends are yours and the library supports it.
SIG-JWTmediumforgeryJWT/JOSE signed with RSA or elliptic curvesAllow-list algorithms from config, short token life; move when the issuer supports ML-DSA.
DEP-BASE-IMAGElowblockerContainer base image that may ship OpenSSL older than 3.5Run `openssl version` inside the image; move the base tag.
KEX-SSH-DEFAULTlowrecorded now, read latersshd without KexAlgorithms (depends on the OpenSSH version)OpenSSH 9.0+ (sntrup761 default) or 10.0+ (ML-KEM default).
KEX-TLS-DEFAULTlowrecorded now, read laterTLS server with no group setting (depends on the TLS library)Probe it; upgrade the TLS library if the probe shows no hybrid.
SIG-SSH-ALGSlowforgeryClassic SSH host/user key algorithmsNothing to switch to in stable OpenSSH yet: inventory, keep Ed25519, watch.
DEP-CRYPTO-LIBinfoinventoryCryptography library (inventory)
ENDPOINT-TLS12infoinventoryTLS 1.2 still accepted (those clients get classic key exchange)Keep for compatibility until your clients are on TLS 1.3.
OK-PQ-KEXinfoinventoryHybrid or ML-KEM key exchange present
OK-PQ-SIGinfoinventoryML-DSA / SLH-DSA / LMS / XMSS present
PQ-ONLYinfoinventoryML-KEM group list with no classic fallbackCheck client compatibility; hybrid is the default advice.

08What supports the new algorithms

You can only switch on what your software supports. First the three standards, then the earliest version of each runtime, library and server that has them. Find your stack, compare it with the version you run, and upgrade before you change any setting. Rows marked unverified could not be confirmed from a primary source: check the vendor page before relying on them.

  • FIPS 203ML-KEMModule-Lattice-Based Key-Encapsulation Mechanism StandardPublished 2024-08-13
  • FIPS 204ML-DSAModule-Lattice-Based Digital Signature StandardPublished 2024-08-13
  • FIPS 205SLH-DSAStateless Hash-Based Digital Signature StandardPublished 2024-08-13

20 components, 3 marked unverified. A version in a cell is the first one with that feature; “n/a” means the component does not do that job.

ComponentML-KEMHybrid key exchangeML-DSANotesSource
OpenSSL3.5.03.5.0: default supported groups prefer hybrid PQC groups; default key shares are X25519MLKEM768 and X255193.5.0 (also SLH-DSA)Release notes: 'The default TLS keyshares have been changed to offer X25519MLKEM768 and X25519.'sourcechecked 2026-12-03
Go1.24 (crypto/mlkem)1.24: X25519MLKEM768 on by default when Config.CurvePreferences is nil (GODEBUG tlsmlkem=0 reverts); 1.26 also enables SecP256r1MLKEM768 and SecP384r1MLKEM1024 by default (GODEBUG tlssecpmlkem=0)1.27 (crypto/mldsa; ML-DSA in crypto/x509 and TLS 1.3 signatures)1.24 removed X25519Kyber768Draft00. 1.26 adds crypto/hpke with post-quantum hybrid KEMs. 1.27 released August 2026.source 1 source 2 source 3checked 2026-12-03
OpenJDK24 (JEP 496, javax.crypto KEM)27 (JEP 527): X25519MLKEM768 first in the default TLS 1.3 groups; SecP256r1MLKEM768 and SecP384r1MLKEM1024 available, not default24 (JEP 497)JDK 27 default group list: X25519MLKEM768, x25519, secp256r1, secp384r1, secp521r1, x448, ffdhe2048, ffdhe3072, ffdhe4096. Set with jdk.tls.namedGroups.source 1 source 2 source 3checked 2026-12-03
Node.js24.7.0 (ML-KEM key pairs, crypto.encapsulate/decapsulate)follows bundled OpenSSL; 24.11.1 bundles OpenSSL 3.5.4 and a default client and default server negotiate X25519MLKEM768 (tested 2026-12-03 on Windows 11)24.6.0 (ML-DSA keys and signing); SLH-DSA 24.8.0Official binaries first bundle OpenSSL 3.5 in 22.20.0 and 24.5.0 on those release lines. Check process.versions.openssl for downstream builds.source 1 source 2checked 2026-12-03
Python ssln/awhatever OpenSSL the interpreter is linked to (ssl.OPENSSL_VERSION); the python.org 3.12.6 Windows build we tested links OpenSSL 3.0.15: no hybridn/aWhich python.org builds ship OpenSSL 3.5 is unverified.local test 2026-12-03checked 2026-12-03
pyca/cryptography47.0.0 with AWS-LC or BoringSSL builds only; 48.0.0 adds OpenSSL 3.5.0+ (official wheels are built with OpenSSL 3.5.x)n/a47.0.0 (AWS-LC/BoringSSL); 48.0.0 with OpenSSL 3.5.0+; 49.0.0 adds ML-DSA certificate loading/signing in x509; 51.0.0 adds MLDSA44Ed25519 composite keys for OpenSSH48.0.0 was released 2026-05-04. The 47.x support applies only to builds against AWS-LC or BoringSSL.sourcechecked 2026-12-03
OpenSSHn/a9.0 prefers sntrup761x25519-sha512@openssh.com; 9.9 adds mlkem768x25519-sha256; 10.0 prefers ML-KEM; 10.1 warns on classic-only negotiation10.6: ssh-mldsa44-ed25519 hybrid signatures (ML-DSA-44 with Ed25519)Tested 2026-12-03: OpenSSH 10.0p2 lists mlkem768x25519-sha256 and sntrup761x25519-sha512 in `ssh -Q kex`. Windows' built-in OpenSSH_for_Windows_9.5p2 lists neither, and its `sshd -t` rejects both names.source 1 source 2checked 2026-12-03
.NET10 (System.Security.Cryptography.MLKem)depends on the OS TLS stack (SChannel / OpenSSL / Apple)10 (MLDsa, SlhDsa)The .NET 10 primitives need a supporting OS cryptography provider. Check MLKem.IsSupported and MLDsa.IsSupported. Hybrid TLS depends separately on the OS TLS stack.sourcechecked 2026-12-03
BoringSSL unverifiedyes (rolling)X25519MLKEM768check vendorNot verified for this release. Confirm the version with the vendor before relying on this row.—checked 2026-12-03
AWS-LC unverifiedyes (rolling)X25519MLKEM768check vendorNot verified for this release. pyca/cryptography 47+ uses it for ML-KEM / ML-DSA when built against it.—checked 2026-12-03
Bouncy Castle (Java)1.79BCJSSE: check vendor1.79The 1.79 release announcement names the final NIST ML-KEM, ML-DSA and SLH-DSA algorithms.sourcechecked 2026-12-03
rustlsvia aws-lc-rs providerX25519MLKEM768 with the aws-lc-rs provider; feature prefer-post-quantum makes it highest priority, and is in the default features of 0.23.47n/aThe first version with prefer-post-quantum on by default is unverified; 0.23.47 is what docs.rs showed today.source 1 source 2checked 2026-12-03
liboqs / oqs-provideryesoqs-provider adds groups to OpenSSL 3.xyesliboqs current 0.16.0 (2026-07-09). Project: 'should not be considered production quality'. oqs-provider version not checked.source 1 source 2checked 2026-12-03
Caddy unverifiedn/atls curves accepts x25519mlkem768; docs: 'It is recommended to not change the defaults.'n/aThe first version with the hybrid on by default is unverified.sourcechecked 2026-12-03
strongSwan6.0.0 (2024-12-03)IKEv2 multiple key exchanges (RFC 9370), e.g. proposal x25519-ke1_mlkem768check vendor—source 1 source 2checked 2026-12-03
OpenVPNn/atls-groups X25519MLKEM768 (with X25519 after it for mixed clients) when built with OpenSSL 3.5.0+; 2.7.0+ prints the key agreement in usen/aVersion 2.7.0 is named only for the log line; PQ groups depend on the TLS library.sourcechecked 2026-12-03
Chromen/a131: switched from X25519Kyber768 (0x6399) to X25519MLKEM768 (0x11EC); 124 had shipped Kybern/aVersion numbers are from Google's security blog.sourcechecked 2026-12-03
Firefoxn/a132: 'Added support for a post-quantum key exchange mechanism for TLS 1.3 (mlkem768x25519)'n/aRelease note says 'added support'; whether on by default in 132 on every platform is not stated there.sourcechecked 2026-12-03
Safari / Apple OSn/aiOS 26, iPadOS 26, macOS Tahoe 26, visionOS 26: ClientHello includes X25519MLKEM768 with a key share; on by default for URLSession and Network APIsn/aApple names the OS releases; Safari uses the system TLS (Apple security guide). Check with nscurl --tls-diagnostics on macOS 26.sourcechecked 2026-12-03
nginx / Apache httpd / HAProxyn/afollows the linked OpenSSL: 3.5.0+ neededn/aCheck nginx -V, httpd -V, haproxy -vv for the OpenSSL version actually linked.source 1 source 2 source 3 source 4checked 2026-12-03

09Tested

Two checks, both with their misses published. First a fictional company’s repository with planted classic cryptography, decoys that must not trigger, and items that are already post-quantum; the lines below are printed by tests/run_fixture.py. Then published open-source packages, with a random sample of the findings read by hand.

Planted 103 | found 103 | missed 0
Decoys 17 | false alarms 0
Already post-quantum 7 | recognised 7
Not checked 2 | reported 2

Ship gate: PASS (found >= 95%, 0 false alarms, all positives, all not-checked)

Notes

  • The fixture is a fictional company monorepo (fixture/harbor, 103 planted items, 17 decoys, 7 post-quantum positives) written by a separate agent from the rule table alone, before it saw the scanner. Its answer key was not edited after the first run.
  • The first blind run found 98 of 103. The 5 misses were 3 scanner bugs (files with .mod, .csproj, .ovpn extensions were not read; a Maven version on the same line as its artifact was missed; a list of only hybrid groups was reported as hybrid instead of "no classic fallback"). The scanner was fixed, not the key; the line above is the run after those fixes.
  • Run it yourself: python tests/run_fixture.py (from pqshift-fixture.zip plus pqshift.py).

Real code

Checked 2026-12-03 on 9 published packages, downloaded from their registries: jose 5.9.6 (JavaScript, npm), jsonwebtoken 9.0.2 (JavaScript, npm), node-forge 1.3.1 (JavaScript, npm), ssh2 1.16.0 (JavaScript, npm), paramiko 3.5.0 (Python, PyPI), PyJWT 2.10.1 (Python, PyPI), python-jose 3.3.0 (Python, PyPI), nimbus-jose-jwt (sources jar) (Java, Maven Central), golang.org/x/crypto 0.31.0 (Go, the Go module proxy). Command: python pqshift.py scan PACKAGE --include-vendored --include-build. A seeded random sample of the findings above info was read by hand, line by line.

RunFilesFindingsSample (seed)Correct
First run, before any fix1,13656270 (20261203)68 of 70
Second run, after the fixes below1,42095480 (7919)78 of 80

First run, before any fix, the 2 wrong:

  • SIG-SSH-ALGS on a Go struct field named HostKey (a server-config reader was run on source code)
  • DEP-RUNTIME-OLD on "node": ">=12" (an open-ended range says nothing about the version in use)

Second run, after the fixes below, the 2 wrong:

  • KEX-SSH-PINNED on a test line asserting a key exchange is absent (assert "..." not in kexen). Fixed afterwards for this rule.
  • SIG-JWT on a test line asserting "ES512" not in a list. Not fixed: a name inside a negative assertion is still reported for token rules.

What reading the full output showed, beyond the samples. Each was fixed in the scanner, and each has a test:

  • All 16 SIG-SSH-ALGS findings were wrong: SSH and web-server config readers ran on Python and Go source. They no longer run on programming-language files.
  • { bits: 256 } next to ecdsa was read as a small RSA key. A size on a line that names another algorithm is no longer an RSA size.
  • fmt.Errorf("ecdsa.GenerateKey: %v") matched key generation. The rule now needs the call, not the text.
  • jws.createSign( matched Node's crypto.createSign(. Method calls on other objects no longer match.
  • Mentions inside Python docstrings were reported as code. They are now treated as comments.
  • Missed: rsa.GenerateKey(rand.Reader, 1024) in Go, SSH key-exchange names written into code, and Java algorithm names passed through a helper ("SHA256withRSA", "RSA/ECB/..."). All three are now reported.
  • dist/ and build/ were skipped without a word, so the first run saw 3 of jose's 284 files. Skipped folders are now listed under not checked, and --include-build scans them.

What this does not show:

  • Nine open-source crypto libraries are not your application. These packages name algorithms on almost every line, which flatters the precision figure.
  • This measures precision (is a reported line really about the algorithm named). It does not measure recall: nobody listed everything these packages contain.
  • One person checked the samples, once. Findings in test folders count the same as findings in shipped code: 297 of the 953 left after the last fix (one fewer than the second run in the table).

Speed: 1,420 files in 3.1 s on the test PC (Windows 11, Python 3.12, files already in the disk cache). Before this pass the same scanner took about 25 ms per file; skipping rules whose literal text is not in a file brought that to about 2 ms, and a test checks the findings are identical with the shortcut on and off.

Standard formats

  • CycloneDX 1.6 CBOM: validated with jsonschema 4 against https://cyclonedx.org/schema/bom-1.6.schema.json (SHA-256 1ebcb88a...7e098f) for the fixture, the example probe and six of the packages above: 0 schema errors. A deliberately broken file was rejected.
  • SARIF 2.1.0: validated against https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json (SHA-256 c3b4bb2d...2a2682e) for the fixture and golang.org/x/crypto: 0 schema errors. Not uploaded to GitHub code scanning here.
  • pre-commit framework: the repo: local setup in guard/pre-commit-config.example.yaml blocked a classic-only TLS pin and passed the hybrid. .pre-commit-hooks.yaml needs a python3 command and failed on Windows without one; not run on macOS or Linux here.
  • Python 3.8: the test repository check (103 of 103) and the tool tests (47 of 47, run without the live probe) pass on CPython 3.8.10 on Windows. The file also parses with the 3.8 grammar, and the vermin checker reports 3.7 as the minimum version its syntax and library calls need.

Independent audit

After the work above, a second AI model that had not seen this pass audited the kit in a fresh session on 2026-12-03 and fixed what it found. That is still this project checking itself, not an outside review.

Misses it found by reading three PyPI packages by hand:

  • ecdsa 0.19.1: 2 findings in 83 files. The scanner misses the package's own signing and key-exchange code (for example keys.py line 1315 and ecdh.py line 302). Not fixed: code that implements an algorithm itself, instead of calling a library the rules know, is not recognised.
  • PyJWT 2.10.1: type references in jwt/algorithms.py (lines 41, 45 and 78) are counted as signing findings. Not fixed: read such lines before you count uses.
  • rsa 4.9.1: the scan found encrypt and sign but missed decrypt and verify in the same file. Fixed: all four are reported.

What it changed in the tool, with new tests for the probe, guard, proof check, redaction and MCP changes: the probe connects only to the address it checked, and an unclear answer is listed as not checked instead of as a negative; the guard reads the staged or committed content, not the working copy; --expect-closed needs --diff and an after-scan made the same way as the before-scan; more credential shapes are blanked in evidence lines; the MCP server answers the current handshake and returns failures as errors.

Recipes: it ran the nginx recipe on this PC (nginx 1.30.8 with OpenSSL 3.5.9: config test and a hybrid-only handshake) and compiled the Go examples on Go 1.27.4. The Apache, HAProxy, Caddy, strongSwan and OpenVPN recipes were checked against vendor documentation only.

With the final scanner the nine packages above give the same 953 findings, at the same files and lines, as before the audit, so the sampled figures above stand.

Agent run-through

On 2026-12-03 the agent doing this quality pass followed agent.md step by step on a copy of the test repository (fixture/harbor), with made-up triage answers, as if it had not seen the tool before. It is the same agent that then fixed what it tripped over, so this is a walk-through, not an independent test.

  • Inventory, triage, plan (phases 1 to 3): worked after four fixes. With the tool inside the project, the first scan reported 323 findings, 185 of them in the tool's own source. A second scan also read the first scan's JSON and reported 1,268. The scanner now leaves its own file and its own output out and names them under not checked. agent.md did not show the shape of a manual_findings entry; it does now, and one line is enough. A mistyped data_lifetime was silently treated as unknown; the report now stops and prints the allowed values.
  • Migrate (phase 4): part of wave 1 on a branch, nine findings in the nginx, HAProxy, Go gateway and SSH configs. The hybrid went in front of the classic entries; nothing was removed.
  • Prove (phase 5): report --diff --expect-closed with the nine ids printed closed 10 | remaining 128 | new 0 | post-quantum added 3, PASS, exit 0 (the tenth closed with the same edit). Before the fix the three new hybrids were counted as new, which read like a regression. A local Node server (Node 24.11.1, OpenSSL 3.5.4) with the same group list was probed: X25519MLKEM768 (0x11EC) selected through a HelloRetryRequest, a hybrid-only handshake completed, and a classic-only client still got x25519.
  • Also fixed on the way: the Next: hint after a scan pointed at the wrong folder; prove.md had no steps for a local test server; the exit-code line in agent.md did not say what to do with each code.

Not done: no real nginx, HAProxy or sshd was started and the Go code was not compiled (none is installed on the test PC), so those rows stay CHANGED, NOT PROVEN HERE. Phases 6 and 7 were read, not carried out, apart from the guard tests listed under Tools. No other agent or person has followed the protocol yet.

Tools

Checked 2026-12-03 on Windows 11, Python 3.12, Node 24.11.1 (OpenSSL 3.5.4). python tests/test_tools.py --live:

PASS  probe: refuses a public address without --authorized pqshift: Probe only systems you own or are authorized to test. 203.0.113.10 is outside loopback and RFC 1918: 
PASS  probe: refuses a public or unresolvable name without --authorized pqshift: example.com does not resolve to an address from this computer, so it ca
PASS  probe: hybrid server selects X25519MLKEM768 {'selected_for_pq_client': 'X25519MLKEM768', 'code': '0x11EC', 'method': 'HelloRetryRequest', 'supported_hybrids': ['X25519MLKEM768'], 'preferred': True}
PASS  probe: hybrid-only handshake confirmed node 24.11.1 / OpenSSL 3.5.4, hybrid-only offer (X25519MLKEM768)
PASS  probe: classic server -> KEX-ENDPOINT-NO-PQ {'selected_for_pq_client': 'x25519', 'code': '0x001D', 'method': 'HelloRetryRequest', 'supported_hybrids': [], 'preferred': False}
PASS  probe: classic server hybrid handshake fails hybrid-only handshake failed: ERR ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE
PASS  probe: cert parsed {'subject': 'localhost', 'issuer': 'localhost', 'sig_alg': 'ecdsa-with-SHA256', 'key': 'EC P-256', 'not_after': '2027-01-02T11:17:30Z', 'sha256': '72cc7880ab69ab499953602d91a7153bb07f16476c3a3fc08d39fbe121026cef'}
PASS  probe ssh: pq -> OK-PQ-KEX 
PASS  probe ssh: classic -> KEX-ENDPOINT-SSH-NO-PQ 
PASS  report: nginx recipe closes PINNED + NO13 (--expect-closed exits 0)   PASS  all 2 expected findings closed, no new high/critical
PASS  report: --expect-closed fails when the finding is still there 
PASS  report: CBOM has crypto assets 107 components
PASS  report: score arithmetic 70+20+20+10 = 120, wave 1 (120, {'base': 70, 'exposure': 20, 'lifetime': 20, 'reach': 10, 'context': 0}, 1)
PASS  guard: staged classic-only pin fails FAIL  tls.js:1  KEX-TLS-PINNED  high  const o = { ecdhCurve: 'X25519:P-256' };  | fix: Put X25519MLKEM768 first, keep X25519 and P-256 behind it; or delete the pin on a runtime whose default includes the hybrid.
PASS  guard: staged hybrid pin passes pqshift guard: 0 failing, 0 warnings, 0 allowed by policy
PASS  guard: signature-only change warns, exit 0 pqshift guard: 0 failing, 1 warning, 0 allowed by policy
PASS  guard: an unstaged exception cannot allow a staged finding 
PASS  guard: allow entry with a future date passes pqshift guard: 0 failing, 1 warning, 1 allowed by policy
PASS  guard: expired allow entry fails POLICY-EXPIRED 
PASS  mcp: initialize, tools/list, pq_scan 
PASS  mcp: pq_probe refuses without authorized=true 
PASS  parsers: truncated and junk input do not crash 1 errors
PASS  cli: 8 kinds of bad input exit 2 with a plain message, no traceback 
PASS  cli: --help documents the exit codes 
PASS  cli: split_target reads URLs, IPv6 and ssh:// 
PASS  scan: the speed prefilter does not change the result (129 findings either way) 
PASS  scan: LF, CRLF, UTF-8 BOM and UTF-16 files give the same finding on the same line 
PASS  scan: 6 source-code shapes that look like crypto are not reported 
PASS  scan: small RSA in Go, SSH kex names in code, capped Node range and key generation are reported ['KEY-GEN', 'WEAK-RSA-SMALL'] ['KEX-SSH-PINNED'] ['DEP-RUNTIME-OLD'] ['private_key = ec.generate_private_key(<redacted>)']
PASS  scan: --include-comments shows the docstring mention, marked as a comment 
PASS  scan: skipped build and third-party folders are listed under not checked third-party folders: node_modules (1) | build output folders: dist (1) | symmetric ciphers and hash functions
PASS  scan: --include-build and --include-vendored scan them 
PASS  scan: --sarif writes SARIF 2.1.0 (129 results, 37 rules, relative paths) 
PASS  guard: file names with spaces and accents are checked (2 failures, SARIF written) FAIL  clé.js:1  KEX-TLS-PINNED  high  const o = { ecdhCurve: 'X25519:P-256' };  | fix: Put X25519MLKEM768 first, keep X2
PASS  guard: a staged rename is still checked FAIL  clé.js:1  KEX-TLS-PINNED  high  const o = { ecdhCurve: 'X25519:P-256' };  | fix: Put X25519MLKEM768 first, keep X2
PASS  probe: one resolution, one pinned address, eight connection attempts including confirmation 
PASS  mcp: modern discovery, validation and continued service after invalid request 
PASS  scan: quoted credential and function argument are absent from evidence 
PASS  report: proof requires a before/after comparison 
PASS  scan: skips its own file and its own output, and says so 1 findings; PQ Shift's own files (4): pq/before.json, pq/before.sarif, pq/cbom.json, tools/pqshift.py | symmetric ciphers and hash functions
PASS  scan: a different file that happens to be called pqshift.py is still scanned ['KEY-GEN', 'WEAK-RSA-SMALL']
PASS  report: an answer outside the allowed values stops with the list of values pqshift: answers.json: system web has data_lifetime 'forever'. Use one of: 1-5y, 5-10y, <1y, >10y, unknown
PASS  report: a one-line manual item becomes a plan row PQ Shift 1.0.0  report  1 finding from before.json + 1 you reported in answers.json
PASS  report: a false-positive id that is not in the findings is refused pqshift: answers.json: false_positives lists ids that are not in the findings: F-0000000000
PASS  report: a false positive without a reason is refused pqshift: answers.json: every false_positives entry needs an "id" and a "reason"
PASS  report: the diff counts a new hybrid as 'post-quantum added', not as a new finding     closed  F-4d397d23f2 KEX-TLS-PINNED nginx.conf
PASS  report: --expect-closed with an id that was never there fails   FAIL  not in the before file (check the ids): F-0000000000
PASS  probe live: zirkomirko.com selects X25519MLKEM768 {'selected_for_pq_client': 'X25519MLKEM768', 'code': '0x11EC', 'method': 'HelloRetryRequest', 'supported_hybrids': ['X25519MLKEM768'], 'preferred': True}
48 of 48 tool tests passed

What these numbers do not prove

  • The fixture was written for this tool by the same project. It shows the tool does what it says on code shaped like the rules; it does not show how it does on your code. Expect misses on code that picks algorithms at run time, wraps crypto in its own helpers, or lives in languages outside the list.
  • Zero false alarms on 17 decoys is not zero false alarms in general. On real packages 2 of 80 sampled findings were wrong (see "Real code"). Review findings before acting on them.
  • The probe reads what the TLS or SSH endpoint answers. It sees the edge (a CDN or load balancer), not the servers behind it.
  • Nothing here was checked by an outside party.

0AWhat it will miss

  • Cryptography inside compiled binaries and closed appliances.
  • Algorithms chosen at runtime from config or a database.
  • Code that implements an algorithm itself or wraps it in its own helpers, instead of calling a library the rules know.
  • Managed services with no config in the repository.
  • The hop behind a CDN or load balancer: only the edge answers a probe.
  • Anything written in a language outside the supported list.
  • Hardware and embedded devices.

For each of these, ask whoever owns or sells the system and record the answer. The triage step has a place for things the scan cannot see, and each one becomes a row in the plan.

Use it as the first inventory, not the last word.

0BGuard new work

Two small pieces keep new work off the list: rules your AI agent reads before it writes code, and a check that runs when code is committed.

1. Rules for your agent: paste into CLAUDE.md, AGENTS.md or .cursor/rules

<!-- PQ Shift guard rules. Paste the section below into CLAUDE.md, AGENTS.md or .cursor/rules.
     Source: https://zirkomirko.com/tools/pq-shift/  (MIT) -->

## Cryptography rules (PQ Shift, 2026-12)
- Never choose algorithms ad hoc and never implement cryptography yourself. Use the platform TLS stack
  and maintained libraries at current versions.
- Do not pin TLS groups/curves or SSH KexAlgorithms to a classic-only list. If a pin is needed, the first
  entry is X25519MLKEM768 (TLS 1.3) or mlkem768x25519-sha256 (SSH), with classic entries after it.
- New services speak TLS 1.3. Post-quantum key exchange does not exist in TLS 1.2.
- Anything that protects secrecy with a public key (key exchange, encrypting to a recipient, key wrapping)
  uses a hybrid with ML-KEM (FIPS 203) from the library. No new classic-only RSA-OAEP, ECDH, ECIES or
  sealed boxes.
- Signatures: read the algorithm from configuration or key metadata, never hard-code it. Use ML-DSA
  (FIPS 204) where both ends support it, SLH-DSA (FIPS 205) for long-lived roots. Otherwise Ed25519 or
  ECDSA P-256 for now, with a note in the PR. No new RSA keys under 3072 bits, no DSA, no SHA-1.
- No pre-standard post-quantum code: Kyber, Dilithium, X25519Kyber768Draft00, SIKE.
- Encrypted data carries a format/algorithm version so it can be re-wrapped later.
- A classic algorithm required for interop needs an entry in .pqshift.json with a reason and an end date.
- Never print, copy or commit private key material. Never disable certificate checks to make something work.
- Before finishing work that touches keys, certificates, TLS, SSH, tokens or encryption, run
  `python tools/pqshift.py guard --staged` and fix what it reports. Do not bypass it with --no-verify.
- Library versions that support these: see tools/support.json. Check the vendor docs before relying on a version.

2. The commit check, as a git hook: save as .git/hooks/pre-commit (works under Git for Windows)

#!/bin/sh
python tools/pqshift.py guard --staged || exit 1

Or with the pre-commit framework: add to .pre-commit-config.yaml

repos:
  - repo: local
    hooks:
      - id: pqshift-guard
        name: PQ Shift guard
        entry: python tools/pqshift.py guard --staged
        language: system
        pass_filenames: false
        always_run: true
        require_serial: true
  • In CI run python tools/pqshift.py guard --diff origin/main. Add --sarif pq.sarif to show the hits in your code host. Job files for GitHub and GitLab are in pqshift.zip under guard/.
  • What the result means: exit 1 is a new classic-only use, with the fix printed next to it; exit 2 means the check could not run.
  • A classic algorithm you must keep for an old client goes into .pqshift.json with a reason and an end date. When the date passes, the check fails again.
  • Keep the script in your repository and compare it with SHA256SUMS. Never download it at CI time.

0CFiles

Everything is plain text you can read before you run it. Nothing needs an account.

pqshift.pyThe tool. One file, MIT.
pqshift.zipThe tool, protocol, recipes and data tables in one download, plus the guard templates: git hook, pre-commit config, GitHub and GitLab jobs.
pqshift-fixture.zipThe test fixture and run_fixture.py.
SHA256SUMSChecksums for the files above.
agent.mdThe protocol your agent follows.
prove.mdHow each change is proven.
migrate/The recipes the plan links to: TLS servers, SSH, VPN, code, tokens, certificates.
example/What you get, from the test repository: plan.md, findings.json, cbom.json.
rules.jsonEvery detection rule, as data.
support.jsonLibrary and runtime support, with sources.
glossary.jsonThe glossary on this page, as data.
llms.txtSummary for language models.
test-results.mdWhat was tested and what it does not prove.

SHA256SUMS

8fdccf82150b7e0d3b4bc2c81b0e6821df950885aa834f44aaec60d92256bd03  pqshift.py
237392d0c663fb102e43b42231c0ade19241fd4e37293e916358c7fe9922beb2  pqshift.zip
4b9a9a46b9b40cf9382d839bc732bfa93c5fc2b610586f5d8ebbebeba55d4f6d  pqshift-fixture.zip
76f33caea312957a4795e9717b325c017680fca15e6ff08858734ae3d1e6a471  agent.md

PQ Shift v1.0, 3 December 2026. MIT licence. Not affiliated with any signatory or agency.

0DGlossary

Every dotted word on this page in a sentence or two, written for people who run software rather than for cryptographers.

37 terms. The same text as data: glossary.json.

CBOMalso: cryptography bill of materials, CycloneDX
Cryptography bill of materials: a machine-readable list of the algorithms, keys and certificates a system uses. PQ Shift writes one in CycloneDX 1.6 format, which auditors and customers can ask for.
Certificatealso: cert, CA
A signed statement that a public key belongs to a name, for example your website’s address. Certificates involve signatures, not key exchange, so they move in a later wave.
Classicalso: classic-only, traditional
On this page, the public-key algorithms the guidance says to move away from: RSA, elliptic curves and Diffie-Hellman. AES and SHA-256 are a different kind of algorithm and are not what this tool lists.
Diffie-Hellmanalso: DH, DHE, finite-field Diffie-Hellman
A method that lets two computers agree on a secret key over a network anyone can listen to. The classic kind works with very large numbers; ECDH is the elliptic-curve kind.
ECDHalso: ECDHE
Elliptic-curve Diffie-Hellman. It is the usual key exchange in HTTPS and SSH connections today, most often on the curve X25519 or P-256.
Edgealso: CDN, load balancer
The first server a visitor reaches, often a CDN or load balancer run by someone else. A probe sees only the edge; the connection from the edge to your own servers needs its own check.
Elliptic curvealso: ECC, elliptic-curve
The public-key family behind ECDH, ECDSA, X25519 and Ed25519. Smaller and faster than RSA, and on the same list to migrate.
Finding
One place where the tool saw a classic algorithm: a file and line, or a live server. It means “on the list to migrate”, not “can be attacked today”.
FIPS 203, 204, 205also: FIPS 203, FIPS 204, FIPS 205, NIST standards
The US federal standards that define ML-KEM, ML-DSA and SLH-DSA. All three were published on 13 August 2024. “Move to the NIST standards” means these.
Forward secrecyalso: PFS, perfect forward secrecy
A property of a key exchange: every connection gets its own throwaway key, so stealing the server’s long-term key later does not open recorded sessions. It does not help if the key exchange itself is broken.
Harvest now, decrypt lateralso: HNDL, recorded now, read later, store now, decrypt later
Recording encrypted traffic today in order to decrypt it once the algorithm can be broken. This page calls it “recorded now, read later”. It is why key exchange moves first.
HelloRetryRequestalso: HRR
A TLS 1.3 reply that means “I would rather use this other group, send a key share for it”. The probe reads that reply to learn which group a server picks, without doing any post-quantum maths itself.
Horizon
The date you plan to be finished by. The default, 2030-01-01, is a policy date you can change. It is not a forecast of when anything will be broken.
Hybridalso: hybrid mode, hybrid key exchange
Two key exchanges run together, one classic and one post-quantum, and both results are mixed into the session key. An attacker has to break both, so you do not depend on the new algorithm alone.
KEMalso: key encapsulation mechanism
Key encapsulation mechanism. One side wraps a fresh secret with the other side’s public key and sends it across. It does the job of a key exchange, and the new standard, ML-KEM, works this way.
Key exchangealso: key agreement, key establishment, kex
The opening step of an encrypted connection, where both sides agree on the key that encrypts everything after it. If someone records it today and can break it later, they can read the whole recorded session.
Key share
The public value a client sends in its first TLS message so the key exchange can begin straight away. For X25519 it is 32 bytes; for the hybrid it is 1,216.
MCPalso: Model Context Protocol
Model Context Protocol: a common way to give tools to an AI agent. Run as an MCP server, PQ Shift lets the agent call scan, probe and report directly.
ML-DSAalso: Dilithium
The NIST standard for post-quantum signatures, FIPS 204. It grew out of Dilithium and is the general-purpose replacement for RSA and elliptic-curve signatures.
ML-KEMalso: ML-KEM-768, Kyber
The NIST standard for post-quantum key exchange, FIPS 203. It grew out of an algorithm called Kyber, but the final standard does not interoperate with pre-standard Kyber code.
Pinnedalso: pin, pinning
A setting that fixes the list of allowed algorithms, such as ssl_ecdh_curve in nginx or KexAlgorithms in SSH. A pin written before hybrids existed keeps a server on classic key exchange even after its software is upgraded.
Post-quantumalso: PQ, PQC
Public-key algorithms built on maths that neither today’s computers nor a large quantum computer is known to break. The name is historical: the guidance of 2 December 2026 was prompted by advances in AI models, and it points to the same algorithms.
Probe
A real connection attempt to a server you own, to see which key exchange it picks. A scan shows what a config file says; a probe shows what the server does.
Public-key cryptographyalso: asymmetric
Cryptography with two keys: a public one anyone may see and a private one you keep. It is how two computers that have never met agree on a secret, and how signatures work.
RSA
One of the oldest public-key algorithms, used for both encryption and signatures. It relies on factoring very large numbers being hard. It is on the list to migrate.
SARIF
A standard JSON format for the results of code-scanning tools. Code hosts and security dashboards can show it next to your code.
Severityalso: priority
How soon to move something, from critical down to info. Only critical means weak against ordinary computers today; the rest is migration order.
Signaturealso: digital signature
Proof that a file, token or certificate comes from the holder of a key and has not been changed. If a signature algorithm falls, forgeries become possible from that day; data recorded earlier is not exposed.
SLH-DSAalso: SPHINCS+
A second NIST signature standard, FIPS 205, built only on hash functions. Its signatures are large and slow to make, so it fits keys that sign rarely and are trusted for many years, such as roots.
Static RSAalso: RSA key transport
An old TLS mode where the client encrypts the session key with the server’s RSA key. It has no forward secrecy: whoever gets that one key can read every recorded session.
TLS 1.3also: TLS
The current version of TLS, the protocol that encrypts HTTPS. Post-quantum key exchange exists only in TLS 1.3, so a server capped at TLS 1.2 cannot use it.
TLS groupalso: named group, curve, supported groups
TLS’s name for a key-exchange method, also called a curve or named group. The client lists the groups it supports and the server picks one. X25519 is a group; so is X25519MLKEM768.
Tokenalso: JWT, JOSE
A small signed message a server hands to a logged-in user or to another service. Many are signed with RSA or elliptic-curve keys, which puts them in the signature wave.
Trust anchoralso: root, root CA
A key that other things are checked against, such as a root CA certificate or a code-signing key. Trust anchors last for years and are hard to replace, so their move is planned early.
Wave
The order of work, numbered 0 to 4. Wave 0 is weak today, wave 1 is key exchange exposed to recording, and the later waves are signatures and clean-up.
X25519
A widely used elliptic curve for key exchange. In the hybrid it stays as the classic half, next to ML-KEM.
X25519MLKEM768
The hybrid key exchange for TLS 1.3 that this page recommends: X25519 plus ML-KEM-768 in one step. It is defined in RFC 10024, and its number in the handshake is 0x11EC.

0ESources

Where the claims on this page come from. Each was read on the date shown.

  1. https://openai.com/index/joint-statement-post-quantum-cryptography/checked 2026-12-03
  2. https://www.anthropic.com/news/joint-statement-post-quantum-cryptographychecked 2026-12-03
  3. Joint Statement on Recent Advances in Cryptographic and Cybersecurity Capabilities Office of the National Cyber Director, National Security Agency, Cybersecurity and Infrastructure Security Agency
    https://www.cisa.gov/news-events/news/joint-statement-recent-advances-cryptographic-and-cybersecurity-capabilitieschecked 2026-12-03
  4. https://csrc.nist.gov/pubs/fips/203/finalchecked 2026-12-03
  5. https://csrc.nist.gov/pubs/fips/204/finalchecked 2026-12-03
  6. https://csrc.nist.gov/pubs/fips/205/finalchecked 2026-12-03
  7. https://csrc.nist.gov/pubs/ir/8547/finalchecked 2026-12-03
  8. https://www.rfc-editor.org/rfc/rfc10024checked 2026-12-03
  9. https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8checked 2026-12-03
  10. https://openssl-library.org/news/openssl-3.5-notes/checked 2026-12-03
  11. https://go.dev/doc/go1.24checked 2026-12-03
  12. https://go.dev/doc/go1.26checked 2026-12-03
  13. https://go.dev/doc/go1.27checked 2026-12-03
  14. https://openjdk.org/jeps/496checked 2026-12-03
  15. https://openjdk.org/jeps/497checked 2026-12-03
  16. https://openjdk.org/jeps/527checked 2026-12-03
  17. https://www.openssh.org/pq.htmlchecked 2026-12-03
  18. https://www.openssh.org/releasenotes.html#10.6checked 2026-12-03

Each row of the support table links its own vendor source.

What is PQ Shift?

PQ Shift is a free, MIT-licensed kit for moving your own systems off RSA, elliptic-curve and classic Diffie-Hellman cryptography. It is one Python file with no packages plus a protocol an AI coding agent such as Claude Code, Codex or Cursor follows. The scan command lists where code, server and SSH configs, VPN configs, keys, certificates and dependencies use classic public-key algorithms. The probe command shows which TLS key-exchange group a server you own selects, using a HelloRetryRequest, so it needs no post-quantum library. The report command ranks findings into waves (key exchange first, because recorded traffic can be decrypted later), writes a plan and a CycloneDX 1.6 CBOM, and diffs before and after scans as proof. The guard command blocks new classic-only key exchange in commits and CI. It does not claim RSA or elliptic curves are broken.

How it works

  1. Copy the one-line prompt into your coding agent inside your project. It reads agent.md and runs the read-only scan.
  2. Say how long each system's data must stay secret and whether it faces the internet. The agent ranks findings into waves.
  3. The agent adds the post-quantum hybrid next to the classic algorithm on a branch, never removing the old path in the same step.
  4. A re-scan shows the findings closed and a handshake probe shows X25519MLKEM768 selected.

FAQ

Is RSA broken?
Nobody has published proof that RSA or elliptic-curve cryptography is broken. On 2 December 2026 eight technology companies backed US guidance to move to the NIST post-quantum standards as soon as possible; the agencies said the advances behind it do not present an immediate and widespread threat.
Will it change my code?
Scan, probe and report are read-only. Changes happen only after you approve a wave, on a separate branch.
Does it need a post-quantum library?
No. It is one Python 3.8+ file using only the standard library. Confirming a full hybrid handshake uses Node or OpenSSL 3.5+ if present.
Is a clean scan an audit?
No. It is a first inventory. It misses cryptography inside compiled binaries, closed appliances and algorithms chosen at run time.
I am not a cryptographer. Where do I start?
With three steps that take an afternoon and change nothing in production: run the scan to get the list, probe the sites you own and fix what is weak today, then add the commit check so new code stops adding to the list. Every term on the page has a plain one- or two-sentence explanation in the glossary.
Does it work with my code-scanning and CI tools?
Scan and guard can write SARIF 2.1.0, the report writes a CycloneDX 1.6 cryptography bill of materials, and the guard ships as a git hook, a pre-commit framework hook and GitHub and GitLab jobs. Exit codes are 0 for done, 1 for a failed check and 2 for could not run.