Extends the Rocq-based logic Cryptis with Diffie–Hellman multiplication, inverses and exponent field operations. The authors use it for the first machine-checked symbolic security proofs of HMQV and OPAQUE.
(Public Exponentials). Suppose that g is a Diffie–Hellman atom and that m≠1 is a monomial over exponent atoms. We write x∈m when x occurs in m, and m/x for the monomial obtained by removing one occurrence of x from m. We say that publicgm holds if and only if it can be derived by one of the rules of Figure 4 and gm satisfies the release condition ∀x∈m,mathopboxempty(publicx⇒publicgm/x). We lift this definition to arbitrary non-atomic Diffie–Hellman terms: if t=∏g∈bases(t)g(∑img,i)/(dg) is non-atomic, where each mg,i is a monomial over exponent atoms and each dg is a polynomial over exponent atoms, we define publict=bigwedgeg∈bases(t)bigwedgeipublicgmg,i.
Rules for deriving public for an exponential gm, where g is a Diffie–Hellman atom and m is a monomial over exponent atoms. Each rule applies only if gm also satisfies the release condition of Definition IV.1.
Going deeper
Let be a public term and be a Diffie–Hellman atom. If is a monomial with a nonzero coefficient in the numerator of , then is public.
Two people mix paints to agree on a secret colour that an eavesdropper cannot make. Old checking tools understood mixing in one direction only. Newer protocols also combine colours and unmix them again, and the tools either cannot follow this or run out of memory.
This paper teaches one checking tool the full rules of mixing and unmixing. It also adds a rulebook for when a colour may be shown in public without giving away the secret. The checker does not hunt for proofs itself. People write each proof, and the machine checks every step.
With this they check two real protocols: one for agreeing keys, and one for logging in with a password without the server ever seeing it. Some colours that are safe in practice still cannot be shown under the rulebook. An AI coding agent wrote much of the work, and the authors reviewed it.
The abstract, word for word, with the six densest phrases unpacked.
Automated symbolic analyzers have had great success in verifying protocol security, but faithfully modeling the underlying cryptographic primitives remains a challenge. In particular, Diffie–Hellman key exchange and related protocols employ operations such as exponentiation, multiplication and inverses1, whose analysis might be unsupported by these tools or lead to scalability issues. In this paper, we take a different approach, showing how to reason about Diffie–Hellman terms with an interactive protocol logic2, which checks correctness proofs supplied by a user rather than attempting to prove such properties by itself. We extend Cryptis, a recent protocol logic built on the Rocq prover, with operations modeling multiplication and inverses in the group of exponents and in the Diffie–Hellman group, subject to standard equational laws. We define a set of sufficient conditions3 that guarantee that terms with these operations can be sent over the network safely, without compromising protocol security. Our approach is foundational: the equational laws of term operations and our safety conditions can be proved from first principles inside a proof assistant, leading to a small trusted computing base (TCB)4. Moreover, it enables compositional verification, where each protocol can be checked by combining independently verified components. We demonstrate our approach by providing the first machine-checked symbolic proof of security for the HMQV and OPAQUE protocols5. Our OPAQUE proof is the first to model its oblivious pseudo-random function sub-protocol concretely6, in terms of Diffie–Hellman operations rather than an abstract primitive.
Two lines of work lead here: automated symbolic analysers, and checked protocol logics.
Read four parts of it, in this order.
Skip Section II-A if you know Cryptis.
A sceptic should look at the model's limits and at the Tamarin comparison.
Like other symbolic tools [3, 28], our model abstracts the Diffie–Hellman group as a group of prime order. Cremers and Jackson [30] show that this abstraction misses attacks that exploit the structure of the groups used in practice, such as small subgroups and invalid curve points, and extend Tamarin to model them. For example, Menezes [31, Section 2.2] showed that an attacker who uses long-term and ephemeral keys of small order could recover the long-term private key of an HMQV peer, unless certain checks are added to the protocol. Our model cannot express such elements, so our results only apply to implementations that perform these checks or that use groups of prime order.
We now turn our attention to the OPAQUE protocol of Section II-D. We modeled this protocol in the Cryptis programming language in about a hundred lines of code. The model follows the original OPAQUE paper [15, Fig. 12] and includes the client and server authentication functions, as well as the server function for registering a new client. We assume that the password reaches the server over a secure channel during registration, which we model by running make_file on the server with the password as an argument. Our model has a few differences with respect to the original paper; notably, it does not include the session identifiers sid and ssid (which are needed to model the protocol in the Universal Composability framework) and does not include certain group membership checks that Cryptis does not currently support. As in HMQV, all hashes carry distinct tags, which we omit below. Since OPAQUE builds upon HMQV, we focus on the parts of the protocol that have not been discussed yet.
Naturally, our evaluation leaves several questions open. On the one hand, it would be interesting to measure the cost of AI-assisted proof development in Cryptis in a more systematic way. On the other hand, we should evaluate how well Tamarin would fare with a hand-written model running with more computational resources, especially given how cost-intensive AI agents are.
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
As described in Sections III and VII, most code in our extension and case studies was implemented with the assistance of a coding agent. We used Anthropic’s Claude Code with several models, especially Opus. We carefully reviewed the generated code to make sure that the specifications were understandable and that they reflected our intent. We also used Claude to trim, edit, and apply minor fixes to the text, to copy experiment results, and to aid with bibliographical research.
More latest news
Read all