{
  "id": "2025/572",
  "url": "https://opencryptology.org/2025/572",
  "original_url": "https://eprint.iacr.org/2025/572",
  "title": "A zk-SNARK Programming Framework for Verifiable Data Analytics",
  "authors": [
    "Zhantong Xue",
    "Pingchuan Ma",
    "Zhaoyu Wang",
    "Yuguang Zhou",
    "Shuai Wang"
  ],
  "affiliations": null,
  "abstract": "zk-SNARKs enable succinct, efficiently verifiable proofs of correct computation\nover private data, but require the computation to be compiled into a\n\\emph{statically defined and bounded} arithmetic circuit. This requirement\ncreates a multidimensional mismatch with data-analytic programming, which\nconsists largely of array programs: (a)~array operations and resulting shapes\nare dynamic; (b)~arrays are accessed at data-dependent positions; (c)~control\nflows are data-dependent. Existing zk-SNARK DSLs enforce this requirement using\nconservative syntactic restrictions that reject many bounded programs, or leave\nthe programmer to bound and encode these by hand, while zkVMs recover\nexpressiveness at substantially higher proving cost.\n\nWe present \\textsc{Zinnia}, a zk-SNARK programming framework for analytics in\nwhich programs are written in a subset of Python with NumPy. Zinnia's compiler\nuses SMT-backed symbolic execution over array types with bounds to derive\nproperties of the program's values that hold on every input, which we call\n\\emph{facts}. The facts bound every data-dependent shape and loop, which gives\neach array its capacity in the circuit. Built atop this compiler,\n\\textsc{Zinnia} provides bounded-dynamic array and arithmetic operations for\nanalytics. The same facts guide how these operators are lowered: for each\noperator, \\textsc{Zinnia} considers known circuit constructions, whose cost\ndepends on what the facts guarantee. Unlike a program, a circuit has no order in\nwhich a check protects later uses, so if a construction needs a fact, another\nconstraint in the circuit must enforce it. A construction chosen for one\noperator may enforce a fact that another relies on. \\textsc{Zinnia} therefore\nchooses the constructions of all operators together, seeking to minimize\nestimated circuit cost. Our evaluation on unmodified programs from three NumPy\ncorpora shows that the circuits \\textsc{Zinnia} compiles are never larger than\noptimized hand-written ones in existing DSLs, and that \\textsc{Zinnia} achieves\nover $30\\times$ faster proving than zkVM-based approaches by geometric mean.",
  "category": "Applications",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“A zk-SNARK Programming Framework for Verifiable Data Analytics” by Zhantong Xue, Pingchuan Ma, Zhaoyu Wang, Yuguang Zhou, Shuai Wang, Cryptology ePrint Archive, Paper 2025/572, https://eprint.iacr.org/2025/572. 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-03-29T12:06:05Z",
    "updated": "2026-10-15T09:52:27Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/572.pdf",
    "sha256": "ff4aeed22e165379caef05308c642fad73d7956daf8fa37e6952861d85672117",
    "size": 1572490,
    "source": "upload",
    "source_date": "2026-11-14T03:55:15.537Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/572/versions/20261114T035515Z.pdf",
      "captured_at": "2026-11-14T03:55:15.537Z",
      "label": "copy captured 2026-11-14",
      "source": "upload",
      "source_url": null,
      "size": 1572490,
      "sha256": "ff4aeed22e165379caef05308c642fad73d7956daf8fa37e6952861d85672117",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2025/572/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/572.pdf",
      "size": 1990824,
      "sha256": "8e9ad5d4b997bea884d5e8b181227733c2ae62bd251cddcbb7457aa67f4dc377",
      "is_default_pdf": false
    },
    {
      "url": "https://opencryptology.org/2025/572/versions/20250401T082233Z.pdf",
      "captured_at": "2025-04-01T08:22:33Z",
      "label": "copy captured 2025-04-01",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20250401082233id_/https://eprint.iacr.org/2025/572.pdf",
      "size": 1539937,
      "sha256": "972cfa44329b54158d87a8fd3a02886be9cd864f63281d745b248bc9b148d1a1",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/572.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 1990824
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260113224312id_/https://eprint.iacr.org/2025/572.pdf",
      "captured_at": "2026-01-13T22:43:12Z",
      "size": 1929461
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/572,\n      author = {Zhantong Xue and Pingchuan Ma and Zhaoyu Wang and Yuguang Zhou and Shuai Wang},\n      title = {A zk-SNARK Programming Framework for Verifiable Data Analytics},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/572},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/572}\n}"
}
