Formal Verification of a Constant-Time Preserving C Compiler

被引:38
|
作者
Barthe, Gilles [1 ,2 ]
Blazy, Sandrine [3 ]
Gregoire, Benjamin [4 ]
Hutin, Remi [3 ]
Laporte, Vincent [4 ]
Pichardie, David [3 ]
Trieu, Alix [5 ]
机构
[1] MPI Secur & Privacy, Bochum, Germany
[2] IMDEA Software Inst, Madrid, Spain
[3] Univ Rennes, IRISA, CNRS, INRIA, Rennes, France
[4] INRIA, Sophia Antipolis, France
[5] Aarhus Univ, Aarhus, Denmark
基金
欧洲研究理事会;
关键词
verified compilation; CompCert compiler; timing side-channels; COMPILATION;
D O I
10.1145/3371075
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:30
相关论文
共 50 条
  • [31] Quantum supremacy in constant-time measurement-based computation: A unified architecture for sampling and verification
    Miller, Jacob
    Sanders, Stephen
    Miyake, Akimasa
    PHYSICAL REVIEW A, 2017, 96 (06)
  • [32] Proof of Directed Guiding Gradients: A New Proof of Learning Consensus Mechanism with Constant-time Verification
    Wu, Yongqi
    Choi, Sungmin
    Liu, Guining
    Wang, Xingjun
    2023 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN AND CRYPTOCURRENCY, ICBC, 2023,
  • [33] Constant-Time Callees with Variable-Time Callers
    Garcia, Cesar Pereida
    Brumley, Billy Bob
    PROCEEDINGS OF THE 26TH USENIX SECURITY SYMPOSIUM (USENIX SECURITY '17), 2017, : 83 - 98
  • [34] Constant-Time Foundations for the New Spectre Era
    Cauligi, Sunjay
    Disselkoen, Craig
    Gleissenthall, Klaus, V
    Tullsen, Dean
    Stefan, Deian
    Rezk, Tamara
    Barthe, Gilles
    PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, : 913 - 926
  • [35] Verifying constant-time implementations by abstract interpretation
    Blazy, Sandrine
    Pichardie, David
    Trieu, Alix
    JOURNAL OF COMPUTER SECURITY, 2019, 27 (01) : 137 - 163
  • [36] Constant-Time Predictive Distributions for Gaussian Processes
    Pleiss, Geoff
    Gardner, Jacob R.
    Weinberger, Kilian Q.
    Wilson, Andrew Gordon
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 80, 2018, 80
  • [37] CONSTANT-TIME CONVEXITY PROBLEMS ON RECONFIGURABLE MESHES
    BOKKA, V
    GURLA, H
    OLARIU, S
    SCHWING, JL
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 1995, 27 (01) : 86 - 99
  • [38] Implementation of a constant-time dynamic storage allocator
    Masmano, M.
    Ripoll, I.
    Real, J.
    Crespo, A.
    Wellings, A. J.
    SOFTWARE-PRACTICE & EXPERIENCE, 2008, 38 (10): : 995 - 1026
  • [39] CONSTANT-TIME PARALLEL RECOGNITION OF SPLIT GRAPHS
    NIKOLOPOULOS, SD
    INFORMATION PROCESSING LETTERS, 1995, 54 (01) : 1 - 8
  • [40] Constant-time randomized parallel string matching
    Crochemore, M
    Galil, Z
    Gasieniec, L
    Park, K
    Rytter, W
    SIAM JOURNAL ON COMPUTING, 1997, 26 (04) : 950 - 960