Post-Quantum

From Design to Code: Formally Analyzing Signal's Post-Quantum Ratchet

Formal analysis of Signal's Sparse Post-Quantum Ratchet, from the protocol design to machine-checked proofs on its Rust implementation. Paper at ACM CCS 2026.

2026·11·12 3 min read

In 2025, Signal deployed the Sparse Post-Quantum Ratchet (SPQR) . It runs alongside the classic Double Ratchet and is designed so that conversations keep their forward secrecy and post-compromise security unless both elliptic-curve Diffie-Hellman and ML-KEM are broken. At ACM CCS 2026 in The Hague this November, Rolfe Schmidt from Signal will present our joint paper with the formal specification and security analysis of SPQR. The analysis covers not only the design but also the Rust code that ships in Signal.

The paper, A Formal Analysis of Signal’s Sparse Post-Quantum Ratchet Protocol and Its Implementation, is joint work by Karthikeyan Bhargavan and Maxime Buyse (pereq , formerly Cryspen), Graeme Connell and Rolfe Schmidt (Signal), and Franziskus Kiefer (CE Labs). SPQR uses the formally verified ML-KEM implementation from libcrux .

The Challenge

Post-quantum KEMs are not drop-in replacements for Diffie-Hellman. They don’t support non-interactive key exchange, and their messages are more than an order of magnitude larger. While the Double Ratchet can attach a fresh public key to every message, SPQR cannot: it has to split key-exchange messages into chunks, use erasure codes so that lost or out-of-order messages don’t stall key agreement, and produce new keys only after receiving enough chunks. The result is a more complex state machine with subtler security guarantees. When exactly does a compromised device heal? Which epochs does a given compromise expose?

Verification-Driven Design

At the core of SPQR is ML-KEM Braid , a sparse continuous key agreement (SCKA) protocol: the two parties take turns, one streaming an ML-KEM encapsulation key and the other streaming back a ciphertext, and each completed round yields a fresh shared secret for a new epoch.

Rather than analyzing a finished protocol, the analysis was part of the design cycle from the start. ML-KEM Braid and several alternative candidates were modeled in ProVerif to guide the design. The models made it possible to compare the candidates’ forward-secrecy and post-compromise-security guarantees under dynamic compromise. The resulting vulnerability sets, combined with simulations of messaging behavior, helped Signal choose between, for example, a faster ad-hoc construction and one built on standardized IND-CCA ML-KEM.

Verification-Constrained Development

A design model doesn’t help much if the code drifts away from it. Using the hax toolchain, parts of the spqr crate were proven in F* to be free of runtime errors such as panics, integer overflows, and out-of-bounds accesses, with functional correctness proofs for subtle code such as the Galois-field arithmetic behind the erasure codes. ProVerif models were also extracted directly from the Rust code and re-verified against the same security queries as the design model.

Along the way, verification caught missing input checks at function boundaries and, in an early candidate, a real state-machine bug where the epoch counter advanced too early. The proofs live in Signal’s public SparsePostQuantumRatchet repository . The proofs run on CI, just like any other test.

What’s Still Open

This is a first step, and a lot of work remains. There is no computational proof yet: a reduction showing that a concrete SCKA such as ML-KEM Braid is secure under the KEM’s assumptions is still open. On the implementation side, only parts of the spqr crate are verified. Extending the proofs to the rest of the code, and connecting the design-level and code-level guarantees more tightly, is ongoing work.


Bringing post-quantum security to your own protocol? We help with protocol analysis and high-assurance post-quantum implementations; get in touch .