cd /news/ai-safety/secure-compilation-of-probabilistic-… · home › topics › ai-safety › article
[ARTICLE · art-151857] src=eprint.iacr.org ↗ pub= topic=ai-safety verified=true sentiment=↑ positive

Secure Compilation of Probabilistic Side-Channel Countermeasures

Researchers have developed a language- and leakage-model-agnostic framework for provably secure compilation of probabilistic side-channel countermeasures, 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. Using the Rocq proof assistant, the researchers proved that a model of the core pipeline and several optimizing passes of the Jasmin compiler preserve security in the value-probing model with glitches, and they built libmasking, an open-source library of arbitrary-order masked gadgets in Jasmin that compiles to ARM and RISC-V assembly, provides C bindings, and is benchmarked on real hardware. The work reduces preservation to a per-pass simulation argument on deterministic traces, avoiding probabilistic proof obligations normally reserved for high-assurance cryptography frameworks like EasyCrypt.

by read1 min views1 publishedOct 16, 2026

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.

── more in #ai-safety 4 stories · sorted by recency
── more on @rocq 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/secure-compilation-o…] indexed:0 read:1min 2026-10-16 · —