Gilles Barthe’s research while affiliated with Max Planck Institute for Security and Privacy and other places

What is this page?


This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.

Publications (378)


Quantum Weakest Preconditions for Reasoning about Expected Runtimes of Quantum Programs
  • Article

May 2025

·

7 Reads

Journal of the ACM

Junyi Liu

·

Li Zhou

·

Gilles Barthe

·

We study expected runtimes for quantum programs. Inspired by recent work on probabilistic programs, we first define expected runtime as a generalisation of quantum weakest precondition . Then, we show that the expected runtime of a quantum program should be represented as the expectation of an observable (in physics). A method for computing the expected runtimes of quantum programs in finite-dimensional state spaces is developed. Several examples are provided as applications of this method, including computing the expected runtime of quantum Bernoulli Factory – a quantum algorithm for generating random numbers. In particular, using our new method, an open problem of computing the expected runtime of quantum random walks introduced by Ambainis et al. ( STOC 2001) is solved.



Complete Quantum Relational Hoare Logics from Optimal Transport Duality
  • Preprint
  • File available

January 2025

·

7 Reads

We introduce a quantitative relational Hoare logic for quantum programs. Assertions of the logic range over a new infinitary extension of positive semidefinite operators. We prove that our logic is sound, and complete for bounded postconditions and almost surely terminating programs. Our completeness result is based on a quantum version of the duality theorem from optimal transport. We also define a complete embedding into our logic of a relational Hoare logic with projective assertions.

Download

Automating Equational Proofs in Dirac Notation

January 2025

·

1 Read

·

2 Citations

Proceedings of the ACM on Programming Languages

Dirac notation is widely used in quantum physics and quantum programming languages to define, compute and reason about quantum states. This paper considers Dirac notation from the perspective of automated reasoning. We prove two main results: first, the first-order theory of Dirac notation is decidable, by a reduction to the theory of real closed fields and Tarski's theorem. Then, we prove that validity of equations can be decided efficiently, using term-rewriting techniques. We implement our equivalence checking algorithm in Mathematica, and showcase its efficiency across more than 100 examples from the literature.


Preservation of Speculative Constant-Time by Compilation

January 2025

·

2 Reads

·

4 Citations

Proceedings of the ACM on Programming Languages

Compilers often weaken or even discard software-based countermeasures commonly used to protect programs against side-channel attacks; worse, they may also introduce vulnerabilities that attackers can exploit. The solution to this problem is to develop compilers that preserve such countermeasures. Prior work establishes that (a mildly modified version of) the CompCert and Jasmin formally verified compilers preserve constant-time, an information flow policy that ensures that programs are protected against timing side-channel attacks. However, nothing is known about preservation of speculative constant-time, a strengthening of the constant-time policy that ensures that programs are protected against Spectre-v1 attacks. We first show that preservation of speculative constant-time fails in practice by providing examples of secure programs whose compilation is not speculative constant-time using GCC (GCC -O0 and GCC -O1) and Jasmin. Then, we define a proof-of-concept compiler that distills some of the critical passes of the Jasmin compiler and use the Coq proof assistant to prove that it preserves speculative constant-time. Finally, we patch the Jasmin speculative constant-time type checker and demonstrate that all cryptographic implementations written in Jasmin can be fixed with minimal impact.


A Quantitative Probabilistic Relational Hoare Logic

January 2025

·

12 Reads

·

2 Citations

Proceedings of the ACM on Programming Languages

We introduce eRHL, a program logic for reasoning about relational expectation properties of pairs of probabilistic programs. eRHL is quantitative, i.e., its pre- and post-conditions take values in the extended non-negative reals. Thanks to its quantitative assertions, eRHL overcomes randomness alignment restrictions from prior logics, including pRHL, a popular relational program logic used to reason about security of cryptographic constructions, and apRHL, a variant of pRHL for differential privacy. As a result, eRHL is the first relational probabilistic program logic to be supported by non-trivial soundness and completeness results for all almost surely terminating programs. We show that eRHL is sound and complete with respect to program equivalence, statistical distance, and differential privacy. We also show that every pRHL judgment is valid iff it is provable in eRHL. We showcase the practical benefits of eRHL with examples that are beyond reach of pRHL and apRHL.


