{
  "id": "2019/926",
  "url": "https://opencryptology.org/2019/926",
  "original_url": "https://eprint.iacr.org/2019/926",
  "title": "Formal Verification of a Constant-Time Preserving C Compiler",
  "authors": [
    "Gilles Barthe",
    "Sandrine Blazy",
    "Benjamin Grégoire",
    "Rémi Hutin",
    "Vincent Laporte",
    "David Pichardie",
    "Alix Trieu"
  ],
  "affiliations": null,
  "abstract": "Timing side-channels are arguably one of the main sources of\nvulnerabilities in cryptographic implementations. One effective\nmitigation against timing side-channels is to write programs that do\nnot perform secret-dependent branches and memory accesses. This\nmitigation, known as ''cryptographic constant-time'', is\nadopted by several popular cryptographic libraries.\n\nThis paper focuses on compilation of cryptographic constant-time\nprograms, and more specifically on the following question: is the\ncode generated by a realistic compiler for a constant-time source\nprogram itself provably constant-time? Surprisingly, we answer the\nquestion positively for a mildly modified version of the CompCert\ncompiler, a formally verified and moderately optimizing compiler for\nC. Concretely, we modify the CompCert compiler to eliminate sources\nof potential leakage. Then, we instrument the operational semantics\nof CompCert intermediate languages so as to be able to capture\ncryptographic constant-time. Finally, we prove that the modified\nCompCert compiler preserves constant-time. Our mechanization\nmaximizes reuse of the CompCert correctness proof, through the use\nof new proof techniques for proving preservation of constant-time.\nThese techniques achieve complementary trade-offs between generality\nand tractability of proof effort, and are of independent interest.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Formal Verification of a Constant-Time Preserving C Compiler” by Gilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin, Vincent Laporte, David Pichardie, Alix Trieu, Cryptology ePrint Archive, Paper 2019/926, https://eprint.iacr.org/2019/926. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2019-08-18T15:44:56Z",
    "updated": "2019-12-12T09:56:23Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2019/926.pdf",
    "sha256": "3f5c679793f33ad9315fffe2b32f737aceef737465c53b0f4bae7056a04bf4c0",
    "size": 681893,
    "source": "github-mirror",
    "source_date": "2020-04-17T10:36:14Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2019/926/versions/20200417T103614Z.pdf",
      "captured_at": "2020-04-17T10:36:14Z",
      "label": "copy captured 2020-04-17",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2019/926.pdf",
      "size": 681893,
      "sha256": "3f5c679793f33ad9315fffe2b32f737aceef737465c53b0f4bae7056a04bf4c0",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2019/926/versions/20190921T215304Z.pdf",
      "captured_at": "2019-09-21T21:53:04Z",
      "label": "copy captured 2019-09-21",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20190921215304id_/https://eprint.iacr.org/2019/926.pdf",
      "size": 841058,
      "sha256": "4a5868ea2070905804bb335306a9e87e32a1a625557b4b34ba011dc65c49f00b",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260108181558id_/https://eprint.iacr.org/2019/926.pdf",
      "captured_at": "2026-01-08T18:15:58Z",
      "size": 522719
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2019/926.pdf",
      "captured_at": "2020-04-17T10:36:14Z",
      "size": 681893
    }
  ],
  "bibtex": "@misc{cryptoeprint:2019/926,\n      author = {Gilles Barthe and Sandrine Blazy and Benjamin Grégoire and Rémi Hutin and Vincent Laporte and David Pichardie and Alix Trieu},\n      title = {Formal Verification of a Constant-Time Preserving C Compiler},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2019/926},\n      year = {2019},\n      url = {https://eprint.iacr.org/2019/926}\n}"
}
