POSTER: From Leakage Detection to Leakage-Aware Compilation of Masked Implementations in Jasmin

Type
Publication
International Conference on Information and Communications Security (ICICS)

Abstract

Masked software implementations can leak on real hardware because compiler decisions and microarchitectural effects recombine shares that are cleanly separated at the algorithmic level. In prior work, we integrated a formal leakage detection pass into the Jasmin compiler: operating on the intermediate representation, it tracks contacts between shares, secrets, random, and public values based on source annotations, detects masking-order reductions, monitors randomness reuse, and reports findings together with their root causes. This proposal presents our follow-up work in progress: a leakage-aware compilation pass that consumes the detection report and automatically rewrites the program to eliminate architectural and microarchitectural leakage. By exploiting knowledge only available inside the compiler (security annotations, share-group information, and the interface to register allocation), the pass aims to apply rewrite strategies such as random precharging and data interleaving while minimizing additional randomness and computational overhead, staying platform-independent where possible and focusing on RISC-V otherwise. The poster presents the design space, the planned rewrite toolbox, and open research challenges.