Transparent Decompilation for Timing Side-Channel Analyses

January 2025

·

6 Reads

This paper considers the problem of analyzing the timing side-channel security of binary programs through decompilation and source-level analysis. We focus on two popular policies, namely constant-time and speculative constant-time, (S)CT for short, used to protect cryptographic libraries. First, we observe that popular decompilers remove (S)CT violations, i.e., transform non-(S)CT programs into (S)CT programs; it follows that analyzing decompiled programs is not sound. Second, we develop techniques to prove that decompilers are transparent, i.e., neither introduce nor remove (S)CT violations. Third, we apply our techniques to \refleCT{}, a core but non-trivial decompiler. As a contribution of independent interest, we find that constant-time verification tools may not be sound, due to their use of preprocessors (e.g.\, binary lifters or IR converters) that eliminate CT violations.


Laws of Quantum Programming

December 2024

·

33 Reads

In this paper, we investigate the fundamental laws of quantum programming. We extend a comprehensive set of Hoare et al.'s basic laws of classical programming to the quantum setting. These laws characterise the algebraic properties of quantum programs, such as the distributivity of sequential composition over (quantum) if-statements and the unfolding of nested (quantum) if-statements. At the same time, we clarify some subtle differences between certain laws of classical programming and their quantum counterparts. Additionally, we derive a fixpoint characterization of quantum while-loops and a loop-based realisation of tail recursion in quantum programming. Furthermore, we establish two normal form theorems: one for quantum circuits and one for finite quantum programs. The theory in which these laws are established is formalised in the Coq proof assistant, and all of these laws are mechanically verified. As an application case of our laws, we present a formal derivation of the principle of deferred measurements in dynamic quantum circuits. We expect that these laws can be utilized in correctness-preserving transformation, compilation, and automatic code optimization in quantum programming. In particular, because these laws are formally verified in Coq, they can be confidently applied in quantum program development.



Fig. 12. The code for Example 3.1 is given on the left. Variables are marked in blue, symbols introduced in DiracDec are marked in brown, and definitions in the field are marked in purple. The explanations for each command are given on the right.
Fig. 14. An illustration of Theorem C.9 proof. Solid, dashed and dotted lines represent rewritings in í µí± DN , í µí± ′ DN and the type erasure respectively. Blue, red, yellow and green surfaces represent the application of Lemma C.5, Lemma C.6, Lemma C.4 and Lemma C.7 respectively.
Automating Equational Proofs in Dirac Notation

November 2024

·

36 Reads

·

1 Citation

Dirac notation is widely used in quantum physics and quantum programming languages to define, compute and reason about quantum states. This paper considers Dirac notation from the perspective of automated reasoning. We prove two main results: first, the first-order theory of Dirac notation is decidable, by a reduction to the theory of real closed fields and Tarski's theorem. Then, we prove that validity of equations can be decided efficiently, using term-rewriting techniques. We implement our equivalence checking algorithm in Mathematica, and showcase its efficiency across more than 100 examples from the literature.


Citations (65)


... An actively maintained online list of "constant-timeness' verification tools (CT-tools) contains, at the time of writing, 55 different tools [13]. However, testing whether a program is data-oblivious remains challenging as these tools are typically not integrated into modern toolchains, have significant technical limitations including high overheads to compilation time, and high-numbers of false-positives, and are difficult to use [27,30,39]. The principal shortcoming of static analysis approaches is that data-obliviousness can only be defined at machine-code level, rather than for high-level language constructs. ...

Reference:

BLACKOUT: Data-Oblivious Computation with Blinded Capabilities
"These results must be false": A usability evaluation of constant-time analysis tools
  • Citing Conference Paper
  • January 2024

... Recently, both Arranz Olmos et al. [3] and van der Wall and Meyer [26] have demonstrated how to verify compilers against speculation-aware semantics. Both consider an adversary's actions to be a source of nondeterminism, modeled by parameterizing the semantics over directives (analogous to oracles and refiners), which "model the ability of an adversary to influence program execution" [3]. ...

Preservation of Speculative Constant-Time by Compilation
  • Citing Article
  • January 2025

Proceedings of the ACM on Programming Languages

... We also present characterizations of quantum distance measures (trace distance and Wasserstein semi-distance), diamond norm for programs, non-interference and quantum differential privacy. Finally, as a contribution of independent interest, we prove that the recently proposed relational Hoare logic eRHL for probabilistic programs [4] is complete for all bounded postconditions and AST programs. ...

A Quantitative Probabilistic Relational Hoare Logic
  • Citing Article
  • January 2025

Proceedings of the ACM on Programming Languages

... One line of work stems from the categorical quantum mechanics (CQM) programme [41]- [43] and leverages categorical formalisms developed therein to produce string-diagrammatic axiomatizations of quantum theory like the ZX calculus and others [44]- [46]. Similarly to these calculi, [47] develop a tool for reasoning about expressions formally written in Dirac notation. Other works, including ours, have a specific focus on quantum computing (CP and trace non-decreasing maps), a proper subset of quantum theory (CP maps). ...

Automating Equational Proofs in Dirac Notation
  • Citing Article
  • January 2025

Proceedings of the ACM on Programming Languages

... Nevertheless, profound leakage evaluations by Barthe et al. [7] and by Vicarte et al. [37] show that countering only timing leakage is not sufficient to protect the secrecy of cryptographic keys and data. Logical bugs in the configuration of trusted execution environments (TEEs) as well as current and upcoming microarchitectural optimizations negate the former security guarantees of constanttime code by adding new secret-dependent observable behavior. ...

Testing Side-channel Security of Cryptographic Implementations against Future Microarchitectures
  • Citing Conference Paper
  • December 2024

... In many modern applications, especially those that involve probabilistic programming, one is often interested in proving quantitative properties of programs, such as upper limits on program distances, sensitivity of program outputs to program inputs, or convergence of sequences of programs. Such properties are important in diverse application areas such as differential privacy [15], [33], security [3], [5] and machine learning [32]. In process algebra, it has long been known that for probabilistic processes, the notion of bisimilarity should be stated quantitatively to be robust to small perturbations that may otherwise compromise the exact comparison of behaviours [17], [22]. ...

Hopping Proofs of Expectation-Based Properties: Applications to Skiplists and Security Proofs
  • Citing Article
  • April 2024

Proceedings of the ACM on Programming Languages

... Symbolic analysis abstracts cryptographic operations by treating them as black boxes, allowing verification without delving into cryptographic primitives' details. The Dolev-Yao (Rakotonirina et al., 2024) model is an example of symbolic analysis, where messages are represented symbolically, and adversaries are assumed to have complete control over the communication channel, except for the ability to break cryptography. Tools such as ProVerif (Blanchet et al., 2022) have built on this model, enabling automatic verification of security properties through symbolic execution. ...

Decision and Complexity of Dolev-Yao Hyperproperties
  • Citing Article
  • January 2024

Proceedings of the ACM on Programming Languages

... We leave the proof in quantum random oracle model (QROM) as future work. Even though there are proofs of Crystals-Dilithium in the quantum setting [8,34,48,49], to our best knowledge, no work on the distributed Crystal-Dilithium has provided yet a valid security proof in QROM. One of the obstacles of proving security of our construction in QROM would be proving collapse-binding property [65] of Baum et al. commitments to assure the security against quantum adversaries [5]. ...

Fixing and Mechanizing the Security Proof of Fiat-Shamir with Aborts and Dilithium
  • Citing Chapter
  • August 2023

Lecture Notes in Computer Science

... It is, however, challenging to build software protections that are both efficient and that provide formal end-to-end security guarantees against precisely specified, speculative side-channel attacker models [12]. Cryptography researchers are leading the way in this space, with defenses such as selective vSLH efficiently achieving speculative constant-time guarantees against Spectre v1 for cryptographic code with typical overheads under 1% [22,23]. This work is, however, specialized to only cryptographic code and often also to domain-specific languages for cryptography, such as Jasmin [2]. ...

Spectre Declassified: Reading from the Right Place at the Wrong Time
  • Citing Conference Paper
  • May 2023