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 条
  • [41] Constant-Time Filtering Using Shiftable Kernels
    Chaudhury, Kunal Narayan
    IEEE SIGNAL PROCESSING LETTERS, 2011, 18 (11) : 651 - 654
  • [42] Constant-time Monocular Self-Calibration
    Keivan, Nima
    Sibley, Gabe
    2014 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND BIOMIMETICS IEEE-ROBIO 2014, 2014, : 1590 - 1595
  • [43] Constant-time distributed dominating set approximation
    Kuhn, F
    Wattenhofer, R
    DISTRIBUTED COMPUTING, 2005, 17 (04) : 303 - 310
  • [44] Constant-time distributed dominating set approximation
    Fabian Kuhn
    Roger Wattenhofer
    Distributed Computing, 2005, 17 : 303 - 310
  • [45] A new constant-time parallel algorithm for merging
    Bahig, Hazem M.
    JOURNAL OF SUPERCOMPUTING, 2019, 75 (02): : 968 - 983
  • [46] Verifying Constant-Time Implementations by Abstract Interpretation
    Blazy, Sandrine
    Pichardie, David
    Trieu, Alix
    COMPUTER SECURITY - ESORICS 2017, PT I, 2018, 10492 : 260 - 277
  • [47] IODINE: Verifying Constant-Time Execution of Hardware
    v Gleissenthall, Klaus
    Kici, Rami Gokhan
    Stefan, Deian
    Jhala, Ranjit
    PROCEEDINGS OF THE 28TH USENIX SECURITY SYMPOSIUM, 2019, : 1411 - 1428
  • [48] A CHARACTERIZATION OF CONSTANT-TIME CELLULAR AUTOMATA COMPUTATION
    KIM, S
    MCCLOSKEY, R
    PHYSICA D-NONLINEAR PHENOMENA, 1990, 45 (1-3) : 404 - 419
  • [49] A new constant-time parallel algorithm for merging
    Hazem M. Bahig
    The Journal of Supercomputing, 2019, 75 : 968 - 983
  • [50] A Constant-Time Algorithm for Finding Neighbors in Quadtrees
    Aizawa, Kunio
    Tanaka, Shojiro
    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 2009, 31 (07) : 1178 - 1183