{
  "id": "2025/338",
  "url": "https://opencryptology.org/2025/338",
  "original_url": "https://eprint.iacr.org/2025/338",
  "title": "CT-LLVM: Automatic Large-Scale Constant-Time Analysis",
  "authors": [
    "Zhiyuan Zhang",
    "Gilles Barthe"
  ],
  "affiliations": null,
  "abstract": "Constant-time (CT) is a popular programming discipline to protect\ncryptographic libraries against micro-architectural timing attacks.\nOne appeal of the CT discipline lies in its conceptual simplicity: a\nprogram is CT iff it has no secret-dependent data-flow,\ncontrol-flow or variable-timing operation. Thanks to its simplicity,\nthe CT discipline is supported by dozens of analysis tools. However, a\nrecent user study demonstrates that these tools are seldom used due to\npoor usability and maintainability (Jancar et al. IEEE SP 2022).\n\nIn this paper, we introduce CT-LLVM, a CT analysis tool designed for\nusability, maintainability and automatic large-scale analysis. \nConcretely, CT-LLVM is packaged as a\nLLVM plugin and is built as a thin layer on top of two standard LLVM\nanalysis: def-use and alias analysis.  Besides confirming known CT\nviolations, we demonstrate the usability and scalability of CT-LLVM by\nautomatically analyzing nine cryptographic libraries.  On\naverage, CT-LLVM can automatically and soundly analyze 36% of the\nfunctions in these libraries, proving that 61% of them are CT.  In\naddition, the large-scale automatic analysis also reveals new\nvulnerabilities in these libraries.  In the end, we demonstrate\nthat CT-LLVM helps systematically mitigate compiler-introduced CT\nviolations, which has been a long-standing issue in CT analysis.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“CT-LLVM: Automatic Large-Scale Constant-Time Analysis” by Zhiyuan Zhang, Gilles Barthe, Cryptology ePrint Archive, Paper 2025/338, https://eprint.iacr.org/2025/338. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2025-02-24T14:14:56Z",
    "updated": "2025-02-24T14:14:56Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/338.pdf",
    "sha256": "e44c45b76e0d01c75fcbd7564c94a350063932cc33cbe68f6b54ceccf7f728b3",
    "size": 770399,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/338/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/338.pdf",
      "size": 770399,
      "sha256": "e44c45b76e0d01c75fcbd7564c94a350063932cc33cbe68f6b54ceccf7f728b3",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/338.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 770399
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20251216063249id_/https://eprint.iacr.org/2025/338.pdf",
      "captured_at": "2025-12-16T06:32:49Z",
      "size": 771309
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/338,\n      author = {Zhiyuan Zhang and Gilles Barthe},\n      title = {CT-LLVM: Automatic Large-Scale Constant-Time Analysis},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/338},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/338}\n}"
}
