paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Mitigating power side channels during compilation

在编译期间缓解功耗侧信道
FSE Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2019匹配度 2/10 · 该论文属于编译期程序分析与功耗侧信道消除,虽使用类型分析、Datalog 和 LLVM 落地,但与用户核心关注的 PL 与 LLM/Agentic 程序、浮点程序分析、贝叶斯程序分析等方向没有直接关联。其安全/侧信道主题也不在用户研究画像的主要问题域内。引用 31 inbox
Jingbo Wang, Chungha Sung, Chao Wang
crossref: 2026-09-12

AI 速览

一句话:提出基于类型分析与寄存器分配的编译期方法,消除代码生成引入的功耗侧信道泄漏。

现代编译器的代码生成模块因 CPU 寄存器数量有限,需将大量程序变量映射到少量寄存器或内存位置,这可能使即使已部署最新防护的软件仍产生功耗侧信道泄漏。本文提出一种基于程序分析与变换的方法来消除此类泄漏。该方法包含两部分:一是基于类型的泄漏检测技术,利用 Datalog 声明式分析与领域特定优化,实现高效且准确的泄漏识别;二是面向编译器后端(尤其是寄存器分配模块)的缓解技术,确保泄漏的中间计算结果被存放在不同的 CPU 寄存器或内存位置。作者在 LLVM 中针对 x86 指令集架构实现并评估了该方法。在密码学软件上的实验表明,该方法能有效消除侧信道且效率高,经其缓解的代码比现有最先进技术缓解后的代码更紧凑、运行更快。

问题
现代编译器后端在寄存器分配时,因寄存器资源有限可能将秘密相关中间结果放入同一寄存器或内存位置,从而在已有防护的软件中引入功耗侧信道泄漏。
方法
结合基于类型的泄漏检测(使用 Datalog 声明式分析与领域特定优化)与编译器后端寄存器分配缓解技术,确保泄漏的中间结果存入不同寄存器或内存位置。
评估
在 LLVM 的 x86 后端实现该方法,并在密码学软件上进行实验,对比现有最先进缓解技术,表明代码更紧凑且运行更快。
原文摘要(Abstract)

The code generation modules inside modern compilers, which use a limited number of CPU registers to store a large number of program variables, may introduce side-channel leaks even in software equipped with state-of-the-art countermeasures. We propose a program analysis and transformation based method to eliminate such leaks. Our method has a type-based technique for detecting leaks, which leverages Datalog-based declarative analysis and domain-specific optimizations to achieve high efficiency and accuracy. It also has a mitigation technique for the compiler's backend, more specifically the register allocation modules, to ensure that leaky intermediate computation results are stored in different CPU registers or memory locations. We have implemented and evaluated our method in LLVM for the x86 instruction set architecture. Our experiments on cryptographic software show that the method is effective in removing the side channel while being efficient, i.e., our mitigated code is more compact and runs faster than code mitigated using state-of-the-art techniques.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5100,
  title = {Mitigating power side channels during compilation},
  author = {Jingbo Wang and Chungha Sung and Chao Wang},
  booktitle = {FSE},
  year = {2019},
  doi = {10.1145/3338906.3338913}
}