← Latest papers
⚛️ quantum physics

Quantum Cryptography and Autoformalization in Lean

This paper presents an end-to-end, formally verified security proof for the entanglement-based BB84 quantum key distribution protocol in Lean, which was enabled by LLM-based autoformalization and subsequently used as a discovery tool to optimize finite-size key rates, thereby establishing a reproducible standard for rigorous security arguments in quantum cryptography.

Original authors: Maor Ben Shahar, Jonathan Morag, Dirk Englund, Kfir Sulimany

Published 2026-10-14
📖 5 min read🧠 Deep dive

Original authors: Maor Ben Shahar, Jonathan Morag, Dirk Englund, Kfir Sulimany

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the world of secure communication, the most trusted locks are not made of steel, but of the fundamental laws of physics. This is the realm of quantum key distribution, a method where two people, traditionally called Alice and Bob, generate a shared secret code to protect their messages. Unlike traditional encryption, which relies on the difficulty of solving complex math problems, this approach relies on the fact that measuring a tiny particle of light, or a photon, inevitably changes it. If a third party, an eavesdropper named Eve, tries to listen in, she leaves a detectable trace of her interference. For decades, scientists have developed protocols to create these keys, but proving that these systems are truly secure has been a fragile process. The proofs often relied on a chain of mathematical arguments stitched together from different papers, each with its own set of assumptions. If one link in that chain was slightly mismatched with another, or if a hidden assumption was overlooked, the entire security guarantee could be compromised without anyone noticing.

A team of researchers at the Massachusetts Institute of Technology has now addressed this fragility by building a security proof from the ground up using a computer program designed to check mathematical logic. They focused on a specific, widely used method called the BB84 protocol, which uses pairs of entangled particles to generate keys. Instead of trusting a human to verify that every step of the logic holds together, they translated the entire security argument into a formal language that a computer can read and verify with absolute precision. The result is a machine-checked proof that leaves no room for hidden gaps or mismatched assumptions. It confirms that the protocol remains secure even when the number of particles exchanged is limited, a common real-world constraint that often weakens security estimates. Furthermore, the same computer system that verified the proof was used to discover a new, tighter mathematical bound, which reduces the finite-size penalty on the key rate.

The researchers began by creating a digital language within the computer system that strictly enforces the rules of local operations and classical communication. In the context of quantum cryptography, this means the computer ensures that Alice and Bob can only perform actions on their own particles and can only share information through public channels, never magically accessing each other's private data. This language acts as a guardrail, preventing the kind of logical errors that can slip past human reviewers. For instance, in earlier attempts to formalize these proofs, an artificial intelligence agent once proposed a method where the final key was created by combining strings that neither party actually possessed. The computer's strict rules immediately flagged this as impossible, forcing the team to refine their approach. By building the protocol step-by-step within this constrained environment, the team ensured that the final security theorem described exactly the physical process they intended to protect.

Once the protocol was constructed, the team asked the computer to verify its security against a powerful type of attack known as a coherent attack, where an eavesdropper interacts with all the particles simultaneously rather than one by one. The computer checked every logical step, from the initial measurement of the particles to the final steps of error correction and privacy amplification. It confirmed that the protocol is secure, meaning that if the system does not abort, the resulting key is indistinguishable from a perfect, random secret key, even to an eavesdropper with unlimited computing power. Crucially, the proof accounted for the fact that real-world systems operate with a finite number of particles, not an infinite stream. This finite-size effect usually forces scientists to be overly conservative, discarding more potential key material to ensure safety. The new proof, however, provided a precise calculation of how much key material can be safely kept, reducing the penalty imposed by these finite limits.

In a surprising turn, the researchers used the same computer pipeline not just to verify their work, but to improve it. While the system was checking the logic, it helped the team identify a tighter bound on the conditional-entropy variance used to estimate the security of these systems. The existing formula was too loose, leading to an unnecessary reduction in the length of the secret key. The team, guided by the computer's ability to test and compare different mathematical bounds, derived a new, sharper inequality. This new bound is tighter, allowing the system to generate keys with a reduced finite-size penalty compared to what the old formula would have permitted, without sacrificing security. This discovery was not a guess; it was a rigorous mathematical result that the computer verified as true, demonstrating that formal proof engines can do more than just check work—they can actively accelerate scientific discovery by finding better solutions to old problems.

The work also serves as a template for how future cryptographic systems should be validated. By releasing the underlying library of definitions and theorems as open source, the researchers have provided a reusable toolkit for the community. This library includes the formal definitions of quantum states, channels, and the specific language for describing protocols, allowing other scientists to build upon this foundation. It means that future proofs for different quantum protocols, or even for other areas of quantum information science, can be constructed with the same level of rigor. The team showed that by combining human insight with the relentless precision of machine-checked logic, it is possible to eliminate the hidden uncertainties that have long plagued the field. The result is a new standard for security arguments, one where the trustworthiness of a quantum key is not just a claim made by a researcher, but a fact verified by a machine.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →