Paper 2026/2510

Secure Compilation of Probabilistic Side-Channel Countermeasures

Gilles Barthe, Max Planck Institute for Security and Privacy, IMDEA Software
Gaëtan Cassiers, UCLouvain, CryptoExperts (France)
Henri Dohmen, TU Darmstadt
Marc Gourjon, Max Planck Institute for Security and Privacy
Benjamin Grégoire, Inria Sophia-Antipolis
Nora Khayata, TU Darmstadt
Thomas Schneider, TU Darmstadt
Finn Schubert, TU Darmstadt
Abstract

Probabilistic countermeasures are a common means of protecting programs against side-channels. These countermeasures are hard to implement and are routinely broken by compilers. Proving that a compiler preserves probabilistic side-channel security directly would require reasoning about perfect simulatability of distributions, a challenging technique normally reserved for high-assurance cryptography in frameworks like EasyCrypt and out of scope for compiler correctness. In this paper, we present a language- and leakage-model-agnostic framework for provably secure compilation of probabilistic side-channel security notions. Our main contribution is formalizing a deterministic leakage-preservation relation that implies preservation of probabilistic security notions, including d-NI and d-SNI for masking and cryptographic constant-time. Our framework establishes the same guarantees without probabilistic proof obligations, reducing preservation to a per-pass simulation argument on deterministic traces. We use the Rocq proof assistant to prove that a model of the core pipeline and several optimizing passes of the Jasmin compiler preserve security in the value-probing model with glitches. We also show how to harden against transition leakage with lightweight annotations at the source level. On top of this, we build libmasking, an open-source library of arbitrary-order masked gadgets in Jasmin that securely compiles to ARM and RISC-V assembly, provides C language bindings, and is benchmarked on real hardware. Together, these contributions are a step towards programming environments in which masked code is written or generated, verified at the source level, optimized, and compiled without breaking security.

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Published elsewhere. IEEE S&P'27
Keywords
secure compilationside-channelsmaskingformal methods
Contact author(s)
gilles barthe @ mpi-sp org
gaetan cassiers @ uclouvain be
dohmen @ encrypto cs tu-darmstadt de
marc gourjon @ mpi-sp org
benjamin gregoire @ inria fr
khayata @ encrypto cs tu-darmstadt de
schneider @ encrypto cs tu-darmstadt de
finn schubert @ stud tu-darmstadt de
History
2026-10-17: approved
2026-10-16: received
See all versions
Short URL
https://ia.cr/2026/2510
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2026/2510,
      author = {Gilles Barthe and Gaëtan Cassiers and Henri Dohmen and Marc Gourjon and Benjamin Grégoire and Nora Khayata and Thomas Schneider and Finn Schubert},
      title = {Secure Compilation of Probabilistic Side-Channel Countermeasures},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/2510},
      year = {2026},
      url = {https://eprint.iacr.org/2026/2510}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.