English

Synthesis of Sound and Precise Leakage Contracts for Open-Source RISC-V Processors

Cryptography and Security 2025-09-09 v1

Abstract

Leakage contracts have been proposed as a new security abstraction at the instruction set architecture level. Leakage contracts aim to capture the information that processors may leak via microarchitectural side channels. Recently, the first tools have emerged to verify whether a processor satisfies a given contract. However, coming up with a contract that is both sound and precise for a given processor is challenging, time-consuming, and error-prone, as it requires in-depth knowledge of the timing side channels introduced by microarchitectural optimizations. In this paper, we address this challenge by proposing LeaSyn, the first tool for automatically synthesizing leakage contracts that are both sound and precise for processor designs at register-transfer level. Starting from a user-provided contract template that captures the space of possible contracts, LeaSyn automatically constructs a contract, alternating between contract synthesis, which ensures precision based on an empirical characterization of the processor's leaks, and contract verification, which ensures soundness. Using LeaSyn, we automatically synthesize contracts for six open-source RISC-V CPUs for a variety of contract templates. Our experiments indicate that LeaSyn's contracts are sound and more precise (i.e., represent the actual leaks in the target processor more faithfully) than contracts constructed by existing approaches.

Keywords

Cite

@article{arxiv.2509.06509,
  title  = {Synthesis of Sound and Precise Leakage Contracts for Open-Source RISC-V Processors},
  author = {Zilong Wang and Gideon Mohr and Klaus von Gleissenthall and Jan Reineke and Marco Guarnieri},
  journal= {arXiv preprint arXiv:2509.06509},
  year   = {2025}
}

Comments

Technical report containing full formalization and proofs of all results. A short version of this report (with the same title) appears in the proceedings of the 32nd ACM SIGSAC Conference on Computer and Communication Security (CCS 2025)