{
  "id": "2020/1586",
  "url": "https://opencryptology.org/2020/1586",
  "original_url": "https://eprint.iacr.org/2020/1586",
  "title": "CirC: Compiler infrastructure for proof systems, software verification, and more",
  "authors": [
    "Alex Ozdemir",
    "Fraser Brown",
    "Riad S. Wahby"
  ],
  "affiliations": null,
  "abstract": "Cryptographic tools like proof systems, multi-party computation, and fully\nhomomorphic encryption are usually applied to computations expressed as\nsystems of arithmetic constraints. In practice, this means that these\napplications rely on compilers from high-level programming languages\n(like C) to such constraints. This compilation task is challenging, but\nnot entirely new: the software verification community has a rich literature\non compiling programs to logical constraints (like SAT or SMT). In this\nwork, we show that building shared compiler infrastructure for compiling\nto constraint representations is possible, because these representations\nshare a common abstraction: stateless, non-uniform, non-deterministic\ncomputations that we call existentially quantified circuits, or EQCs.\nMoreover, we show that this shared infrastructure is useful, because\nit allows compilers for proof systems to benefit from decades of work\non constraint compilation techniques for software verification.\n\nTo make our approach concrete we create CirC, an infrastructure for building\ncompilers to EQCs. CirC makes it easy to compile to new EQCs: we build support\nfor three, R1CS (used for proof systems), SMT (used for verification and\nbug-finding), and ILP (used for optimization), in ≈2000 LOC. It's also easy\nto extend CirC to support new source languages: we build a feature-complete\ncompiler for a cryptographic language in one week and ≈900 LOC, whereas the\nreference compiler for the same language took years to write, comprises ≈24000\nLOC, and produces worse-performing output than our compiler.  Finally, CirC\nenables novel applications that combine multiple EQCs. For example, we build\nthe first pipeline that (1) automatically identifies bugs in programs, then\n(2) automatically constructs cryptographic proofs of the bugs' existence.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“CirC: Compiler infrastructure for proof systems, software verification, and more” by Alex Ozdemir, Fraser Brown, Riad S. Wahby, Cryptology ePrint Archive, Paper 2020/1586, https://eprint.iacr.org/2020/1586. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2020-12-21T07:47:11Z",
    "updated": "2022-04-08T22:34:00Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2020/1586.pdf",
    "sha256": "89975ce2570fc592c04758d587f7c4d3af9992f9147ffb6fe2dd91e1c94f096d",
    "size": 733100,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:14Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2020/1586/versions/20240114T061314Z.pdf",
      "captured_at": "2024-01-14T06:13:14Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2020/1586.pdf",
      "size": 733100,
      "sha256": "89975ce2570fc592c04758d587f7c4d3af9992f9147ffb6fe2dd91e1c94f096d",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2020/1586/versions/20220130T210323Z.pdf",
      "captured_at": "2022-01-30T21:03:23Z",
      "label": "copy captured 2022-01-30",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20220130210323id_/https://eprint.iacr.org/2020/1586.pdf",
      "size": 729222,
      "sha256": "425ddff216166ebe4953ad7755b00b86be6e9f79c5aac453b3edebe0749ab84a",
      "is_default_pdf": false
    },
    {
      "url": "https://opencryptology.org/2020/1586/versions/20210115T154123Z.pdf",
      "captured_at": "2021-01-15T15:41:23Z",
      "label": "copy captured 2021-01-15",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20210115154123id_/https://eprint.iacr.org/2020/1586.pdf",
      "size": 824723,
      "sha256": "f7397f0f630785f7f16c5aa13051ed21e3ab63a93bdd5adde892efd5f1902cea",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20261002114519id_/https://eprint.iacr.org/2020/1586.pdf",
      "captured_at": "2026-10-02T11:45:19Z",
      "size": 729733
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2020/1586.pdf",
      "captured_at": "2024-01-14T06:13:14Z",
      "size": 733100
    }
  ],
  "bibtex": "@misc{cryptoeprint:2020/1586,\n      author = {Alex Ozdemir and Fraser Brown and Riad S. Wahby},\n      title = {CirC: Compiler infrastructure for proof systems, software verification, and more},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2020/1586},\n      year = {2020},\n      url = {https://eprint.iacr.org/2020/1586}\n}"
}
