Back to Articles
December 2026
15 min read

PQR in Plain Words: The Post-Quantum Ratchet Explained

The Post-Quantum Ratchet is a way of making encryption keys depend on the traffic itself, so that stealing a key years later is not enough. Here is what it is, how it works, what it adds to today’s encryption and the new NIST standards, and what has been proven by machine.

The short version

  • The problem. Attackers record encrypted traffic today and plan to decrypt it later, when quantum computers or new maths break today’s keys.
  • The idea. PQR keeps folding the actual traffic into the secret state. To rebuild later keys, an attacker needs the starting key and the traffic they did not record.
  • The parts. It uses only NIST-standard building blocks: ML-KEM-1024, ML-DSA-87, SHA-512 and HMAC-SHA-512. No new cipher.
  • The proofs. 276 theorems are checked by the Lean proof assistant, in public, with no skipped steps. Anyone can rebuild them.
  • The benefit. One broken assumption is no longer enough. PQR keeps everything NIST post-quantum cryptography gives you and adds a barrier that does not depend on the key exchange staying unbroken.

The problem it solves

Almost every secure connection starts with a handshake. Two machines agree a secret key, and everything after that is protected by keys that come from it. That is efficient, and it has one weak point. If someone recovers the handshake secret later, they can usually recompute every key that followed and read everything they recorded.

This is why security agencies talk about “harvest now, decrypt later”. Storage is cheap. A patient adversary can record encrypted traffic for years and wait for one of three things: a quantum computer that breaks today’s public-key maths, a mathematical breakthrough nobody has published, or a stolen device that holds the key.

The new post-quantum standards (ML-KEM and ML-DSA, published by NIST in 2024) are the main answer to the first threat. They are much younger than the algorithms they replace, though. In 2022 SIKE, one of the leading post-quantum candidates, was broken on a laptop in about an hour. Nobody expects that of ML-KEM, but data with a secrecy life of 20 or 30 years should not depend on a single assumption.

PQR asks a simple question: what if knowing the starting key was not enough?

What PQR is

PQR, short for Post-Quantum Ratchet, is a software protocol. It sits on top of a normal post-quantum handshake and changes what the later keys depend on.

A ratchet is a mechanism that only turns one way. In cryptography it means a key that keeps moving forward and cannot be wound back. Signal’s messaging app made ratchets famous. PQR’s ratchet is different in one important way: what turns it is the confirmed traffic itself.

Picture two people keeping identical diaries. Every message they exchange is copied into both diaries, and each new lock combination is worked out from everything written so far. A thief who steals the first page years later can only follow along if they also have every page after it. If they missed even one important page, the combinations from that point on are a guess.

That is the core idea. The design goal is to add a second barrier that does not depend on the key exchange staying unbroken: an attacker has to have seen the traffic, not just be able to break the handshake. That barrier still relies on SHA-512 being strong.

How it works

