Data-Driven Synthesis of Provably Sound Side Channel Analyses
Jingbo Wang, Chungha Sung, Mukund Raghothaman, Chao Wang
摘要
We propose a data-driven method for synthesizing static analyses to detect side-channel information leaks in cryptographic software. Compared to the conventional way of manually crafting such static analyzers, which can be tedious, error prone and suboptimal, our learning-based technique is not only automated but also provably sound. Our analyzer consists of a set of type-inference rules learned from the training data, i.e., example code snippets annotated with the ground truth. Internally, we use syntax-guided synthesis (SyGuS) to generate new recursive features and decision tree learning (DTL) to generate analysis rules based on these features. We guarantee soundness by proving each learned analysis rule via a technique called query containment checking. We have implemented our technique in the LLVM compiler and used it to detect power side channels in C programs that implement cryptographic protocols. Our results show that, in addition to being automated and provably sound during synthesis, our analyzer can achieve the same empirical accuracy as two state-of-the-art, manually-crafted analyzers while being 300X and 900X faster, respectively. • We propose the first data-driven method for learning a provably sound static analyzer using syntax guided synthesis (SyGuS) and decision tree learning (DTL). • We guarantee soundness by formulating and solving a Datalog query containment checking problem. • We demonstrate the effectiveness of our method for detecting side channels in cryptographic software. In the remainder of this paper, we begin by presenting the technical background in Section II and our motivating example in Section III. We then describe the learner in Section IV and the prover in Section V, followed by the experimental results in Section VI. Finally, we survey the related work in Section VII and conclude in Section VIII. II. PRELIMINARIES A. Power Side-Channels Prior works in side-channel security [19]- [21] show that variance in the power consumption of a computing device may leak secret information; for example, when a secret value is stored in a physical register, its number of logical-1 bits may affect the power consumption of the CPU. Such side-channel leaks are typically mitigated by masking, e.g., using d random bits (r 1 , . . . , r d ) to split a key bit into d + 1 secret shares: key 1 = r 1 , . . ., key d = r d , and key d+1 = r 1 ⊕r 2 . . .⊕r d ⊕key, where ⊕ denotes the logical operation exclusive or (XOR). Since all d + 1 shares are uniformly distributed in the 0, 1, in theory, this order-d masking scheme is secure in that any combination of less than d shares cannot reveal the secret, but combining all d + 1 shares, key 1 ⊕ key 2 ⊕ ...key d+1 = key, recovers the secret. In practice, masking countermeasures must also be implemented properly to avoid de-randomizing any of the secret shares accidentally. Consider While syntactically dependent on the two randomized values t L and t R , t is in fact leaky because, semantically, it does not depend on the random input r 1 . In this work, we aim to learn a static analyzer that can soundly prove that all intermediate variables of a program that implements masking countermeasures are free of such leaks. B. Type Systems Type systems prove to be effective in analyzing power side channels [1], [2], e.g., by certifying that all intermediate variables of a program are statistically independent of the secret. Typically, the program inputs are marked as public (INPUB), secret (INKEY) or random (INRAND), and then the types of all other program variables are inferred automatically. The type of a variable v, denoted TYPE(v), may be RUD, SID, or UKD. Here, RUD stands for random uniform distribution, meaning v is either a random bit or being masked by a random bit. SID stands for secret independent distribution, meaning v does not depend on the secret. While an RUD variable is, by definition, also SID, an SID variable does not have to be RUD (e.g., variables that are syntactically independent of the secret). Finally, UKD stands for unknown distribution, or potentially leaky; if the analyzer cannot prove v to be RUD or SID, then it is assumed to be UKD. Type systems are generally designed to be sound but not necessarily complete. They are sound in that they never miss real leaks. For example, by default, they may safely assume that all variables are UKD, unless a variable is specifically elevated to SID or RUD by an analysis rule. Similarly, they may conservatively classify SID variables as UKD, or classify RUD variables as SID, without missing real leaks. In general, the sets of variables that can be marked as the three types form a hierarchy: S RUD ⊆ S SID ⊆ S UKD .
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper9
- Exploration of Power Side-Channel Vulnerabilities in Quantum Computer ControllersChuanqi Xu, Ferhat Erata, Jakub SzeferCCS 2023 · 被引用 26 次
- Synthesizing abstract transformersPankaj Kumar Kalita, Sujit Kumar Muduli, Loris D'Antoni, Thomas W. Reps 等OOPSLA 2022 · 被引用 21 次
- Example-guided synthesis of relational queriesAalok Thakkar, Aaditya Naik, Nathaniel Sands, Rajeev Alur 等PLDI 2021 · 被引用 12 次
- Sporq: An Interactive Environment for Exploring Code using Query-by-ExampleAaditya Naik, Jonathan Mendelson, Nathaniel Sands, Yuepeng Wang 等UIST 2021 · 被引用 11 次
- Certifying the Fairness of KNN in the Presence of Dataset BiasYannan Li, Jingbo Wang, Chao WangCAV 2023 · 被引用 8 次
它引用的顶会 Paper3
- Strong Non-Interference and Type-Directed Higher-Order MaskingGilles Barthe, Sonia Belaïd, François Dupressoir, Pierre-Alain Fouque 等CCS 2016 · 被引用 302 次
- Precise Detection of Side-Channel Vulnerabilities using Quantitative Cartesian Hoare LogicJia Chen, Yu Feng, Isil DilligCCS 2017 · 被引用 74 次
- Augmented example-based synthesis using relational perturbation propertiesShengwei An, Rishabh Singh, Sasa Misailovic, Roopsha SamantaPOPL 2020 · 被引用 7 次
相关 Paper
- DATA - Differential Address Trace Analysis: Finding Address-based Side-Channels in BinariesSamuel Weiser, Andreas Zankl, Raphael Spreitzer, Katja Miller 等USENIX Security 2018 · 被引用 77 次
- Identifying Cache-Based Side Channels through Secret-Augmented Abstract InterpretationShuai Wang, Yuyan Bao, Xiao Liu, Pei Wang 等USENIX Security 2019 · 被引用 57 次
- microSCALE: Static Analysis for Microarchitectural Side-channel Leakage EvaluationAkshay Kumar E, Pranav Krishna N, Annapurna Valiveti, Pallavi Borkar 等USENIX Security 2026
- Cache Refinement Type for Side-Channel Detection of Cryptographic SoftwareKe Jiang, Yuyan Bao, Shuai Wang, Zhibo Liu 等CCS 2022 · 被引用 7 次
- PathFinder: side channel protection through automatic leaky paths identification and obfuscationHaocheng Ma, Qizhi Zhang, Ya Gao, Jiaji He 等DAC 2022 · 被引用 6 次
