Affiliation:
1. MPI for Security and Privacy, Germany / IMDEA Software Institute, Spain
2. University of Rennes, France / Inria, France / CNRS, France / IRISA, France
3. Inria, France
4. Aarhus University, Denmark
Abstract
Timing side-channels are arguably one of the main sources of vulnerabilities in cryptographic implementations. One effective mitigation against timing side-channels is to write programs that do not perform secret-dependent branches and memory accesses. This mitigation, known as "cryptographic constant-time", is adopted by several popular cryptographic libraries.
This paper focuses on compilation of cryptographic constant-time programs, and more specifically on the following question: is the code generated by a realistic compiler for a constant-time source program itself provably constant-time? Surprisingly, we answer the question positively for a mildly modified version of the CompCert compiler, a formally verified and moderately optimizing compiler for C. Concretely, we modify the CompCert compiler to eliminate sources of potential leakage. Then, we instrument the operational semantics of CompCert intermediate languages so as to be able to capture cryptographic constant-time. Finally, we prove that the modified CompCert compiler preserves constant-time. Our mechanization maximizes reuse of the CompCert correctness proof, through the use of new proof techniques for proving preservation of constant-time. These techniques achieve complementary trade-offs between generality and tractability of proof effort, and are of independent interest.
Funder
H2020 European Research Council
Office of Naval Research
Natur og Univers, Det Frie Forskningsråd
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
45 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A Scalable Formal Verification Methodology for Data-Oblivious Hardware;IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems;2024-09
2. Formal Methods in Industry;Formal Aspects of Computing;2024-08-21
3. Towards Efficient Verification of Constant-Time Cryptographic Implementations;Proceedings of the ACM on Software Engineering;2024-07-12
4. A Nominal Approach to Probabilistic Separation Logic;Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science;2024-07-08
5. Serberus: Protecting Cryptographic Code from Spectres at Compile-Time;2024 IEEE Symposium on Security and Privacy (SP);2024-05-19