The PQR transcript foldEight packets are each folded into a running accumulator, a1 to a8. Packet 5 was missed by the eavesdropper. An attacker who later recovers the starting key can recompute a1 to a4 but not a5 to a8. At the checkpoint, the hardened state h1 is computed from h0 and a8, so every later key depends on the missing packet.WIRE PACKETS (encrypted, authenticated)p1p2p3p4p5p6p7p8missedRUNNING HASHa0a1a2a3a4a5a6a7a8attacker with the stolen key can recomputeunknown without p5checkpoint: h1 = H( h0 ‖ a8 )all later packet keys are derived from h1
Each authenticated packet is folded into a running SHA-512 hash. If an eavesdropper missed packet 5, the chain from a5 onwards and every key derived from the next checkpoint is out of reach, even with the starting key. How far out of reach depends on how unpredictable p5 was, which is what Theorem 1 quantifies.
  1. A standard post-quantum handshake

    The two ends agree a starting secret with ML-KEM-1024 (FIPS 203) and sign the exchange with ML-DSA-87 (FIPS 204). These are the highest security levels of NIST’s new post-quantum standards. Nothing here is new.

  2. A key for every packet, even when packets go missing

    Each packet gets its own encryption and authentication keys, derived from the current secret state plus the packet’s sequence number. Because a key depends only on the state and the number, a receiver that lost packets 40 to 52 can still decrypt packet 53 straight away. Nothing needs to be resent. The paper calls this the key track.

  3. Every confirmed packet goes into a running hash

    After a packet passes its authentication check, both ends fold the whole packet, exactly as it travelled on the wire, into an accumulator. This is the binding track. Rejected or forged packets never go in.

    ai = SHA-512( ai−1 ‖ pi )
  4. Checkpoints harden the state

    Every N packets or T seconds, each side sends a short keyed tag that proves “my running hash matches yours” without revealing the hash. When both agree, the secret state moves forward:

    hk+1 = SHA-512( hk ‖ ae )

    From here on, every key depends on all the traffic up to that checkpoint. If the two sides disagree, they stay on the last agreed state.

  5. Optional: extra secret material during set-up

    A value exchanged where interception is physically impossible, such as a cable on a commissioning bench, can be folded in the same way. This also lets PQR work on one-way links like data diodes and downlinks: the binding track pauses and the key track continues from the seeded state. Operators who forbid pre-placed secrets can switch this off.

  6. Optional: authentication that holds against unlimited computing power

    A separate profile signs each record with a fresh one-time key using a polynomial over the prime 2127−1. The chance of forging any one of N records is at most 73N / (2¹²⁷−1), which is below 2−100 for up to about a million records. This bound needs no assumption about computing power, so it holds even if P = NP. It does depend on the one-time keys being truly fresh and secret, and each record uses up 32 bytes of shared secret material.

What PQR adds to today’s encryption

Most systems today protect data with a classical key exchange (RSA or elliptic curves) and a cipher such as AES. The NIST post-quantum standards replace the key exchange with ML-KEM, which closes the quantum-computer gap. In both cases, though, everything still rests on one handshake. PQR keeps the NIST protection and adds a second layer on top.

Today’s encryption
RSA / ECC + AES
NIST post-quantum
ML-KEM + AES
NIST post-quantum + PQR
Safe from a future quantum computer breaking RSA and elliptic curvesNoYesYes
If the key exchange is broken years laterRecorded traffic can be readRecorded traffic can be readUnpredictable traffic the attacker missed still stands in the way
Fresh traffic folded into the keys while the link runsNoNoYes, at every checkpoint
Lost packetsLeft to the transport layerLeft to the transport layerBuilt in, no resend needed
One-way links such as data diodesNeeds a two-way handshakeNeeds a two-way handshakeSupported after seeding
Authentication that holds even if P = NPNoNoOptional profile
New hardwareNoneNoneNone

The second row is the heart of it. ML-KEM is new, and its security rests on mathematical problems that are believed to be hard. If that belief ever turns out to be wrong, every session that relied only on ML-KEM is exposed at once. With PQR, recorded traffic does not automatically fall with it.

Why choose PQR

A second, independent barrier.

Breaking or stealing the handshake key is no longer enough on its own. Traffic the attacker missed, and could not predict, stays in the way.

Keys that keep absorbing the traffic.

Every checkpoint folds fresh traffic into the key state, so a packet an attacker missed carries forward into the keys that follow.

Protection against the unknown.

If a flaw in ML-KEM, a quantum computer or a mathematical breakthrough arrives later, recorded traffic does not automatically fall with it.

Built only from NIST standards.

ML-KEM-1024, ML-DSA-87, SHA-512 and HMAC-SHA-512. No home-made cipher: every building block is already standardised. The way PQR combines them still needs its own assessment, which is what the certification work covers.

Made for real-world links.

Lost packets need no resend, and after seeding it runs over data diodes and one-way downlinks.

A software protocol.

