Side-channel Elimination via Partial Control-flow Linearization
Open Access
- 26 June 2023
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 45 (2) , 1-43
Abstract
Partial control-flow linearization is a code transformation conceived to maximize work performed in vectorized programs. In this article, we find a new service for it. We show that partial control-flow linearization protects programs against timing attacks. This transformation is sound: Given an instance of its public inputs, the partially linearized program always runs the same sequence of instructions, regardless of secret inputs. Incidentally, if the original program is publicly safe, then accesses to the data cache will be data oblivious in the transformed code. The transformation is optimal: Every branch that depends on some secret data is linearized; no branch that depends on only public data is linearized. Therefore, the transformation preserves loops that depend exclusively on public information. If every branch that leaves a loop depends on secret data, then the transformed program will not terminate. Our transformation extends previous work in non-trivial ways. It handles C constructs such as “goto,” “break,” “switch,” and “continue,” which are absent in the FaCT domain-specific language (2018). Like Constantine (2021), our transformation ensures operation invariance but without requiring profiling information. Additionally, in contrast to SC-Eliminator (2018) and Lif (2021), it handles programs containing loops whose trip count is not known at compilation time.Keywords
Funding Information
- Brazilian Ministry of Education
- CNPq (406377/2018-9)
- FAPEMIG (PPM-00333-18)
- CAPES
This publication has 41 references indexed in Scilit:
- Divergence analysisACM Transactions on Programming Languages and Systems, 2013
- Compiler mitigations for time attacks on modern x86 processorsACM Transactions on Architecture and Code Optimization, 2012
- Improving Performance of OpenCL on CPUs2012
- Understanding throughput-oriented architecturesCommunications of the ACM, 2010
- A Practical Implementation of the Timing Attack2000
- Differential Power Analysis1999
- Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems1996
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987
- On linearizing parallel code1985
- THE PROBABLE ERROR OF A MEANBiometrika, 1908