It runs in software or device firmware, or on QuStream’s FPGA hardware where a customer wants one. No dedicated fibre or line of sight, unlike quantum key distribution.

Automatic key handling.

Enrolment is automatic. Pre-placed secrets are an option, not a requirement.

Open to inspection.

The paper, the Lean proofs and the reference code are public, so anyone can check the claims.

What “proven in Lean” means

Most security papers are checked by people reading them. People miss things. Lean is a proof assistant: a programming language in which you write a mathematical proof, and a small, well-tested core checks every single step. If a step does not follow, the proof does not build. Mathematicians use it for some of the hardest results in modern maths.

The PQR repository contains 276 theorem declarations and 219 axiom audits. The audits are reports that list exactly which basic assumptions each proof rests on. They show only Lean’s three standard ones. There are no sorry placeholders (Lean’s way of saying “trust me, skip this step”), no custom axioms and no shortcuts. A public build runs on every change and fails if any proof is incomplete.

The process is strict enough to catch mistakes. During the audit it tightened several of the paper’s earlier statements, and the paper records each correction. That is the kind of rigour most security products never put in public.

What Lean checks. Lean proves the mathematics of the protocol’s model. As with any cryptographic system, the software that implements it is then tested and reviewed separately.

The central result, in plain words

Theorem 1 looks at an attacker who has the starting secret, saw every packet except the last one before a checkpoint, and may make a limited number of guesses: qF at the missing packet and qI at the internal state. It bounds their chance of rebuilding the next state:

Pr[recover] ≤ min{ 1, qF·2−γ + (qI+1)·2−λ }

In words: each guess at the missing packet succeeds with probability at most 2−γ, where γ is how many bits of uncertainty the attacker still has about that packet. qF is how many guesses they make. The second term covers guessing the 512-bit internal state directly, which is hopeless. So the attacker’s chance is set by how unpredictable the missing traffic is to them and how many guesses they get. With unlimited guesses the bound reaches 1, so the limit on guesses is part of the result, not a detail.

What is proven

The paper’s Appendix A lists every claim with its status. Here are the main results.

ClaimStatusWhat it means
The running hash behaves as specifiedChecked in LeanFolding is ordered and composable. Two different histories either give different results or reveal a hash collision.
Missing last packet blocks recovery (Theorem 1)Checked in LeanThe bound above, in an ideal model where SHA-512 behaves like a random function.
A gap followed by known traffic (Theorem 1a)Checked in LeanThe barrier survives known packets after the gap, with an explicit extra term.
Recovery from limited leakageChecked in LeanA bound with no computing assumption at all, given a stated limit on what leaked.
One-time polynomial authenticationChecked in LeanForgery at most 73N/(2¹²⁷−1), including adaptive attackers. The prime is proved prime inside Lean.
Extracted checkpoint keyCited resultBuilds on an established theorem from the cryptographic literature.
Full protocol, active attacks, quantum queriesNext stepsThe next stage of the formal work, listed openly in the paper’s Appendix A.

Compared with other approaches

Beyond standard encryption, there are other ways to protect long-lived secrets. Each puts its trust in a different place.

ApproachIf the handshake secret leaks years laterLossy or one-way linksHardwareMaturity
TLS 1.3 with hybrid ML-KEMRecorded session traffic can be decrypted.Needs a two-way handshake per session.NoneVery high, widely deployed
Signal-style double ratchetHeals with every round trip, but each step relies on public-key maths that a later break could undo.Needs replies to heal; not built for one-way links.NoneHigh for messaging
Quantum key distribution (QKD)Key exchange rests on physics, not maths.Needs dedicated fibre or line of sight; distance limited.Special optical equipmentNiche; several national agencies advise caution
Pre-shared keys or one-time padsSafe while the keys stay secret.Works anywhere once keys are delivered.None, but keys are moved by handWell understood; hard to scale
PQRUnpredictable traffic the attacker missed still stands in the way; bounded in the Lean model.Designed for gaps; runs one way after seeding.NoneNew; core proofs public and machine-checked

PQR is the only option here that needs no special hardware and no manual key handling, works on lossy and one-way links, and still does not rest everything on a single key exchange.

Good to know

  • It works best where capture is incomplete. That is the normal case for radio, satellite and long-haul links. Against an attacker with a perfect copy of every packet, you still have the full strength of the NIST post-quantum handshake and SHA-512.
  • Key state must only move forward. Like nonce rules in AES-GCM, implementations must not restore old key state from a snapshot or backup.
  • The formal work continues. The core model is machine-checked. The full protocol, active attacks and quantum queries are the next proof steps, listed in the paper’s Appendix A.

Where it fits

PQR is most useful where traffic must stay secret for a long time and an eavesdropper is unlikely to capture every byte.

  • Tactical radio, drones and satellite links. Noisy, lossy, often one-way, and interception is partial by nature.
  • Critical infrastructure. Grid, metering and industrial control links that run for decades, sometimes through data diodes.
  • Financial back offices. Custody, payment and signing links where recorded traffic keeps its value for years.
  • Digital assets. Links between MPC signing nodes, validators, cold storage and custody systems. PQR protects these channels. It does not change on-chain signatures, which need each blockchain’s own upgrade.
  • Long-lived government and health records moving between sites over links outside the owner’s control.

Check it yourself

Everything above can be verified. You need elan, Lean’s installer, and a few minutes.

git clone https://github.com/QuStream/pqr-lean.git
cd pqr-lean
lake update
lake exe cache get
lake build
lake env lean PQR_Phase2J.lean   # prints the axiom audits

The Python reference for the authentication profile needs only the standard library:

cd python
python3 demo.py
python3 -m unittest -v test_pqr_auth.py

The paper, “PQR: The Post-Quantum Ratchet, and its Security in a Bounded-Capture Adversary Model” by Adrian Neal (29 November 2026), maps every claim to its Lean declaration in Appendix A. The proofs are at github.com/QuStream/pqr-lean. Criticism, counterexamples and pull requests are welcome. Finding a problem is exactly what the public build is for.

Questions people ask

Is PQR unbreakable?

No serious cryptographer claims that about any system. What PQR offers is a second, independent barrier on top of NIST post-quantum cryptography, so one broken assumption is no longer enough.

Does it replace ML-KEM or AES?

No. It builds on the NIST post-quantum standards and adds to them. You keep everything ML-KEM and ML-DSA give you, plus a barrier that does not rely on the key exchange staying unbroken.

Is it information-theoretically secure?

Not as deployed, and it is not claimed to be. Two specific results hold without any assumption about computing power: the limited-leakage recovery bound and the one-time polynomial authentication bound. Both have stated conditions. The everyday data path still relies on SHA-512 and HMAC being strong.

Is it quantum-safe?

It is built entirely from NIST’s post-quantum standards and SHA-512, which are considered resistant to known quantum attacks. The current Lean proofs model classical attackers; extending them to quantum queries is one of the next proof steps.

Why not just use TLS with ML-KEM?

You should, where it fits. PQR is for cases where one handshake carrying decades of secrecy is too much to rest on a single assumption, and for links where TLS-style handshakes are awkward: lossy, one-way or rarely connected.

How is this different from Signal’s ratchet?

Signal’s ratchet refreshes keys with new public-key exchanges, which need messages in both directions. PQR’s ratchet is driven by the traffic itself and copes with gaps and one-way links. They solve related problems in different conditions.

Is the PQR paper peer-reviewed?

The PQR paper is a public preprint whose core results are machine-checked. That is a different kind of check from peer review, and both are useful. Adrian Neal’s earlier q-stream key-distribution paper passed double-blind review at the Future Technologies Conference 2025 and is published by Springer Nature (doi.org/10.1007/978-3-032-07989-3_17).

Sources

This explainer simplifies the paper. Where they differ, the paper and its Appendix A are the authority.