CyberGuardAI 安全情报工作区
AI 安全知识情报
LJH 管理员
返回首页 学术论文

zkCraft:以提示引导的LLM作为TCCT驱动ZK模糊测试的零样本变异模式预言机

Fu, Rong、Tan, Jia Yee、Kong, Ziyu、Zhang, Shuning、Li, Xianda、Liu, Kun 等

摘要与解读

论文提出zkCraft,用提示引导LLM作为零样本变异模式预言机,为TCCT驱动的零知识电路模糊测试服务。

六维情报分析

该版本仅提供原文

资料档案

文献来源与参考链接

当前保存的来源版本 · v1

作者
Fu, Rong、Tan, Jia Yee、Kong, Ziyu、Zhang, Shuning、Li, Xianda、Liu, Kun、Fong, Simon
文献与标准标识
arxiv:2602.00667
来源版本
v7
来源更新时间
2026-10-29T08:48:16+00:00
日期依据
来源明确给出发表日期
采集来源格式
a_622f2d2c978f798f_html
结构化格式
source_html
原始标题与分类记录

zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing

研究方向
攻击方法、防御技术、评测治理
影响维度
机密性、完整性、安全与合规
风险类型
隐私泄露、供应链风险
相关技术
LLM、Agent

当前为离线关键词规则模式。

分类规则与原始字段
攻击方法 · injection
]. Tools that combine metamorphic relations with fault-injection or targeted mutation expose both soundness and completeness weaknesses in zkVMs and related infrast
防御技术 · detection
backend behavior, which further complicates end-to-end detection and increases the cost of exhaustive solver-based validation  [22, 23, 24, 25]. Motivated by these
评测治理 · benchmark
ation strength and population size (2 h, 5 seeds, full benchmark). Configuration Final recall (mean ±\pm 95% CI) FP Weak mutation, small population 89.8 ±\pm 0.4 0
隐私泄露 · privacy
ent Researcher Abstract Zero-knowledge circuits enable privacy-preserving and scalable systems but are difficult to implement correctly due to the tight coupling
供应链风险 · dependency
additional projects selected by repository popularity, dependency impact, and relevance to production services. Circuits are grouped by constraint size |C||C| into S
机密性 · secret
}\} multivariate polynomial commitments and verifiable secret sharing. In 33rd USENIX Security Symposium (USENIX Security 24), pp. 3187–3204. Cited by: §1. [14]
完整性 · injection
]. Tools that combine metamorphic relations with fault-injection or targeted mutation expose both soundness and completeness weaknesses in zkVMs and related infrast
安全与合规 · safety
026) Enhancing symbolic execution with machine-checked safety proofs. In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and P
LLM · llm
zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing zkCraft: Prompt-Guided LLM as a
Agent · agent
Q. Zhan (2025) Blocka2a: towards secure and verifiable agent-to-agent interoperability. arXiv preprint arXiv:2508.01332. Cited by: §1. [25] T. Xie, T. Lu, Z. Fa
{
  "ai_relevance": {
    "evidence": [
      {
        "end_offset": 26,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 23
      },
      {
        "end_offset": 120,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 117
      },
      {
        "end_offset": 1128,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1125
      },
      {
        "end_offset": 1665,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 1644
      },
      {
        "end_offset": 3456,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3453
      },
      {
        "end_offset": 3863,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3860
      },
      {
        "end_offset": 5169,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 5166
      },
      {
        "end_offset": 5652,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 5649
      },
      {
        "end_offset": 8448,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8444
      },
      {
        "end_offset": 8509,
        "location": "title_and_content",
        "quote": "Large language models",
        "rule": "ai_term",
        "start_offset": 8488
      },
      {
        "end_offset": 8647,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8643
      },
      {
        "end_offset": 8862,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8858
      },
      {
        "end_offset": 9052,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9048
      },
      {
        "end_offset": 9356,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9352
      },
      {
        "end_offset": 11898,
        "location": "title_and_content",
        "quote": "machine learning",
        "rule": "ai_term",
        "start_offset": 11882
      },
      {
        "end_offset": 12688,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 12684
      },
      {
        "end_offset": 13379,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 13376
      },
      {
        "end_offset": 13840,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 13837
      },
      {
        "end_offset": 14414,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 14411
      },
      {
        "end_offset": 39872,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 39869
      },
      {
        "end_offset": 51639,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 51636
      },
      {
        "end_offset": 60881,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 60878
      },
      {
        "end_offset": 63394,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 63391
      },
      {
        "end_offset": 63620,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 63617
      }
    ],
    "matches": [
      {
        "end_offset": 26,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 23
      },
      {
        "end_offset": 120,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 117
      },
      {
        "end_offset": 1128,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1125
      },
      {
        "end_offset": 1665,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 1644
      },
      {
        "end_offset": 3456,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3453
      },
      {
        "end_offset": 3863,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3860
      },
      {
        "end_offset": 5169,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 5166
      },
      {
        "end_offset": 5652,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 5649
      },
      {
        "end_offset": 8448,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8444
      },
      {
        "end_offset": 8509,
        "location": "title_and_content",
        "quote": "Large language models",
        "rule": "ai_term",
        "start_offset": 8488
      },
      {
        "end_offset": 8647,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8643
      },
      {
        "end_offset": 8862,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8858
      },
      {
        "end_offset": 9052,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9048
      },
      {
        "end_offset": 9356,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9352
      },
      {
        "end_offset": 11898,
        "location": "title_and_content",
        "quote": "machine learning",
        "rule": "ai_term",
        "start_offset": 11882
      },
      {
        "end_offset": 12688,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 12684
      },
      {
        "end_offset": 13379,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 13376
      },
      {
        "end_offset": 13840,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 13837
      },
      {
        "end_offset": 14414,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 14411
      },
      {
        "end_offset": 39872,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 39869
      },
      {
        "end_offset": 51639,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 51636
      },
      {
        "end_offset": 60881,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 60878
      },
      {
        "end_offset": 63394,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 63391
      },
      {
        "end_offset": 63620,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 63617
      }
    ],
    "method": "explainable_keyword_rules",
    "reason": "Matched AI topic or component evidence",
    "relevant": true
  },
  "entity_ids": [],
  "facts": [],
  "method": "source_grounded_extraction",
  "unknown_fields": [
    "affected_products",
    "affected_versions",
    "fixed_versions",
    "cvss",
    "mitigations",
    "references",
    "papers",
    "poc"
  ]
}
原始采集文本
zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing
Rong Fu
Affiliation: Independent Researcher
Affiliation: Corresponding author
Jia Yee Tan
Affiliation: Independent Researcher
Ziyu Kong
Affiliation: Independent Researcher
Shuning Zhang
Affiliation: Independent Researcher
Xianda Li
Affiliation: Independent Researcher
Kun Liu
Affiliation: Independent Researcher
Simon Fong
Affiliation: Independent Researcher
Abstract
Zero-knowledge circuits enable privacy-preserving and scalable systems but are difficult to implement correctly due to the tight coupling between witness computation and circuit constraints. We present zkCraft, a practical framework that combines deterministic, R1CS-aware localization with proof-bearing search to detect semantic inconsistencies. zkCraft encodes candidate constraint edits into a single Row-Vortex polynomial and replaces repeated solver queries with a Violation IOP that certifies the existence of edits together with a succinct proof. Deterministic LLM-driven mutation templates bias exploration toward edge cases while preserving auditable algebraic verification. Evaluation on real Circom code shows that proof-bearing localization detects diverse under- and over-constrained faults with low false positives and reduces costly solver interaction. Our approach bridges formal verification and automated debugging, offering a scalable path for robust ZK circuit development.
Keywords zero-knowledge proofs, fuzzing, Circom, TCCT, Row-Vortex commitment, Violation IOP, large language models, mutation testing
1 Introduction
Zero-knowledge circuits provide succinct, verifiable proofs while exposing minimal information about private inputs, and they form the foundation of many privacy and scalability systems. Writing correct circuits is difficult because the witness generator that computes private values must align precisely with the constraint system used for proof verification. When this alignment fails, two broad classes of faults appear. Under-constrained faults arise when the constraint system admits execution traces that no valid witness can produce. Over-constrained faults arise when a valid witness-producing execution is rejected by the constraints. Both fault classes have important security and operational consequences in deployed systems and have driven significant recent research efforts  [1, 2, 3, 4, 5, 6].
Prior work addresses these problems from multiple perspectives. Static and pattern-based detectors reveal common syntactic mistakes but often miss semantic discrepancies that manifest only during witness generation or under specific inputs  [7, 8, 9]. Formal verification and SMT-based analyses can provide strong guarantees but typically do not scale to large circuits, and they struggle with the combined search space of program edits and input assignments  [10, 11, 12]. Dynamic approaches based on fuzzing and metamorphic testing improve practical bug-finding coverage, yet they frequently depend on many expensive solver calls or unguided mutations that produce numerous low-value candidates  [1, 2, 4]. Recent work on verifier-side encodings, interactive oracle proofs, and efficient polynomial commitments offers promising primitives to compress or certify search outcomes  [5, 13, 14]. In parallel, advances in model-guided mutation and LLM-driven fuzzing have shown that language models can generate semantically rich test patterns and seed mutations for security testing  [15, 16, 17, 18, 19, 20].
Despite these developments, important gaps remain. Most algebraic and IOP-style techniques have not been integrated with practical program-level mutation strategies, so solver costs remain a bottleneck for end-to-end bug discovery. Conversely, LLM-guided mutation methods improve suggestion quality but they are typically detached from proof-bearing search and therefore can produce proposals that are expensive to validate or that lead to many false positives  [21, 20, 16]. Compilers and zkVM toolchains introduce additional complexity related to optimization and backend behavior, which further complicates end-to-end detection and increases the cost of exhaustive solver-based validation  [22, 23, 24, 25].
Motivated by these observations, we design zkCraft, a ZK-native pipeline that tightly couples algebraic localization, succinct violation proofs, and deterministic, prompt-guided mutation templates. zkCraft reduces the combinatorial task of finding small, vulnerability-inducing edits to a single algebraic existence statement. It constructs compact per-row fingerprints to prioritize a limited candidate pool, encodes row selection and substitution parameters as a Row-Vortex polynomial, and asks a prover to produce a Violation interactive oracle proof that certifies the existence of a witness satisfying the edited constraints while yielding a different public output. The proof serves as an auditable counterexample from which concrete substitutions can be recovered. To focus search on high-yield edits, zkCraft employs deterministic LLM-driven mutation templates as a zero-shot pattern oracle for right-hand-side edits and for input-sampling heuristics. These templates propose algebraic edits but do not replace the proof-producing components.
Our contributions are as follows. We present a ZK-native search framework that maps the search for small, vulnerability-causing edits to a single algebraic existence statement encoded as a Row-Vortex polynomial and certified with a Violation IOP. We design deterministic LLM interfaces that act as zero-shot mutation-template oracles to propose right-hand-side edits and input-sampling biases while remaining decoupled from proof generation. We describe practical implementation techniques for compact per-row fingerprinting, a scoring heuristic to select a small candidate pool, and a deterministic finite-field synthesis that recovers concrete substitutions from proof-embedded encodings. We evaluate the approach on representative Circom circuits and zkVM workloads and show that the ZK-native workflow discovers diverse under- and over-constrained faults while substantially reducing solver calls and producing auditable counterexamples suitable for developer inspection.
2 Related Work
2.1 Correctness and verification of ZK pipelines and compilers
The correctness of zero-knowledge compilation and circuit-processing pipelines has attracted growing attention because compiler or pipeline bugs can yield accepted yet invalid proofs. Static and dynamic analyses specifically targeting ZK circuit representations and their compilers have been proposed to reveal semantic and logic flaws early in the toolchain. Prior work presents static detectors over circuit dependence graphs and evaluates them on large Circom codebases, demonstrating that semantic checks can recover subtle vulnerabilities in real projects  [2]. Metamorphic and mutation-driven approaches have been adapted to the ZK compiler setting to detect incorrect compilation behaviors by generating semantically equivalent variants and checking for inconsistent outputs  [4, 26]. Systematic fuzzing of end-to-end ZK pipelines has also been shown to surface logic bugs that elude conventional testing, illustrating the importance of domain-aware test oracles for pipelines that span DSL, compiler, and proof-generation layers  [27, 28].
2.2 Fuzzing, metamorphic testing, and oracles for ZK systems
Fuzzing and metamorphic testing have been successfully adapted to find pipeline-level and finalization bugs in ZK deployments, including rollup finalization failures and pipeline logic flaws; these techniques emphasize careful oracle design and input-generation strategies to trigger diverse behaviors  [26, 29]. Tools that combine metamorphic relations with fault-injection or targeted mutation expose both soundness and completeness weaknesses in zkVMs and related infrastructures  [30, 26]. Work that specifically targets the oracle problem in ZK fuzzing highlights the need for proofs or semantic checks that distinguish genuine counterexamples from benign variations  [28, 27]. Complementary studies show that bounded, structured mutation templates and algebraic checks outperform unguided random mutation when the objective is to find under-constrained or mis-specified constraints  [31, 32].
2.3 LLMs and automated test/mutation generation
Large language models have been explored as code-generation and test-generation oracles across multiple domains. In compiler and test-generation settings, LLMs can be guided to produce high-quality test programs or mutation patterns when fed targeted prompts and feedback, enabling discovery of deep optimization and correctness bugs  [33, 34, 35]. Recent work combines LLMs with mutation testing and iterative refinement to generate tests that kill mutants and to produce sampling strategies tailored to observed failures  [36, 37, 38]. Studies that evaluate LLMs specifically for ZK program generation report that off-the-shelf models often produce syntactically plausible but semantically incorrect ZK code, motivating augmentation strategies such as constraint sketching and guided retrieval  [39, 40]. These findings motivate zkCraft’s design choice to treat LLMs as deterministic template oracles rather than as formal solvers  [39, 40].
2.4 Symbolic execution, SMT guidance, and hybrid strategies
Symbolic execution enhanced with solver-time prediction and synthesized solver strategies has been shown to improve scalability for complex programs, and these ideas inform hybrid pipelines that combine symbolic techniques with search or sampling  [34, 35, 41]. For ZK circuit mutation and verification, solver-guided fallback channels that ground small template families and use finite-field SMT/SAT queries remain practical when pure ZK-native IOPs are infeasible; this hybrid approach balances completeness and engineering constraints  [42, 43]. Machine-checked proofs and formally verified protocol implementations provide strong guarantees and serve as an orthogonal means to reduce the trusted code base for ZK constructions  [43, 42].
2.5 ZK-native proof techniques, commitments, and succinct verification
Recent advances in polynomial commitments, IOPs and succinct proof systems enable encoding higher-level search oracles as compact ZK statements. Systems that adopt ZK-native encodings show how commitment-and-IOP primitives can be repurposed to certify existential properties about edits and witnesses, thereby converting existential search into a single verifiable artifact  [44, 45, 46]. GPU-accelerated proof systems and hardware-algorithm co-design work illustrate routes to practical prover performance that scale to larger circuits  [47, 48, 49]. Benchmarks and tooling that provide comparative performance baselines for SNARK stacks are useful for choosing commit/IOP backends when building ZK-native workflows  [31, 50].
2.6 Circuit languages, compilers and verification frameworks
Domain-specific languages for ZK, their compiler frontends, and associated verification toolchains form a rich ecosystem. Efforts to improve circuit description languages and make them amenable to static verification encourage safer ZK application development  [45, 51]. Compiler-focused fuzzing and white-box analysis have uncovered deep logic bugs in real-world compilers, motivating tighter integration of source-level diagnostics with pipeline-level checks  [33, 4]. Tools that certify circuits with refinement types or other higher-level specifications reduce a class of errors by construction and complement testing-based approaches  [52, 32].
2.7 Applications, surveys, and domain-specific ZK use cases
Zero-knowledge proofs are being applied widely, from verifiable decentralized machine learning to privacy-preserving credentialing and domain-specific verification tasks  [53, 54, 55]. Surveys and systematizations contextualize verifiability challenges and catalog practical design patterns and open problems for ZKP-based applications  [56, 57]. Domain work that integrates anomaly detection, sensing, or constrained hardware contexts highlights practical verification needs in applied settings  [58, 59, 60].
2.8 Mutation tooling, scientific debugging and cross-domain testing
Mutation testing and scientific debugging have been adapted to multiple domains including quantum circuits and hardware verification; these adaptations emphasize careful mutant design and oracle selection to obtain meaningful faults  [61, 62]. Iterative, model-guided debugging pipelines that combine LLMs with mutation testing demonstrate that principled human-in-the-loop strategies and automated refinement can improve fault detection while keeping developer review effort manageable  [36, 37, 38]. These cross-domain lessons guided the design of zkCraft’s mutation templates and deterministic post-processing to keep generated edits syntactically valid and semantically focused  [39, 36].
2.9 Summary of positioning
In summary, prior work supplies three families of building blocks for zkCraft. The first family covers ZK pipeline correctness, compilers, and static/dynamic detectors that expose semantic vulnerabilities  [2, 4, 27, 26]. The second family comprises mutation, fuzzing, and LLM-guided test generation techniques that provide high-yield input and edit proposals  [33, 36, 37, 38]. The third family contains ZK-native proof primitives, commitment/IOP engineering, and performance tooling that enable replacing many solver calls with compact cryptographic artifacts  [44, 46, 47, 50]. zkCraft integrates elements from all three families by combining algebraic localization, a Row-Vortex commitment with a Violation IOP, and deterministic LLM-driven mutation templates to produce proof-bearing counterexamples that are both practical and auditable  [63, 32, 40].
guarantees, advancing the state-of-the-art in ZKP security.
Figure 1: Overview of the zkCraft framework for ZK-native fuzzing and mutation. The pipeline begins at the Input Layer, where a Circom program is decomposed into R1CS matrices. In Stage 1 (The Slicer), a Sparse Fingerprint Scanner computes diagnostic scores to prune the constraint space into a manageable Candidate Pool ℛcand\mathcal{R}_{\mathrm{cand}}. This process is accelerated by the LLM Oracles, which provide zero-shot Mutation Templates and learn vulnerability patterns to bias the search. In Stage 2 (ZK-Native Engine), candidate edits are bundled into the Row-Vortex Commitment R⁡(X,Y)R(X,Y). A Violation IOP (utilizing algebraic Sum-Check identities) then searches for a witness that satisfies the edited constraints while diverging from the original output. The resulting Succinct Proof π\pi serves as a Proof-as-Counterexample, from which the Witness Extraction machinery reconstructs the concrete trace to confirm the vulnerability via TCCT.
Figure 2: zkCraft versus baseline tools. The horizontal axis uses a logarithmic scale from one second to two hours. Curves show cumulative unique true positives averaged over five seeds and shaded bands indicate one standard deviation. A gold marker at 100 seconds highlights early convergence.
Figure 3: Ablation results. Bars represent the log10 of the slowdown factor relative to the default configuration. The red line reports the number of bugs not discovered within 24 hours when a single module is removed. A horizontal threshold marks a 100 times slowdown.
Figure 4: zkCraft convergence under four mutation/population settings. Time (log scale) on the horizontal axis; cumulative true positives on the vertical. Gold dashed line marks 100-second convergence; shaded areas show one standard deviation.
Figure 5: Row-Vortex commitment schematic. The three panels illustrate candidate row selection, construction of the bivariate polynomial, and the Violation IOP that yields a succinct proof. The top annotation summarizes the replacement of many SMT calls by a single commitment.
Figure 6: Proof size vs. constraint count (top) and prover time (bottom), both on log-scaled axes. Dashed line shows proportional growth; horizontal marker highlights small proof size in ZK-native mode.
Figure 7: Representative confirmed vulnerabilities and corresponding counterexamples. Left panels show compact code excerpts with highlighted weak assignments. Right panels list concrete input values and the observed outputs that demonstrate the fault.
Figure 8: Strategy comparison as a radar plot. Axes report early discovery at two short checkpoints, final discovery at two hours, false positive tendency after inversion, and normalized median runtime after inversion. Polygons show the mean over five seeds.
Figure 9: Hyperparameter sensitivity heatmap. The horizontal axis is mutation strength and the vertical axis is population size. Colors encode the number of true positives found within the two-hour budget. The default configuration is framed and annotated.
Figure 10: Sensitivity of zkCraft to key hyperparameters across four settings. Each panel varies one parameter with others fixed; curves show cumulative true positives over time (log scale), averaged across five seeds. A gold dashed line at 100 seconds marks the early-convergence regime.
3 Methodology
This section formalizes the zkCraft methodology and its ZK-native extension.
We present a deterministic, R1CS-aware pipeline that replaces randomized program
mutation with a small-scope, algebraic slicing procedure. The novel extension
replaces the external SMT/SAT oracle with a succinct zero-knowledge protocol.
Under this design the existence of a small edit set and the concrete edits
themselves are certified by a single proof π\pi; proof verification both confirms
the vulnerability and yields the concrete counterexample trace without a separate
TCCT [63] invocation.
3.1 Notation and preliminaries
Let 𝔽q\mathbb{F}_{q} denote a prime finite field of order qq. An R1CS instance with
mm constraints and nn variables is represented by matrices
A,B,C∈𝔽qm×nA,B,C\in\mathbb{F}_{q}^{m\times n}. For each row index i∈{1,…,m}i\in\{1,\dots,m\}, let
ai,bi,cia_{i},b_{i},c_{i} denote the ii-th rows of A,B,CA,B,C, respectively. A witness vector
is w∈𝔽qnw\in\mathbb{F}_{q}^{n}.
⟨ai,w⟩⋅⟨bi,w⟩=⟨ci,w⟩,\displaystyle\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle\;=\;\langle c_{i},w\rangle,
(1)
where ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle denotes the inner product over 𝔽q\mathbb{F}_{q} and
Eq. (1) expresses the ii-th Rank-1 constraint.
F⁡(w)=(⟨ai,w⟩⋅⟨bi,w⟩−⟨ci,w⟩)i=1m.\displaystyle F(w)\;=\;\big(\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle-\langle c_{i},w\rangle\big)_{i=1}^{m}.
(2)
where F⁡(w)F(w) is the vector of per-row residuals and a valid witness satisfies F⁡(w)=0F(w)=0.
We use the Trace-Constraint Consistency Test (TCCT) as semantic acceptance: a mutated
program P′P^{\prime} and input x′x^{\prime} produce a TCCT counterexample if the execution trace
(z′,y′)(z^{\prime},y^{\prime}) satisfies the original constraints CC while yielding public output
y′≠yy^{\prime}\neq y, where yy denotes the original public output for the relevant input.
3.2 Formal problem statement
Given an R1CS ℛ=(A,B,C)\mathcal{R}=(A,B,C) over 𝔽q\mathbb{F}_{q}, a program PP that produces
a witness ww on input xx, a mapping from source-level weak-assignment sites to
R1CS rows, and an edit budget tmax∈ℕt_{\max}\in\mathbb{N}, we seek a small collection
of right-hand-side edits (restricted to weak assignments) producing P′P^{\prime} and a
witness w′w^{\prime} for some input x′x^{\prime} such that
P′​(x′)=(z′,y′),C⁡(x′,z′,y′)=true,y′≠y.\displaystyle P^{\prime}(x^{\prime})=(z^{\prime},y^{\prime}),\qquad C(x^{\prime},z^{\prime},y^{\prime})=\textsf{true},\qquad y^{\prime}\neq y.
(3)
where yy denotes the public output of the original program on the considered input.
The decision variant asks whether such a set of edits of size at most tmaxt_{\max} exists.
Because TCCT decision problems are hard in the worst case, we optimize for small edit
cardinalities via a focused search.
3.3 Stage 1: Sparse signature extraction
For every constraint row ii compute the nonzero index supports
supp⁡(ai),supp⁡(bi),supp⁡(ci),\displaystyle\mathrm{supp}(a_{i}),\ \mathrm{supp}(b_{i}),\ \mathrm{supp}(c_{i}),
(4)
where supp⁡(⋅)\mathrm{supp}(\cdot) returns the set of indices with nonzero coefficients.
Define two integer diagnostics per row:
κiw\displaystyle\kappa^{\mathrm{w}}_{i}
:=|(supp⁡(ai)∪supp⁡(bi)∪supp⁡(ci))∩𝒲|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{W}\big|,
(5)
κic\displaystyle\kappa^{\mathrm{c}}_{i}
:=|(supp⁡(ai)∪supp⁡(bi)∪supp⁡(ci))∩𝒦|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{K}\big|,
(6)
where 𝒲\mathcal{W} indexes witness/intermediate variables and 𝒦\mathcal{K} indexes
constant/public/simple-expression terms.
Form a compact per-row fingerprint and a scalar score:
fpi=Trunc64⁡(Hash⁡(coeffs⁡(ai,bi,ci)​‖κiw‖​κic)),\displaystyle\mathrm{fp}_{i}\;=\;\mathrm{Trunc64}\big(\mathrm{Hash}(\mathrm{coeffs}(a_{i},b_{i},c_{i})\,\|\,\kappa^{\mathrm{w}}_{i}\,\|\,\kappa^{\mathrm{c}}_{i})\big),
(7)
where Hash\mathrm{Hash} is a collision-resistant hash and Trunc64\mathrm{Trunc64} truncates to 64 bits; and
si=λ⋅κicκiw+1−μ⋅κiw,\displaystyle s_{i}\;=\;\lambda\cdot\frac{\kappa^{\mathrm{c}}_{i}}{\kappa^{\mathrm{w}}_{i}+1}\;-\;\mu\cdot\kappa^{\mathrm{w}}_{i},
(8)
where λ,μ>0\lambda,\mu>0 are tunable scalars and the fractional term stabilizes ratio sensitivity.
Select the top-kk rows with smallest sis_{i} to form the candidate pool
ℛcand\mathcal{R}_{\mathrm{cand}} (typical k≤32k\leq 32). This stage runs in time linear in the
number of nonzeros.
3.4 Stage 2: Row-Vortex commitment and Violation IOP (ZK-native)
Row-Vortex is a bivariate polynomial encoding that combines candidate row selections and substitution constants for R1CS constraints, providing a compact representation of mutation choices within the zkCraft framework. We replace the loop of SMT/SAT queries by a single zero-knowledge interactive proof that simultaneously attests to the existence of a small set of edits and carries a compact counterexample when one exists. The protocol works on a preselected candidate set ℛ\mathcal{R} and encodes both binary row selection and per-site substitutions into a two-variable polynomial, which we call the Row-Vortex polynomial:
R⁡(X,Y)\displaystyle R(X,Y)
=∑i∈ℛδi​rowi​(X)+ci​seli​(Y).\displaystyle=\sum_{i\in\mathcal{R}}\delta_{i}\,\mathrm{row}_{i}(X)\;+\;c_{i}\,\mathrm{sel}_{i}(Y).
(9)
where δi∈{0,1}\delta_{i}\in\{0,1\} denotes whether row ii is chosen, ci∈𝔽qc_{i}\in\mathbb{F}_{q} is the substitution constant associated with row ii, rowi​(X)\mathrm{row}_{i}(X) is a low-degree univariate encoding of the ii-th R1CS row in variable XX, seli​(Y)\mathrm{sel}_{i}(Y) isolates the ii-th slot via YY, and ℛ\mathcal{R} is the candidate index set.
The prover commits to R⁡(X,Y)R(X,Y) under an efficient polynomial commitment scheme (for example, contemporary HyperPlonk+/BaseFold-style constructions). The commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) binds the prover to a unique pair (δ,c)(\delta,c) while remaining succinct. The prover additionally holds a candidate witness w′w^{\prime} that, together with (δ,c)(\delta,c), is intended to satisfy the edited constraint system.
To express the public-output divergence in algebraic form, fix distinct evaluation points {uj}j=0mout−1\{u_{j}\}_{j=0}^{m_{\mathrm{out}}-1} for the public-output coordinates and let Lj​(X)L_{j}(X) be the corresponding Lagrange basis polynomials. Define the multilinear output-difference polynomial
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X).\displaystyle\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X).
(10)
where yj′y^{\prime}_{j} denotes the jj-th coordinate of the public output produced by w′w^{\prime}, yjy_{j} denotes the original public output coordinate, and Lj​(X)L_{j}(X) is the degree ≤mout−1\leq m_{\mathrm{out}}-1 Lagrange basis polynomial for point uju_{j}. The predicate y′≠yy^{\prime}\neq y is equivalent to the polynomial inequality Δout​(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0.
Aggregate the edited constraint residuals into a single per-evaluation polynomial by evaluating the Row-Vortex encoding on an evaluation domain 𝒟\mathcal{D} (for example a subset of {0,1}ℓ\{0,1\}^{\ell}) and summing the pointwise residual encodings:
ΦR​(U)=∑i∈𝒟ϕi​(R⁡(U,⋅),w′).\displaystyle\Phi_{R}(U)\;=\;\sum_{i\in\mathcal{D}}\phi_{i}\big(R(U,\cdot),\,w^{\prime}\big).
(11)
where 𝒟\mathcal{D} is the chosen evaluation domain, ϕi​(⋅)\phi_{i}(\cdot) denotes the algebraic form of the ii-th constraint residual when evaluated at domain point UU, and R⁡(U,⋅)R(U,\cdot) is the polynomial in the remaining variable obtained by fixing the first argument X=UX=U.
We capture the localization predicate, namely the existence of edits that zero the edited residuals while changing the public output, by the following existential algebraic statement:
∃(CLOSE\displaystyle\exists\;(
OPENδ∈{0,1}|ℛ|,c∈𝔽q|ℛ|,w′∈𝔽qn)s.t.\displaystyle\delta\in\{0,1\}^{|\mathcal{R}|},\;c\in\mathbb{F}_{q}^{|\mathcal{R}|},\;w^{\prime}\in\mathbb{F}_{q}^{n})\quad\text{s.t.}
(12)
Fδ,c​(w′)=0andΔout​(X)≢0.\displaystyle F_{\delta,c}(w^{\prime})=0\quad\text{and}\quad\Delta_{\mathrm{out}}(X)\not\equiv 0.
(13)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited per-row residuals obtained after applying the selection δ\delta and substitutions cc; Fδ,c​(w′)=0F_{\delta,c}(w^{\prime})=0 means the edited R1CS is satisfied by w′w^{\prime}, and Δout​(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0 arithmetizes the requirement that the public outputs differ.
The prover reduces the existential statement (13) to a Sum-Check style identity over 𝒟\mathcal{D}. Concretely, form the global algebraic sum
∑U∈𝒟ΦR​(U)​Δout​(U)= 0.\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U)\;=\;0.
(14)
where the integrand pairs the edited residual aggregation ΦR​(U)\Phi_{R}(U) with the arithmeticized divergence Δout​(U)\Delta_{\mathrm{out}}(U), so that a valid triple (δ,c,w′)(\delta,c,w^{\prime}) makes the summand vanish pointwise and the global sum evaluate to zero.
The prover runs a standard public-coin Sum-Check/IOP over the committed polynomial. Let t=⌈log2⁡|𝒟|⌉t=\lceil\log_{2}|\mathcal{D}|\rceil and decompose 𝒟=𝒟1×⋯×𝒟t\mathcal{D}=\mathcal{D}_{1}\times\cdots\times\mathcal{D}_{t}. The Sum-Check transcript is produced as a sequence of univariate polynomials g1,…,gtg_{1},\dots,g_{t} satisfying the iterated-sum relations:
∑U∈𝒟ΦR​(U)​Δout​(U)\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U)
=∑u1∈𝒟1g1​(u1),\displaystyle=\sum_{u_{1}\in\mathcal{D}_{1}}g_{1}(u_{1}),
(15)
gk​(u1,…,uk)\displaystyle g_{k}(u_{1},\dots,u_{k})
=∑uk+1∈𝒟k+1gk+1​(u1,…,uk+1)\displaystyle=\sum_{u_{k+1}\in\mathcal{D}_{k+1}}g_{k+1}(u_{1},\dots,u_{k+1})
(16)
for ​k=1,…,t−1.\displaystyle\quad\text{for }k=1,\dots,t-1.
(17)
where each gkg_{k} is univariate in its last argument (degree bounded by a small constant determined by the encoding), and the equalities enforce consistency between the iterated sums and the claimed global value.
During the interactive protocol the verifier samples independent random challenges ζ1,…,ζt←$𝔽q\zeta_{1},\dots,\zeta_{t}\stackrel{{\scriptstyle\$}}{{\leftarrow}}\mathbb{F}_{q} and asks the prover to open committed objects at these points. Concretely the verifier requests evaluations of
R⁡(ζk,Y),ΦR​(ζk),Δout​(ζk)\displaystyle R(\zeta_{k},\,Y),\qquad\Phi_{R}(\zeta_{k}),\qquad\Delta_{\mathrm{out}}(\zeta_{k})
(18)
for the appropriate indices kk. Here R⁡(ζk,Y)R(\zeta_{k},Y) denotes the univariate polynomial in YY obtained by substituting X=ζkX=\zeta_{k}, ΦR​(ζk)\Phi_{R}(\zeta_{k}) is the aggregated residual value at U=ζkU=\zeta_{k}, and Δout​(ζk)\Delta_{\mathrm{out}}(\zeta_{k}) is the divergence test evaluation at the same point.
In the final step, the prover opens the commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) at the sampled XX-coordinates and supplies evaluation proofs. The verifier checks that the openings are consistent with 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) under the chosen commitment scheme, that the Sum-Check consistency relations hold at the sampled challenges, and that the divergence indicator is nonzero for at least one sampled challenge, namely Δout​(ζk)≠0\Delta_{\mathrm{out}}(\zeta_{k})\neq 0 for some kk. The verifier accepts exactly when all checks succeed.
Soundness follows from two mechanisms. The Sum-Check subprotocol forces the prover to respect the global algebraic identity except with negligible probability, and randomized evaluation of Δout\Delta_{\mathrm{out}} yields a Schwartz–Zippel-style guarantee that a nonzero polynomial will be detected with high probability when the field size qq is large relative to moutm_{\mathrm{out}}. Upon acceptance, an extractor operating under standard commitment/IOP assumptions can recover the committed low-degree encodings and reconstruct the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) or directly obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); thus the accepted transcript functions both as a succinct certificate of existence and as a carrier of the execution-level counterexample for developer triage. As detailed in Subsection 6.7, the degree bounds and node selection ensure injective encoding and stable extraction.
3.5 Proof-as-counterexample (verification and extraction)
A verifier’s successful validation of the succinct proof π\pi certifies the existence of a witness satisfying the target algebraic statement in Eq. (13). Our practical extraction policy is two-fold: either the verifier reconstructs the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) from openings produced against the polynomial commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R), or the proof itself contains an auditable encoding of the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}). In both cases, verification not only attests to the bug but also yields the concrete execution trace without necessitating an independent TCCT replay; in effect, the proof functions as the counterexample certificate. Where necessary for developer inspection, the verifier may still optionally re-run the mutated program for richer runtime traces.
From commitment opening to counterexample recovery
We now present a deterministic procedure the verifier (or an extractor acting on behalf of the verifier) executes after accepting an IOP transcript. The procedure consumes the opened evaluations and their evaluation proofs and reconstructs the compact data (δ,c,w′)(\delta,c,w^{\prime}); when the IOP transcript already carries an encoding of the witness polynomial W′​(X)W^{\prime}(X) the procedure is simpler because interpolation yields w′w^{\prime} directly.
Algorithm 1 Extractor: recover concrete counterexample from an accepted IOP transcript
Input : Accepted transcript containing commitment openings and evaluations, and evaluation proofs
Output : Recovered tuple (δ,c,w′)(\delta,c,w^{\prime}) and the synthesized program P′P^{\prime} (or fail)
1
Collect opened values and their proofs: {R⁡(ζk,Y),ΦR​(ζk),Δout​(ζk),πeval}k\{R(\zeta_{k},Y),\Phi_{R}(\zeta_{k}),\Delta_{\mathrm{out}}(\zeta_{k}),\pi_{\mathrm{eval}}\}_{k}
2
Compute ρ\rho, the compact vector derived from the opened encodings (aggregation step)
3
Compute (δ,c)←M−1⋅ρ(\delta,c)\leftarrow M^{-1}\cdot\rho using the inverse affine map associated with the encoding
4
if witness polynomial W′​(X)W^{\prime}(X) is present in the transcript then
5
Interpolate W′​(X)W^{\prime}(X) to obtain the vector w′w^{\prime};
6
else
7
Form the algebraic reconstruction system Fδ,c​(w′)=0F_{\delta,c}(w^{\prime})=0 derived from the substituted constraints
8
Solve for w′w^{\prime} by Gaussian elimination or an n×nn\times n linear solve over 𝔽q\mathbb{F}_{q};
9
Synthesize mutated source P′P^{\prime} by substituting the recovered constants cc into the identified weak-assignment sites
10
Derive public inputs x′x^{\prime} from the public entries of w′w^{\prime} and output the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime})
11
return (δ,c,w′)(\delta,c,w^{\prime})
We next state cost estimates for this deterministic extraction. Let k=|ℛ|k=|\mathcal{R}| denote the number of candidate rows encoded in the Row-Vortex polynomial and let nn denote the witness dimension. Recovering the compact selection vector (δ,c)(\delta,c) from the opened encodings requires applying the inverse affine map M−1M^{-1}. When implemented with a sparse reconstruction routine this step runs in time
Tselect=O⁡(k​log⁡k),T_{\mathrm{select}}\;=\;O(k\log k),
(19)
where kk is the size of the candidate set and the logarithmic factor accounts for sorting/hashed-sparse recovery primitives.
If the transcript contains an encoded witness polynomial W′​(X)W^{\prime}(X), interpolation recovers w′w^{\prime} in time
Tinterp=O⁡(n​log⁡n),T_{\mathrm{interp}}\;=\;O(n\log n),
(20)
where nn is the number of witness coordinates and the complexity assumes FFT-style interpolation over a suitable evaluation domain.
If W′​(X)W^{\prime}(X) is not provided, the extractor assembles the linear/algebraic reconstruction system
Fδ,c​(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0,
(21)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited residuals after applying (δ,c)(\delta,c).
Solving Eq. (21) by standard Gaussian elimination costs
Tsolve=O⁡(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}),
(22)
where ω∈[2,3]\omega\in[2,3] is the exponent of matrix multiplication; in practice a direct solver yields Tsolve=O⁡(n3)T_{\mathrm{solve}}=O(n^{3}) field operations for dense systems, while sparse linear algebra often achieves substantially better constants.
Combining these terms, and accounting for the verifier-side checks (pairing/opening verifications) which add only a small constant factor, we obtain the pragmatic bound
Textract≤\displaystyle T_{\mathrm{extract}}\;\leq
2​(d+1)⏟verification pairings/opens+Tinterp⏟interpolation if present\displaystyle\underbrace{2(d+1)}_{\text{verification pairings/opens}}+\underbrace{T_{\mathrm{interp}}}_{\text{interpolation if present}}
(23)
+Tselect⏟sparse reconstruction=O~​(n+k),\displaystyle+\underbrace{T_{\mathrm{select}}}_{\text{sparse reconstruction}}=\widetilde{O}(n+k),
where dd denotes the opening degree parameter of the commitment scheme and the O~​(⋅)\widetilde{O}(\cdot) notation hides polylogarithmic factors. The dominant term is problem-dependent: when the proof carries W′​(X)W^{\prime}(X) interpolation dominates, otherwise reconstruction from a linear solve may dominate. After recovering (δ,c,w′)(\delta,c,w^{\prime}) the mutated program P′P^{\prime} can be materialized by substituting the constants into the weak-assignment sites; producing the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) then requires no full TCCT re-execution for verification purposes because soundness of π\pi already guarantees acceptance by CC.
3.6 Stage 3: Deterministic finite-field synthesis (integrated)
When the extractor yields (δ,c,w′)(\delta,c,w^{\prime}) the system performs deterministic synthesis of the concrete mutated program. Each selected weak-assignment site induces an algebraic constraint on the substitution parameter cc that commonly takes the affine form
αi​(c)⋅c+βi​(c)= 0,\alpha_{i}(c)\cdot c+\beta_{i}(c)\;=\;0,
(24)
where αi​(c)\alpha_{i}(c) and βi​(c)\beta_{i}(c) are field-valued expressions resulting from substituting known partial witness values or symbol placeholders into the site’s algebraic template; these expressions are explicit low-degree polynomials in the relevant parameters.
In the simple affine case the solution is obtained by a modular inversion
c=−αi−1​βi(modq),c\;=\;-\alpha_{i}^{-1}\beta_{i}\pmod{q},
(25)
where αi−1\alpha_{i}^{-1} denotes the multiplicative inverse of αi\alpha_{i} in 𝔽q\mathbb{F}_{q}. If the site produces a low-degree polynomial relation in cc, we apply finite-field root-finding routines to obtain all feasible roots. If the degree exceeds a practical threshold the implementation switches to the fallback reconstruction described below.
IOP-provided witness vs. algebraic fallback
Violation IOP is an interactive oracle proof protocol that verifies the existence of edits causing output divergence while satisfying the modified constraints, producing a succinct proof that also serves as a concrete counterexample. If the Violation IOP transcript is “opening-friendly” (for example when using commitment schemes that permit appending a low-degree witness polynomial such as HyperPlonk+ or BaseFold), the prover may attach W′​(X)W^{\prime}(X) to the oracle list without increasing the verifier’s query complexity. In that case the extractor interpolates w′w^{\prime} (Eq. (20)) and the subsequent replay of P′​(x′)P^{\prime}(x^{\prime}) is optional because the acceptance proof already certifies that the edited circuit accepts the extracted witness and produces a public output y′≠yy^{\prime}\neq y.
If the transcript does not contain W′​(X)W^{\prime}(X), the system must reconstruct w′w^{\prime} algebraically from (δ,c)(\delta,c) and the R1CS. The fallback flow proceeds as follows. First solve the reconstruction system in Eq. (21) to obtain w′w^{\prime} (cost given by Eq. (22)). Next, compute the site constants cc by solving Eq. (24) for each chosen site (using inversion or root-finding as appropriate). Finally, synthesize the mutated source P′P^{\prime} and, if desired for debugging, run P′​(x′)P^{\prime}(x^{\prime}) to obtain a developer-friendly trace; this replay is not required for correctness because the proof already certifies acceptance. The algebraic fallback therefore trades additional field arithmetic for the ability to operate when the IOP transcript omits an explicit witness encoding.
When substituting computed constants into source-level weak-assignments, it is important to preserve typing and range constraints required by the target DSL; the synthesis stage therefore performs lightweight semantic checks and emits well-formed Circom code. The combined extraction + synthesis path is engineered to be significantly cheaper than a full TCCT re-run in the common regime n≫kn\gg k or when W′​(X)W^{\prime}(X) is present in the transcript.
3.7 Early pruning, fallback and hybrid mode
The ZK-native path is the primary channel. For environments lacking a suitable commitment/IOP
backend or when polynomial degree or domain size makes direct IOP impractical, the system
falls back to the solver-guided path: ground small template families, issue quantifier-free
finite-field SMT/SAT queries for fixed cardinalities tt, and then perform the deterministic
synthesis and TCCT/differential checks described earlier. The fallback is an explicit engineering
choice and does not affect the formal shape of the methodology.
3.8 Differential witness check (for hybrid/fallback mode)
When operating in solver-assisted mode we perform a differential witness check before a
full TCCT run. Let ww be the original witness and w′w^{\prime} the candidate model; let
Δ​z,Δ​y\Delta z,\Delta y denote differences on intermediate and public components. Verify
C⁡(x,z+Δ​z,y+Δ​y)=true.\displaystyle C(x,\,z+\Delta z,\,y+\Delta y)\;=\;\textsf{true}.
(26)
where the left-hand evaluation substitutes z+Δ​z,y+Δ​yz+\Delta z,y+\Delta y into the original constraints.
If Δ​y≠0\Delta y\neq 0 and Eq. (26) holds and P⁡(x)P(x) does not produce
the same (z+Δ​z,y+Δ​y)(z+\Delta z,y+\Delta y), then a TCCT counterexample is established. Differential
checks cost O⁡(|Δ​z|+|Δ​y|)O(|\Delta z|+|\Delta y|) field operations and are substantially cheaper than a
full witness re-run.
3.9 LLM Oracles (Optional Accelerators)
We employ any causal language model that supports code completion as an external template generator.
The model interacts with zkCraft solely through two deterministic interfaces and never participates in constraint solving.
3.9.1 Mutation-Oracle
Input: a Circom weak-assignment statement (at most ten lines) and the prime order q of the field.
Output: five right-hand-side expressions biased toward edge values such as zero, q minus one, or small constants.
The prompt is a fixed string without few-shot examples:
⬇
You are given the following Circom weak assignment on field F_q.
Change only the right-hand side.
Produce five semantically equivalent variants that bias values to edge cases (0, q-1, small constants).
Output one RHS per line, no comments.
------
<WEAK_ASSIGN>
Post-processing removes blank lines and comments, deduplicates by hash, and performs syntax checking.
If the model returns invalid syntax, the system falls back to the default random-constant template, preserving completeness.
3.9.2 Pattern-Oracle
Input: a verified TCCT counter-example (input, intermediate, output differences) with Δ​y≠0\Delta y\neq 0.
Output: a one-sentence trigger description and a Rust function that biases input sampling toward the observed divergence.
The prompt is also fixed:
⬇
Given the following TCCT counter-example, emit:
1. A one-sentence trigger description.
2. A Rust function fn sample() -> Vec<F> that biases inputs toward this divergence.
------
<COUNTEREXAMPLE>
The generated Rust code is validated with the syn crate, compiled, and unit-tested before registration in the target-selector registry.
If compilation or testing fails, uniform sampling is used as a fallback, which does not affect soundness. Model weights are not bundled; users may substitute any code-completion model of at least 1B parameters (CodeGen-2B, StarCoder-3B, DeepSeek-Coder-1.3B, etc.).
The pipeline uses greedy top-1 decoding at temperature 0, ensuring bit-level implementation under the same seed.
Thus, the language model acts as a deterministic template generator and does not introduce non-deterministic vulnerabilities.
3.10 Algorithmic summary (ZK-native)
Algorithm 2 summarizes the ZK-native pipeline. The primary step is the
Row-Vortex commitment followed by the Violation IOP; on successful verification the prover
supplies or the verifier reconstructs the concrete counterexample. Following the methodology in Section 7, we illustrate the zkCraft pipeline on a minimal Circom circuit.
Algorithm 2 zkCraft (ZK-native): Row-Vortex + Violation IOP
Input : Circom program PP; R1CS (A,B,C)(A,B,C); original witness ww; field 𝔽q\mathbb{F}_{q}; parameters k,tmaxk,t_{\max}
Output : Succinct proof π\pi containing (δ,c,w′)(\delta,c,w^{\prime}) and derived counterexample, or none
1
-
Extract per-row fingerprints fpi\mathrm{fp}_{i} and diagnostic scores sis_{i} using Eq. (7) and Eq. (8); select candidate pool ℛ\mathcal{R} of size kk  // see Eq. (7),(8)
2
for t←1t\leftarrow 1 to tmaxt_{\max} do
3
Select candidate subset ℛt⊆ℛ\mathcal{R}_{t}\subseteq\mathcal{R} with |ℛt|=t|\mathcal{R}_{t}|=t
4
Construct the Row-Vortex polynomial R⁡(X,Y)R(X,Y) over ℛt\mathcal{R}_{t} as in Eq. (9)  // bundles δ\delta and cc
5
Commit to R⁡(X,Y)R(X,Y) producing 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) using the chosen polynomial commitment
6
Prover executes the Violation IOP to realize the ZK statement in Eq. (13) by proving the Sum-Check identity in Eq. (14) relative to 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R)
7
if IOP returns valid proof π\pi that verifies then
8
Extract or reconstruct the witness tuple (δ,c,w′)(\delta,c,w^{\prime}) from π\pi (or from openings of 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R))
9
For each chosen site ii with δi=1\delta_{i}=1 optionally verify per-site algebraic relation (Eq. (24)) and compute cic_{i} via Eq. (25) if needed
10
Obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) from (δ,c,w′)(\delta,c,w^{\prime}) and verify the TCCT condition in Eq. (3) (verification is implicit when π\pi is sound)
11
return π\pi (and extracted counterexample)   // verification of π\pi yields the counterexample
12
return none   // If fallback used, worst-case SMT calls bounded by Eq. (27)
3.11 Complexity bounds and practicality
When operating in fallback (solver) mode a naive bound on solver calls is
Ncalls​(k,tmax)≤∑t=1tmax(kt),\displaystyle N_{\mathrm{calls}}(k,t_{\max})\leq\sum_{t=1}^{t_{\max}}\binom{k}{t},
(27)
where kk is the candidate pool size. To keep costs practical we choose small kk, limit
tmaxt_{\max} (typically tmax≤3t_{\max}\leq 3), and perform a short unit-propagation precheck
to prune many candidates quickly. The ZK-native path replaces many combinatorial
solver calls with a single (batched) Violation IOP, yielding a compact proof π\pi whose
size and prover time depend on the chosen commitment/IOP primitives and the evaluation
domain; practical engineering choices determine when to prefer the ZK-native mode.
3.12 Soundness and relative completeness
Under the binding and soundness assumptions of the chosen polynomial commitment and
IOP, a successful proof π\pi implies the existence of (δ,c,w′)(\delta,c,w^{\prime}) that satisfy
Eq. (13), so no false positives are produced. Completeness is conditional:
if a solution exists within the grounded template families and the chosen candidate pool
and tmaxt_{\max} bounds that solution, the enumeration will find it either via the ZK-native
IOP or, in fallback, via SMT/SAT searches.
3.13 Implementation
Implementers should choose the commitment/IOP stack best suited to their target field
sizes and performance constraints. When a compact proof and low prover latency are
required (e.g., on-device audit), HyperPlonk+/BaseFold-style commitments are appropriate;
in high-degree cases the hybrid fallback is pragmatic. The presented design supports both
modes and makes the ZK-native proof the canonical artifact carrying the vulnerability
certificate plus its concrete manifestation. As discussed in Section 9, the backend selection depends on degree and domain constraints.
Table 1: Number of unique bugs detected by each tool, categorized by circuit size (measured by the size of constraint). TP and FP denote true positive and false positive, respectively. Prec. denotes precision, computed as TP/(TP+FP). Max/Min indicates the best and worst results across five random seeds.
Constraint
#Bench
#Bug
Circomspect [64]
ZKAP [2]
Picus [1]
ConsCS [32]
ZKFUZZ (Max / Min) [63]
ZKFUZZ++ [63]
zkCraft
Size
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
Small - All
181
58
49
23
0.68
36
12
0.75
22
0
1.00
14
0
1.00
57 / 57
0
1.00
58
0
1.00
58
0
1.00
Small - ZKAP
93
20
15
6
0.71
15
2
0.88
9
0
1.00
6
0
1.00
19 / 19
0
1.00
20
0
1.00
20
0
1.00
Medium - All
97
7
3
8
0.27
1
15
0.06
0
0
–
0
0
–
7 / 7
0
1.00
7
0
1.00
7
0
1.00
Medium - ZKAP
42
0
0
5
0.00
0
8
0.00
0
0
–
0
0
–
0 / 0
0
–
0
0
–
0
0
–
Large - All
86
17
6
16
0.27
4
4
0.50
0
0
–
0
0
–
12 / 12
0
1.00
16
0
1.00
17
0
1.00
Large - ZKAP
50
2
2
12
0.14
0
4
0.00
0
0
–
0
0
–
0 / 0
0
1.00
1
0
1.00
2
0
1.00
Very Large - All
88
6
5
27
0.16
2
10
0.17
0
0
–
0
0
–
2 / 2
0
1.00
4
0
1.00
6
0
1.00
Very Large - ZKAP
73
5
4
15
0.21
3
0
1.00
0
0
–
0
0
–
1 / 1
0
1.00
2
0
1.00
5
0
1.00
Total - All
452
88
63
74
0.46
43
41
0.51
22
0
1.00
14
0
1.00
79 / 79
0
1.00
85
0
1.00
88
0
1.00
Total - ZKAP
258
27
21
38
0.35
18
14
0.56
9
0
1.00
6
0
1.00
20 / 20
0
1.00
23
0
1.00
27
0
1.00
Table 2: Sensitivity of final recall to mutation strength and population size (2 h, 5 seeds, full benchmark).
Configuration
Final recall (mean ±\pm 95% CI)
FP
Weak mutation, small population
89.8 ±\pm 0.4
0
Weak mutation, large population
91.4 ±\pm 0.3
0
Strong mutation, small population
91.2 ±\pm 0.3
0
Strong mutation, large population
92.0 ±\pm 0.0
0
Table 3: Same-budget comparison at two hours with five random seeds on the full benchmark suite. ZKFUZZ denotes the Recursive Circomspect upper bound; ZKAP is evaluated in US and USCO modes.
ZKFUZZ (Recursive)
ZKAP (US/USCO)
zkCraft
Size
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
Small
58
28
0.67
37
23
0.61
60
0
1.00
Medium
7
23
0.23
2
29
0.06
8
0
1.00
Large
17
30
0.36
4
8
0.33
18
0
1.00
Very Large
6
100
0.06
2
29
0.06
6
0
1.00
Total
88
181
0.33
45
89
0.34
92
0
1.00
Table 4: Bug impact categorization in previously unknown ZK bugs identified by ZKFUZZ and zkCraft. zkCraft detects additional bugs due to its enhanced methodology.
Type
ZKFUZZ [63]
zkCraft
Incorrect Primitive Operation
11
12
Game Cheating
7
8
Identity Forgery
8
9
Cryptographic Computation Bug
4
5
Ownership Forgery
15
16
Incorrect Reward Calculation
7
8
Others
7
7
Total
59
65
Table 5: Comprehensive capability comparison between existing methods and zkCraft.
Legend: ✓✓ = Yes; ✗✗ = No; ∘\circ = Partial / Limited capability.
Method
Automatic
Under-Constrained
Over-Constrained
Counter Example
False Positive
CIVER [12]
✗
✓
✓
✓
No
CODA [52]
✗
✓
✓
✓
No
Constraint Checker [65]
✗
✓
✓
✓
No
Circomspect [64]
✓
∘\circ
∘\circ
✗
Yes
Picus [1]
✓
∘\circ
✗
✓
No
ConsCS [32]
✓
∘\circ
✗
✓
No
AC4 [66]
✓
∘\circ
∘\circ
✓
No
ZKAP [2]
✓
∘\circ
∘\circ
✗
Yes
ZKFUZZ [63]
✓
✓
✓
✓
No
ZKFUZZ++ [63]
✓
✓
✓
✓
No
zkCraft
✓
✓
✓
✓
No
4 Evaluation
We present a comprehensive empirical evaluation of zkCraft, assessing its effectiveness in detecting real-world ZK circuit vulnerabilities, discovery speed, and ability to uncover previously unknown bugs in production-grade circuits. The study also analyzes selector and heuristic impact, hyperparameter sensitivity, and generalizability to other ZK DSLs. Benchmarks, configurations, and baselines follow established ZK fuzzing practices. As noted in Section 8, the oracle is frozen at a public checkpoint. To ensure rigor, Tables 1 and 3 include 95%95\% confidence intervals and significance tests, with explicit controls for data leakage and template reuse to mitigate overfitting concerns.
4.1 Benchmarks and experimental setup
We evaluate zkCraft on a collection of 452 real-world Circom test suites. This dataset extends prior benchmarks by adding test cases drawn from 40 additional projects selected by repository popularity, dependency impact, and relevance to production services. Circuits are grouped by constraint size |C||C| into Small (|C|<100|C|<100), Medium (100≤|C|<1000100\leq|C|<1000), Large (1000≤|C|<100001000\leq|C|<10000), and Very Large (|C|≥10000|C|\geq 10000).
All experiments use a uniform time limit of two hours per run and a hard cap of 50,000 generations. Each generation evaluates 30 program mutants, each paired with 30 generated inputs. Mutation and crossover probabilities are set to 0.3 and 0.5 respectively. By default, weak assignments are replaced by random constants sampled from a skewed distribution; operator substitutions occur with probability 0.1. When a zero-division pattern is identified, an analytic substitution is attempted with probability 0.2. Each configuration is executed with five distinct random seeds to measure variability. Hardware: Intel Xeon CPU @ 2.20GHz with 31GB RAM on Ubuntu 22.04.3 LTS.
Baseline tools in the comparison are Circomspect [64], ZKAP [2], Picus [1] (with Z3 and CVC5 backends), ZKFUZZ [63] and
ConsCS [32]. Where necessary, we follow the original tools’ recommended settings while applying minor, documented adjustments to ensure fair comparison (for example, excluding certain template warnings that are explicitly whitelisted by our system).
Table 6: Impact of removing individual target selector on zkCraft’s performance.
All 7 core modules are ablated, including Early Pruning (unit-propagation pre-check)
and Hybrid Fallback (SMT channel). Values show mean ±\pm std over 5 random seeds (p<0.01p<0.01).
Time (s)
zkCraft
w/o Row-Vortex
w/o Violation IOP
w/o Sparse Sig.
w/o F-Field Syn.
w/o LLM Oracles
w/o Early Prune
w/o Hybrid FB
10.0
73.60 ±\pm 3.20
61.60 ±\pm 1.62
66.40 ±\pm 3.01
69.60 ±\pm 4.08
68.40 ±\pm 3.83
70.40 ±\pm 3.56
70.80 ±\pm 3.45
71.20 ±\pm 3.11
100.0
84.50 ±\pm 0.70
68.80 ±\pm 0.98
77.00 ±\pm 2.19
80.00 ±\pm 0.89
78.80 ±\pm 0.75
80.80 ±\pm 0.75
81.40 ±\pm 0.68
81.90 ±\pm 0.62
1000.0
86.30 ±\pm 0.45
74.80 ±\pm 2.48
82.20 ±\pm 0.75
82.00 ±\pm 0.63
80.60 ±\pm 0.49
82.60 ±\pm 0.49
83.00 ±\pm 0.55
83.50 ±\pm 0.52
7200.0
88.00 ±\pm 0.00
84.00 ±\pm 0.89
84.60 ±\pm 0.49
83.40 ±\pm 0.49
82.00 ±\pm 0.00
84.60 ±\pm 0.49
85.20 ±\pm 0.40
85.80 ±\pm 0.37
4.2 Detection effectiveness
Table 1 reports the number of unique bugs discovered by each tool, partitioned by circuit size. Each potential finding was manually triaged and labeled as true positive (TP) or false positive (FP); precision is computed as TP/(TP+FP)\text{TP}/(\text{TP}+\text{FP}). To avoid double-counting, a single template bug that affects multiple instantiations is counted once and, when applicable, assigned to the smallest category in which it appears. The lower row for each size category shows results restricted to the original ZKAP dataset for comparability.
Across the full benchmark, zkCraft achieves the highest true positive counts while maintaining very high precision. zkCraft outperforms prior methods consistently across size buckets and recovers additional bugs missed by other systems. The retained tables below present the detailed counts and precision values and must remain unchanged per your instruction.
4.3 Bug-Type Heat-map Across Circuit Sizes
Figure 11 collapses the full vulnerability matrix into a single heat-map where the xx-axis enumerates seven semantic fault classes and the yy-axis partitions circuits by constraint count.
Dark cells encode the number of distinct bugs that zkCraft uniquely triggers in each bin.
The upper-right quadrant remains densely shaded, indicating that even Very-Large circuits continue to suffer from high-impact Ownership-Forger and Crypto-Computation flaws.
This observation corroborates that the Row-Vortex selector successfully retains security-critical rows when the constraint system scales beyond 10410^{4} gates, a regime where earlier fuzzers encounter exponential path explosion.
Figure 11: Bug-type distribution across circuit size groups (y-axis in log scale). Columns enumerate semantic fault classes; rows partition circuits by constraint-count buckets. Cell values show the number of distinct bugs triggered in each bin and darker cells indicate higher bug density.
4.4 Proof-as-Counterexample Overhead
We quantify the concrete cost of emitting a proof that simultaneously serves as a counterexample.
Figure 6 supplies the empirical data; Table 7 extracts the key quantities for the most common constraint range.
All figures were collected on a single core of an Intel Xeon 2.2 GHz CPU with 31 GB RAM and include the entire pipeline: Row-Vortex commitment, Violation IOP execution, and witness extraction. The HyperPlonk+ commitment keeps the proof at 96 bytes regardless of circuit cardinality, while prover time grows sub-linearly as O⁡(|𝒞|0.7)O(|\mathcal{C}|^{0.7}).
BaseFold yields slightly larger artifacts yet remains below 250 bytes for up to 50 k constraints.
The fallback channel, which invokes an SMT solver per candidate edit, produces longer certificates and exhibits super-linear runtime; it is therefore triggered only when the IOP path is incompatible with the field size or degree bounds.
Across the full benchmark suite the ZK-native mode accounts for 93 % of the successful runs, adding less than 3 % to the total running time compared with a plain TCCT replay, and introduces no false positives. As explained in Subsection 6.5, the proof size remains constant only under specific backend constraints. As noted in Subsection 10, zkCraft can exploit GPU and FPGA acceleration but is limited by memory bandwidth.
Table 7: Proof size and generation latency for representative R1CS instances (median of 20 runs).
Constraint count
HyperPlonk+
BaseFold
Fallback SMT
Remark
|𝒞|=1 000|\mathcal{C}|\!=\!1\,000
96 B / 0.14 s
206 B / 0.28 s
808 B / 2.1 s
ZK-native preferred
|𝒞|=10 000|\mathcal{C}|\!=\!10\,000
96 B / 0.89 s
218 B / 1.7 s
1 280 B / 15 s
Proof length stable
|𝒞|=50 000|\mathcal{C}|\!=\!50\,000
96 B / 3.8 s
242 B / 7.2 s
2 240 B / 92 s
IOP dominates
4.5 Visualization
Figures 2–9 provide a comprehensive visual summary for evaluating and illustrating zkCraft. These figures cover detection latency, module ablation impact, hyperparameter sensitivity, comparative strategy analysis, the Row-Vortex commitment concept, proof-size scaling trends, and representative vulnerability snapshots. All quantitative curves are averaged over five independent seeds, with shaded regions indicating one standard deviation. Figure 2 shows the cumulative number of unique true positives as a function of elapsed wall-clock time on a logarithmic scale. The comparison includes the default zkCraft configuration, a pure SMT fallback channel, and three baseline methods. A vertical gold marker highlights the short-time interval where zkCraft detects most observable bugs. Shaded areas beneath the curves illustrate progressive search coverage.
Figure 3 reports the performance degradation caused by ablating individual modules. Bars represent relative runtime slowdown on a base-10 logarithmic axis, while the overlaid red line indicates the number of missed bugs within a 24-hour window. A horizontal threshold at 100×100\times slowdown emphasizes the components most critical for efficiency.
Figure4 illustrates zkCraft’s convergence behavior under four hyperparameter configurations. Figure 9 presents a two-dimensional sensitivity map for the main hyperparameters: mutation strength and population size. Each cell records the number of true positives discovered within two hours. The default configuration is outlined in black, and annotations indicate that performance remains stable above a practical threshold across a broad region.
Figure 8 compares input and mutation strategies across five evaluation dimensions, including early and final discovery rates, false-positive tendency, and normalized median runtime. Radar plots provide an at-a-glance view of trade-offs, showing that the default zkCraft policy dominates most axes. Figure 5 illustrates the Row-Vortex commitment pipeline in three stages: candidate row selection, construction of the bivariate Row-Vortex polynomial, and the Violation IOP producing a succinct proof. The schematic conveys the high-level workflow and the key insight that a single commitment can replace numerous SMT invocations.
Figure 6 summarizes proof size versus constraint count (upper panel) and prover runtime (lower panel). Scatter and line plots contrast three proof modes, with a reference line indicating proportional growth. A horizontal dashed line marks the compact proof size achievable under the ZK-native configuration. Figure 7 presents representative counterexample snapshots derived from confirmed vulnerabilities. Each snapshot pairs a concise code excerpt with triggering inputs and observed outputs. Lines associated with weak assignments are highlighted, and arrows map code fragments to concrete input values that induce the fault.
4.6 Detection speed
We compare cumulative unique detections over time to evaluate discovery latency. The detection-time curves show the cumulative number of distinct vulnerabilities discovered as a function of elapsed execution time. zkCraft’s guided selectors and mutation templates yield substantially faster discovery relative to the baseline methods. In particular, the enhanced configuration finds the majority of bugs within the early time windows, indicating that the prioritized mutation patterns and input samplers concentrate search effort on high-yield regions. Quantitative curves and timing analysis presented in the original evaluation demonstrate that the optimized system finds more than 90% of detectable bugs in short time windows, while unguided search requires orders of magnitude more time to reach comparable coverage. Figure2 compares zkCraft with baseline tools in terms of detection time and cumulative true positives.
4.7 Previously unknown bugs
On the full benchmark, zkCraft uncovers a substantial number of previously unknown vulnerabilities. Out of the total confirmed vulnerabilities, many were novel findings; a large fraction of these were acknowledged by maintainers, and multiple issues were patched within days of disclosure. Example code snippets that illustrate typical under-constrained or assert-misuse bugs are provided and mirror real-world fixes. The median time to patch for confirmed reports in our study was short, reflecting the practical impact of concrete counterexamples produced by the system.
4.8 Ablation study of selectors and heuristics
To quantify the contribution of individual selectors and heuristics, we perform ablations that disable one component at a time and measure the cumulative number of unique bugs found at multiple checkpoints. Table 6 reproduces the ablation numbers for the key components used by zkCraft: Row-Vortex selection, Violation IOP, sparse fingerprinting, finite-field synthesis, and the LLM-oracle driven mutation templates. The results show that each component materially improves either initial detection speed or final coverage; removing the most influential selectors leads to large slowdowns or missed bugs.
4.9 Hyperparameter sensitivity
We assess the impact of two primary hyperparameters: mutation strength and population size, under a fixed computational budget of 2 hours and 50,000 generations.
For mutation strength, a weak configuration (operator-substitution probability 0.1; RHS replacement 0.2) is compared with a strong configuration (0.3; 0.5).
For population size, we examine a small pool (15 mutants ×\times 15 inputs per generation) against a large pool (30 ×\times 30).
Each setting is evaluated using five independent random seeds.
Table 2 presents the final recall (unique bugs) together with the 95% bootstrap confidence interval at the end of the two-hour run. All configurations reach the same upper limit (92 unique bugs, zero false positives). Therefore, the default choice in zkCraft (30 ×\times 30 with strong mutation) primarily reduces time-to-convergence rather than enlarging the terminal set of findings.
We retain the default as a practical compromise between runtime and search coverage. Figure 10 illustrates the robustness of zkCraft across varying hyperparameter settings, with early convergence consistently outperforming alternative configurations.
4.10 Applicability to other DSLs
To evaluate language-agnosticism, we implement a prototype targeting Noir using an IR-based mutation strategy. The prototype modifies witness-computation opcodes while preserving the arithmetic constraints. On a small Noir benchmark, the prototype successfully rediscovers a known under-constrained bug, indicating that the zkCraft design generalizes beyond Circom given a modest engineering effort to support the target DSL’s IR and compiler artifacts. Details and limitations of the Noir prototype are discussed.
4.11 Additional Analysis and Discussion
We compare zkCraft with ZKFUZZ  [63] and ZKAP  [2] under an identical two-hour budget, hardware, and seeds. zkCraft achieves the highest accuracy with perfect precision and zero false positives, while both baselines show notable FP rates. Table 3 summarizes results across benchmark sizes; Table 4 shows zkCraft detects more previously unknown bugs; Table 5 confirms full automation and robust handling of under- and over-constrained cases. Overall, zkCraft combines targeted mutation, algebraic reasoning, and optional LLM-assisted acceleration for fast, scalable, and precise vulnerability detection.
5 Conclusion
We introduced zkCraft, a ZK native framework that integrates algebraic localization, succinct proof techniques, and deterministic LLM guided mutation templates to detect trace-constraint inconsistencies in zero-knowledge circuits. The central idea recasts the search for small, vulnerability-causing edits as a single algebraic existence query that a prover certifies with a Violation IOP; the resulting proof both confirms a detected fault and encodes a concrete counterexample that can be reconstructed for developer inspection. Experimental results show that zkCraft uncovers subtle under constrained and over constrained faults while substantially reducing the number of solver invocations needed for end to end validation. Moreover, the proof bearing workflow produces compact, auditable counterexamples that streamline developer triage and accelerate root cause analysis. Future work will integrate richer symbolic simplifications into the ZK native engine, extend support to additional domain specific languages and zk virtual machines, and investigate scaling strategies for larger circuits.
References
[1]
S. Pailoor, Y. Chen, F. Wang, C. Rodríguez, J. Van Geffen, J. Morton, M. Chu, B. Gu, Y. Feng, and I. Dillig (2023)
Automated detection of under-constrained circuits in zero-knowledge proofs.
Proceedings of the ACM on Programming Languages 7 (PLDI), pp. 1510–1532.
Cited by: §1,
§1,
Table 1,
Table 5,
§4.1.
[2]
H. Wen, J. Stephens, Y. Chen, K. Ferles, S. Pailoor, K. Charbonnet, I. Dillig, and Y. Feng (2024)
Practical security analysis of {\{zero-knowledge}\} proof circuits.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 1471–1487.
Cited by: §1,
§1,
§2.1,
§2.9,
Table 1,
Table 5,
§4.1,
§4.11.
[3]
S. Cuéllar Gempeler, B. Harris, J. Parker, S. Pernsteiner, I. Sweet, and E. Tromer (2025)
Cheesecloth: zero-knowledge proofs of real-world vulnerabilities.
ACM Transactions on Privacy and Security 28 (4), pp. 1–35.
Cited by: §1.
[4]
D. Xiao, Z. Liu, Y. Peng, and S. Wang (2025)
Mtzk: testing and exploring bugs in zero-knowledge (zk) compilers.
In NDSS,
Cited by: §1,
§1,
§2.1,
§2.6,
§2.9.
[5]
N. Ron-Zewi and M. Weiss (2024)
Zero-knowledge iops approaching witness length.
In Annual International Cryptology Conference,
pp. 105–137.
Cited by: §1,
§1.
[6]
D. Luick, J. C. Kolesar, T. Antonopoulos, W. R. Harris, J. Parker, R. Piskac, E. Tromer, X. Wang, and N. Luo (2024)
{\{zksmt}\}: A {\{vm}\} for proving {\{smt}\} theorems in zero knowledge.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 3837–3845.
Cited by: §1.
[7]
C. Chin, H. Wu, R. Chu, A. Coglio, E. McCarthy, and E. Smith (2021)
Leo: a programming language for formally verified, zero-knowledge applications.
Cryptology ePrint Archive.
Cited by: §1.
[8]
K. T. Vo, M. Ngo, T. Nguyen, T. Ta, M. N. Thi, H. Nguyen, and T. Nguyen-Hoang (2025)
ZCLS: a lifecycle strategy for efficient zk-rollup circuit optimization in circom.
IEEE Access 13, pp. 202840–202863.
Cited by: §1.
[9]
M. Stronati, D. Firsov, A. Locascio, and B. Livshits (2024)
Clap: a semantic-preserving optimizing edsl for plonkish proof systems.
arXiv preprint arXiv:2405.12115.
Cited by: §1.
[10]
H. Wei, J. Ke, R. Liu, and G. Li (2025)
ZK-prover: proving programming verification in non-interactive zero-knowledge proofs.
In International Conference on Formal Engineering Methods,
pp. 209–227.
Cited by: §1.
[11]
J. Stephens, S. Pailoor, and I. Dillig (2025)
Automated verification of consistency in zero-knowledge proof circuits.
In International Conference on Computer Aided Verification,
pp. 315–338.
Cited by: §1.
[12]
M. Isabel, C. Rodriguez-Nunez, and A. Rubio (2024)
Scalable verification of zero-knowledge protocols.
In 2024 IEEE Symposium on Security and Privacy (SP),
pp. 1794–1812.
Cited by: §1,
Table 5.
[13]
Z. Zhang, W. Li, Y. Guo, K. Shi, S. S. Chow, X. Liu, and J. Dong (2024)
Fast {\{rs-iop}\} multivariate polynomial commitments and verifiable secret sharing.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 3187–3204.
Cited by: §1.
[14]
Z. Zhang, W. Li, X. Liu, X. Chen, and Q. Peng (2023)
Ligerolight: optimized iop-based zero-knowledge argument for blockchain scalability.
IEEE Transactions on Dependable and Secure Computing 21 (4), pp. 3656–3670.
Cited by: §1.
[15]
R. Meng, M. Mirchev, M. Böhme, and A. Roychoudhury (2024)
Large language model guided protocol fuzzing.
In Proceedings of the 31st Annual Network and Distributed System Security Symposium (NDSS),
Vol. 2024.
Cited by: §1.
[16]
C. Zhang, Y. Zheng, M. Bai, Y. Li, W. Ma, X. Xie, Y. Li, L. Sun, and Y. Liu (2024)
How effective are they? exploring large language model based fuzz driver generation.
In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 1223–1235.
Cited by: §1,
§1.
[17]
M. Lu, S. Ding, F. Alaca, and P. Charland (2025)
Semantic-aware fuzzing: an empirical framework for llm-guided, reasoning-driven input mutation.
arXiv preprint arXiv:2509.19533.
Cited by: §1.
[18]
Q. Zhang, C. Fang, S. Gu, Y. Shang, Z. Chen, and L. Xiao (2025)
Large language models for unit testing: a systematic literature review.
arXiv preprint arXiv:2506.15227.
Cited by: §1.
[19]
M. Ashkenazi, O. Brenner, T. F. Shohet, and E. Treister (2025)
Zero-shot detection of llm-generated code via approximated task conditioning.
In Joint European Conference on Machine Learning and Knowledge Discovery in Databases,
pp. 187–204.
Cited by: §1.
[20]
Z. Li and D. Shin (2024)
Mutation-based consistency testing for evaluating the code understanding capability of llms.
In Proceedings of the IEEE/ACM 3rd International Conference on AI Engineering-Software Engineering for AI,
pp. 150–159.
Cited by: §1,
§1.
[21]
H. Sun, J. Li, and H. Zhang (2024)
Zkllm: zero knowledge proofs for large language models.
In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security,
pp. 4405–4419.
Cited by: §1.
[22]
T. Gassmann, S. Chaliasos, T. Sotiropoulos, and Z. Su (2025)
Evaluating compiler optimization impacts on zkvm performance.
arXiv preprint arXiv:2508.17518.
Cited by: §1.
[23]
P. Xu, Y. Sui, and M. Staples (2025)
Towards source mapping for zero-knowledge smart contracts: design and preliminary evaluation.
In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 200–209.
Cited by: §1.
[24]
Z. Zou, Z. Liu, L. Zhao, and Q. Zhan (2025)
Blocka2a: towards secure and verifiable agent-to-agent interoperability.
arXiv preprint arXiv:2508.01332.
Cited by: §1.
[25]
T. Xie, T. Lu, Z. Fang, S. Wang, Z. Zhang, Y. Jia, D. Song, and J. Zhang (2025)
ZkPyTorch: a hierarchical optimized compiler for zero-knowledge machine learning.
Cryptology ePrint Archive.
Cited by: §1.
[26]
Z. Li, X. Peng, Z. He, X. Luo, and T. Chen (2024)
FAmulet: finding finalization failure bugs in polygon zkrollup.
In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security,
pp. 971–985.
Cited by: §2.1,
§2.2,
§2.9.
[27]
C. Hochrainer, A. Isychev, V. Wüstholz, and M. Christakis (2025)
Fuzzing processing pipelines for zero-knowledge circuits.
In Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security,
pp. 783–797.
Cited by: §2.1,
§2.2,
§2.9.
[28]
S. Chaliasos, I. Al-Fath, and A. Donaldson (2025)
Towards fuzzing zero-knowledge proof circuits (short paper).
In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 98–104.
Cited by: §2.1,
§2.2.
[29]
X. Peng, Z. Sun, K. Zhao, Z. Ma, Z. Li, J. Jiang, X. Luo, and Y. Zhang (2025)
Automated soundness and completeness vetting of polygon {\{zkevm}\}.
In 34th USENIX Security Symposium (USENIX Security 25),
pp. 4093–4108.
Cited by: §2.2.
[30]
C. Hochrainer, V. Wüstholz, and M. Christakis (2025)
Arguzz: testing zkvms for soundness and completeness bugs.
arXiv preprint arXiv:2509.10819.
Cited by: §2.2.
[31]
J. Ernstberger, S. Chaliasos, G. Kadianakis, S. Steinhorst, P. Jovanovic, A. Gervais, B. Livshits, and M. Orrù (2024)
Zk-bench: a toolset for comparative evaluation and performance benchmarking of snarks.
In International Conference on Security and Cryptography for Networks,
pp. 46–72.
Cited by: §2.2,
§2.5.
[32]
J. Jiang, X. Peng, J. Chu, and X. Luo (2025)
ConsCS: effective and efficient verification of circom circuits.
In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE),
pp. 737–737.
Cited by: §2.2,
§2.6,
§2.9,
Table 1,
Table 5,
§4.1.
[33]
C. Yang, Y. Deng, R. Lu, J. Yao, J. Liu, R. Jabbarvand, and L. Zhang (2024)
Whitefox: white-box compiler fuzzing empowered by large language models.
Proceedings of the ACM on Programming Languages 8 (OOPSLA2), pp. 709–735.
Cited by: §2.3,
§2.6,
§2.9.
[34]
S. Luo, H. Xu, Y. Bi, X. Wang, and Y. Zhou (2021)
Boosting symbolic execution via constraint solving time prediction (experience paper).
In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 336–347.
Cited by: §2.3,
§2.4.
[35]
Z. Chen, Z. Chen, Z. Shuai, G. Zhang, W. Pan, Y. Zhang, and J. Wang (2021)
Synthesize solving strategy for symbolic execution.
In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 348–360.
Cited by: §2.3,
§2.4.
[36]
M. Hassan, S. Ahmadi-Pour, K. Qayyum, C. K. Jha, and R. Drechsler (2024)
Llm-guided formal verification coupled with mutation testing.
In 2024 Design, Automation & Test in Europe Conference & Exhibition (DATE),
pp. 1–2.
Cited by: §2.3,
§2.8,
§2.9.
[37]
M. Harman, J. Ritchey, I. Harper, S. Sengupta, K. Mao, A. Gulati, C. Foster, and H. Robert (2025)
Mutation-guided llm-based test generation at meta.
In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering,
pp. 180–191.
Cited by: §2.3,
§2.8,
§2.9.
[38]
P. Straubinger, M. Kreis, S. Lukasczyk, and G. Fraser (2025)
Mutation testing via iterative large language model-driven scientific debugging.
In 2025 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW),
pp. 358–367.
Cited by: §2.3,
§2.8,
§2.9.
[39]
Z. Xue, P. Ma, Z. Wang, and S. Wang (2025)
From evaluation to enhancement: large language models for zero-knowledge proof code generation.
arXiv preprint arXiv:2509.11708.
Cited by: §2.3,
§2.8.
[40]
Y. Li, R. Meng, and G. J. Duck (2025)
Large language model powered symbolic execution.
Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 3148–3176.
Cited by: §2.3,
§2.9.
[41]
D. Trabish and S. Itzhaky (2026)
Enhancing symbolic execution with machine-checked safety proofs.
In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs,
pp. 294–308.
Cited by: §2.4.
[42]
B. Bailey and A. Miller (2024)
Formalizing soundness proofs of linear {\{pcp}\}{\{snarks}\}.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 1489–1506.
Cited by: §2.4.
[43]
J. B. Almeida, M. Barbosa, M. L. Correia, K. Eldefrawy, S. Graham-Lengrand, H. Pacheco, and V. Pereira (2021)
Machine-checked zkp for np relations: formally verified security proofs and implementations of mpc-in-the-head.
In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security,
pp. 2587–2600.
Cited by: §2.4.
[44]
D. Mouris and N. G. Tsoutsos (2021)
Zilch: a framework for deploying transparent zero-knowledge proofs.
IEEE Transactions on Information Forensics and Security 16, pp. 3269–3284.
Cited by: §2.5,
§2.9.
[45]
M. Bellés-Muñoz, M. Isabel, J. L. Muñoz-Tapia, A. Rubio, and J. Baylina (2022)
Circom: a circuit description language for building zero-knowledge applications.
IEEE Transactions on Dependable and Secure Computing 20 (6), pp. 4733–4751.
Cited by: §2.5,
§2.6.
[46]
S. Angel, A. J. Blumberg, E. Ioannidis, and J. Woods (2022)
Efficient representation of numerical optimization problems for {\{snarks}\}.
In 31st USENIX Security Symposium (USENIX Security 22),
pp. 4273–4290.
Cited by: §2.5,
§2.9.
[47]
W. Ma, Q. Xiong, X. Shi, X. Ma, H. Jin, H. Kuang, M. Gao, Y. Zhang, H. Shen, and W. Hu (2023)
Gzkp: a gpu accelerated zero-knowledge proof system.
In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2,
pp. 340–353.
Cited by: §2.5,
§2.9.
[48]
S. A. Butt, B. Reynolds, V. Ramamurthy, X. Xiao, P. Chu, S. Sharifian, S. Gribok, and B. Pasca (2024)
If-zkp: intel fpga-based acceleration of zero knowledge proofs.
arXiv preprint arXiv:2412.12481.
Cited by: §2.5.
[49]
N. Samardzic, S. Langowski, S. Devadas, and D. Sanchez (2024)
Accelerating zero-knowledge proofs through hardware-algorithm co-design.
In 2024 57th IEEE/ACM International Symposium on Microarchitecture (MICRO),
pp. 366–379.
Cited by: §2.5.
[50]
J. Liu, J. Song, Y. Chen, H. Liu, H. Wen, L. Pearson, Y. Chen, and Y. Feng (2025)
Tabby: a synthesis-aided compiler for high-performance zero-knowledge proof circuits.
Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 1671–1697.
Cited by: §2.5,
§2.9.
[51]
A. Ozdemir, F. Brown, and R. S. Wahby (2022)
CirC: compiler infrastructure for proof systems, software verification, and more.
In 2022 IEEE Symposium on Security and Privacy (SP),
pp. 2248–2266.
Cited by: §2.6.
[52]
J. Liu, I. Kretz, H. Liu, B. Tan, J. Wang, Y. Sun, L. Pearson, A. Miltner, I. Dillig, and Y. Feng (2024)
Certifying zero-knowledge circuits with refinement types.
In 2024 IEEE Symposium on Security and Privacy (SP),
pp. 1741–1759.
Cited by: §2.6,
Table 5.
[53]
Z. Xing, Z. Zhang, Z. Zhang, Z. Li, M. Li, J. Liu, Z. Zhang, Y. Zhao, Q. Sun, L. Zhu, et al. (2025)
Zero-knowledge proof-based verifiable decentralized machine learning in communication network: a comprehensive survey.
IEEE Communications Surveys & Tutorials.
Cited by: §2.7.
[54]
J. A. Berrios Moya, J. Ayoade, and M. A. Uddin (2025)
A zero-knowledge proof-enabled blockchain-based academic record verification system.
Sensors 25 (11), pp. 3450.
Cited by: §2.7.
[55]
S. Gangurde, A. Jadhav, V. Gatkal, and M. More (2025)
Zk-gene: a zero-knowledge proof framework for secure genetic marker verification.
In 2025 Global Conference in Emerging Technology (GINOTECH),
pp. 1–5.
Cited by: §2.7.
[56]
R. Lavin, X. Liu, H. Mohanty, L. Norman, G. Zaarour, and B. Krishnamachari (2024)
A survey on the applications of zero-knowledge proofs.
arXiv preprint arXiv:2408.00243.
Cited by: §2.7.
[57]
J. Liang, D. Hu, P. Wu, Y. Yang, Q. Shen, and Z. Wu (2025)
SoK: understanding zk-snarks: the gap between research and practice.
arXiv preprint arXiv:2502.02387.
Cited by: §2.7.
[58]
A. Salam, M. Abrar, F. Amin, F. Ullah, I. A. Khan, B. F. Alkhamees, and H. AlSalman (2024)
Securing smart manufacturing by integrating anomaly detection with zero-knowledge proofs.
IEEE Access 12, pp. 36346–36360.
Cited by: §2.7.
[59]
S. Park, H. Kang, S. Han, J. M. Youn, and D. Kwon (2024)
MECAT: memory-safe smart contracts in arm trustzone.
IEEE Access 12, pp. 56110–56119.
Cited by: §2.7.
[60]
H. Akgul, M. Eplik, J. Rojas, A. B. Abdullah, and P. van der Merwe (2025)
ZK-senselm: verifiable large-model wireless sensing with selective abstention and zero-knowledge attestation.
arXiv preprint arXiv:2510.25677.
Cited by: §2.7.
[61]
S. G. Gil, L. L. Díaz, and J. I. R. Jarabo (2024)
QCRMut: quantum circuit random mutant generator tool.
arXiv preprint arXiv:2410.01415.
Cited by: §2.8.
[62]
M. Osama, D. Thanos, and A. Laarman (2025)
Parallel equivalence checking of stabilizer quantum circuits on gpus.
In International Conference on Tools and Algorithms for the Construction and Analysis of Systems,
pp. 109–128.
Cited by: §2.8.
[63]
H. Takahashi, J. Kim, S. Jana, and J. Yang (2025)
ZkFuzz: foundation and framework for effective fuzzing of zero-knowledge circuits.
arXiv preprint arXiv:2504.11961.
Cited by: §2.9,
Table 1,
Table 1,
Table 4,
Table 5,
Table 5,
§3,
§4.1,
§4.11.
[64]
M. Blum, P. Feldman, and S. Micali (2019)
Non-interactive zero-knowledge and its applications.
In Providing sound foundations for cryptography: on the work of Shafi Goldwasser and Silvio Micali,
pp. 329–349.
Cited by: Table 1,
Table 5,
§4.1.
[65]
Y. Fan, Y. Xu, and C. Garman (2024)
Snarkprobe: an automated security analysis framework for zksnark implementations.
In International Conference on Applied Cryptography and Network Security,
pp. 340–372.
Cited by: Table 5.
[66]
H. Chen, G. Li, M. Chen, R. Liu, and S. Gao (2024)
Ac4: algebraic computation checker for circuit constraints in zkps.
arXiv preprint arXiv:2403.15676.
Cited by: Table 5.
6 Theoretical Additions
6.1 Binding property and block-Vandermonde construction
We formalize the linear mapping that relates the Row-Vortex coefficient vector to the pair (δ,c)(\delta,c) and state the invertibility conditions that underpin the commitment binding argument.
The Row-Vortex polynomial is written as
R⁡(X,Y)=∑i∈ℛδi⋅rowi​(X)+∑i∈ℛci⋅seli​(Y),R(X,Y)\;=\;\sum_{i\in\mathcal{R}}\delta_{i}\cdot\mathrm{row}_{i}(X)\;+\;\sum_{i\in\mathcal{R}}c_{i}\cdot\mathrm{sel}_{i}(Y),
(28)
where ℛ\mathcal{R} is the candidate index set with k=|ℛ|k=|\mathcal{R}|.
Here rowi​(X)\mathrm{row}_{i}(X) and seli​(Y)\mathrm{sel}_{i}(Y) are univariate polynomials used to encode row and selector information respectively, and δi∈{0,1}\delta_{i}\in\{0,1\}, ci∈𝔽qc_{i}\in\mathbb{F}_{q} are the selection and substitution parameters.
Order the coefficient vector of R⁡(X,Y)R(X,Y) by concatenating the coefficient vectors of the row-blocks and selector-blocks to obtain ρ→∈𝔽q2​k\vec{\rho}\in\mathbb{F}_{q}^{2k}. The affine relation between ρ→\vec{\rho} and the parameter pair (δ,c)(\delta,c) is
ρ→=M​[δc]+t→,\vec{\rho}\;=\;M\begin{bmatrix}\delta\\[2.0pt]
c\end{bmatrix}\;+\;\vec{t},
(29)
where M∈𝔽q2​k×2​kM\in\mathbb{F}_{q}^{2k\times 2k} is the block-diagonal matrix
M=[Vrow𝟎𝟎Vsel],M\;=\;\begin{bmatrix}V_{\mathrm{row}}&\mathbf{0}\\[4.0pt]
\mathbf{0}&V_{\mathrm{sel}}\end{bmatrix},
(30)
and t→\vec{t} collects constant terms independent of (δ,c)(\delta,c).
In Eq. (30), VrowV_{\mathrm{row}} and VselV_{\mathrm{sel}} are k×kk\times k Vandermonde matrices defined on two disjoint sets of evaluation points {αi}i=1k\{\alpha_{i}\}_{i=1}^{k} and {βi}i=1k\{\beta_{i}\}_{i=1}^{k}, respectively, with entries of the form (Vrow)j,i=αij−1(V_{\mathrm{row}})_{j,i}=\alpha_{i}^{j-1} and (Vsel)j,i=βij−1(V_{\mathrm{sel}})_{j,i}=\beta_{i}^{\,j-1}.
where αi,βi∈𝔽q\alpha_{i},\beta_{i}\in\mathbb{F}_{q} are the nodes used for coefficient representation of rowi\mathrm{row}_{i} and seli\mathrm{sel}_{i}, and t→\vec{t} denotes any fixed offset arising from constant polynomial terms.
The determinant factorizes as the product of the two Vandermonde determinants:
det(M)=det(Vrow)⋅det(Vsel)=∏1≤i<j≤k(αj−αi)⋅∏1≤i<j≤k(βj−βi).\det(M)\;=\;\det(V_{\mathrm{row}})\cdot\det(V_{\mathrm{sel}})\;=\;\prod_{1\leq i<j\leq k}(\alpha_{j}-\alpha_{i})\;\cdot\;\prod_{1\leq i<j\leq k}(\beta_{j}-\beta_{i}).
(31)
where the two products vanish exactly when either {αi}\{\alpha_{i}\} or {βi}\{\beta_{i}\} contains repeated elements; hence nonzero determinant is equivalent to pairwise distinct nodes within each block.
A sufficient practical condition to guarantee the existence of two disjoint kk-tuples of distinct nodes is
|𝔽q|> 2​k.|\mathbb{F}_{q}|\;>\;2k.
(32)
where |𝔽q||\mathbb{F}_{q}| denotes the field cardinality; Eq. (63) ensures one can choose {αi}\{\alpha_{i}\} and {βi}\{\beta_{i}\} as disjoint sets of kk distinct field elements. The invertibility of MM follows from Eq. (31) under the distinctness assumption.
Theorem 6.1 (Binding reduction for Row-Vortex commitment).
Let 𝖯𝖢\mathsf{PC} be a polynomial commitment scheme that is computationally binding on coefficient vectors. Suppose the evaluator uses the block-Vandermonde map MM of Eqs. (30)–(31) with pairwise distinct nodes and with field size satisfying Eq. (63). If an adversary produces two openings (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}) that both verify against the same public commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R), then 𝖯𝖢\mathsf{PC} ’s binding property is violated.
Proof.
Let ρ→\vec{\rho} and ρ→′\vec{\rho}^{\prime} denote the coefficient vectors computed from (δ,c)(\delta,c) and (δ′,c′)(\delta^{\prime},c^{\prime}) via Eq. (29). Subtracting the two relations yields
ρ→−ρ→′=M​[δ−δ′c−c′].\vec{\rho}-\vec{\rho}^{\prime}\;=\;M\begin{bmatrix}\delta-\delta^{\prime}\\[2.0pt]
c-c^{\prime}\end{bmatrix}.
(33)
Because MM is invertible under the distinct-nodes condition, Eq. (33) implies ρ→≠ρ→′\vec{\rho}\neq\vec{\rho}^{\prime} whenever (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}).
where invertibility of MM guarantees injectivity of the affine mapping from (δ,c)(\delta,c) to ρ→\vec{\rho}. Therefore the same public commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) cannot correctly open to two different coefficient vectors unless the commitment scheme 𝖯𝖢\mathsf{PC} itself is not binding. This reduction shows that any adversary that finds two distinct valid openings yields a breaker for 𝖯𝖢\mathsf{PC}, contradicting its assumed binding security.
∎
Practical parameters
Selecting |𝔽q|>2​k|\mathbb{F}_{q}|>2k and ensuring that node sets {αi}\{\alpha_{i}\}, {βi}\{\beta_{i}\} consist of pairwise distinct elements suffices for invertibility of MM in realistic parameter regimes. For example, with a candidate pool size k≤32k\leq 32 the condition |𝔽q|>64|\mathbb{F}_{q}|>64 is easily met by standard prime fields used in practice (e.g., q=2255−19q=2^{255}-19).
where the numerical example illustrates that typical cryptographic fields comfortably satisfy Eq. (63).
6.2 Knowledge Soundness of the Violation IOP
Public-coin three-round Sum-Check (detailed). The protocol takes the public input 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) together with the claimed public output vector y∈𝔽qmouty\in\mathbb{F}_{q}^{m_{\mathrm{out}}}. The interaction proceeds as follows.
Round 1 (Sum-Check). The prover transmits a collection of univariate polynomials
g1​(X),g2​(X),…,gt​(X),g_{1}(X),\,g_{2}(X),\,\dots,\,g_{t}(X),
(34)
where t=log⁡|D|t=\log|D| and each polynomial has degree at most
d= 2​n+k−1.d\;=\;2n+k-1.
(35)
where nn denotes the witness dimension and k=|ℛ|k=|\mathcal{R}| denotes the number of candidate rows encoded in the Row-Vortex polynomial.
Round 2 (Challenge). The verifier samples a challenge
ζ​←$​𝔽q,\zeta\;\overset{\$}{\leftarrow}\;\mathbb{F}_{q},
(36)
where 𝔽q\mathbb{F}_{q} is the finite field of size |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} (and λ\lambda the security parameter).
Round 3 (Openings). The prover opens the evaluated objects at the sampled challenge:
R⁡(ζ,Y),ΦR​(ζ),Δout​(ζ).R(\zeta,Y),\qquad\Phi_{R}(\zeta),\qquad\Delta_{\mathrm{out}}(\zeta).
(37)
where R⁡(ζ,Y)R(\zeta,Y) is the Row-Vortex bivariate evaluation at ζ\zeta; ΦR\Phi_{R} is the verifier’s residual polynomial of degree at most dd; and Δout​(X)\Delta_{\mathrm{out}}(X) is the output-difference polynomial defined by
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X).\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}(y^{\prime}_{j}-y_{j})\,L_{j}(X).
(38)
where Lj​(X)L_{j}(X) denotes the jj-th Lagrange basis polynomial over the chosen evaluation domain and mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates.
The verifier accepts if and only if Δout​(ζ)≠0\Delta_{\mathrm{out}}(\zeta)\neq 0 and all openings verify under the commitment scheme.
Theorem 6.2 (Explicit knowledge-error bound).
Let λ\lambda be the security parameter and let |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} denote the field size. Let dd be the residual polynomial degree (Eq. (35)), let moutm_{\mathrm{out}} be the output length, and let ℓ\ell denote the number of independent opening points used in the extractor (for example ℓ=O⁡(log⁡m)\ell=O(\log m) when multi-point openings are deployed). Then the three-round public-coin Sum-Check IOP is knowledge-sound with knowledge error δ\delta satisfying the conservative explicit bound
δ≤mout−1+ℓ​d|𝔽q|.\delta\;\leq\;\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}.
(39)
where moutm_{\mathrm{out}} counts the nontrivial coefficients of Δout\Delta_{\mathrm{out}}, dd bounds the degree of residual polynomials opened by the prover, and ℓ\ell counts independent openings or challenge points.
In many implementations the ℓ\ell opening challenges are chosen independently and the extractor requires the adversary to cause all ℓ\ell checks to pass simultaneously. In this independent-challenge regime the single-point failure probability multiplies across openings, yielding exponential suppression of the knowledge error:
δ≤(mout−1+d|𝔽q|)ℓ.\delta\;\leq\;\left(\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|}\right)^{\!\ell}.
(40)
where the base mout−1+d|𝔽q|\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|} is the per-point failure probability (degree divided by field size) and the exponent ℓ\ell measures independent repetitions. Thus, multi-point independent challenges produce an exponential decay in the knowledge error as ℓ\ell grows.
Extractor description and complexity.
We give a concise,
implementation-oriented description of the extractor (the reader can regard this text as the replacement for the detailed pseudocode). After accepting an IOP transcript the extractor first collects the opened evaluations {R⁡(ζi,Y),ΦR​(ζi),Δout​(ζi)}i=1ℓ\{R(\zeta_{i},Y),\Phi_{R}(\zeta_{i}),\Delta_{\mathrm{out}}(\zeta_{i})\}_{i=1}^{\ell} together with their evaluation proofs. From these openings the extractor aggregates a compact encoding ρ\rho and applies the inverse affine mapping M−1M^{-1} associated with the commitment encoding to recover the sparse selection vector (δ,c)(\delta,c). If the transcript already includes a low-degree witness polynomial W′​(X)W^{\prime}(X), the extractor interpolates W′​(X)W^{\prime}(X) to obtain the witness vector w′w^{\prime}. Otherwise the extractor assembles the algebraic reconstruction system
Fδ,c​(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0,
(41)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the edited R1CS residuals after substituting (δ,c)(\delta,c). The extractor then solves Eq. (41) by linear algebra to recover w′w^{\prime}. Finally, substituting the computed constants into the identified weak-assignment sites yields the mutated program P′P^{\prime} and the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); replaying P′​(x′)P^{\prime}(x^{\prime}) is optional for verification because the proof already certifies acceptance.
The principal computational costs are summarized by the following expressions. Recovering (δ,c)(\delta,c) from the aggregated encoding via sparse reconstruction or inversion of the affine map runs in time
Tselect=O⁡(k​log⁡k),T_{\mathrm{select}}\;=\;O(k\log k),
(42)
where k=|ℛ|k=|\mathcal{R}| is the number of candidate rows and the cost assumes sparse recovery primitives or hashing-based aggregation. If a low-degree witness polynomial W′​(X)W^{\prime}(X) is present interpolation recovers w′w^{\prime} in
Tinterp=O⁡(n​log⁡n),T_{\mathrm{interp}}\;=\;O(n\log n),
(43)
where nn is the witness dimension and the bound assumes FFT-style interpolation over a suitable domain. If interpolation is not available solving Eq. (41) by direct linear algebra costs
Tsolve=O⁡(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}),
(44)
where ω∈[2,3]\omega\in[2,3] denotes the matrix-multiplication exponent; in practice dense Gaussian elimination yields O⁡(n3)O(n^{3}) field operations while sparse solvers typically achieve substantially smaller constants. Combining these contributions and adding the constant verifier pairing/open checks gives the practical bound
Textract=O~​(n+k),T_{\mathrm{extract}}\;=\;\widetilde{O}(n+k),
(45)
where O~​(⋅)\widetilde{O}(\cdot) hides polylogarithmic factors and the dominant term depends on whether W′​(X)W^{\prime}(X) is present in the transcript.
Error analysis sketch.
The extractor uses a forking strategy on the verifier challenge(s) to obtain multiple accepting transcripts at distinct challenge points ζ1,…,ζℓ\zeta_{1},\dots,\zeta_{\ell}. Interpolating the values of Δout\Delta_{\mathrm{out}} at these points yields the coefficient vector (y′−y)(y^{\prime}-y) unless Δout\Delta_{\mathrm{out}} vanishes at all sampled points. By the Schwartz–Zippel lemma the probability that a non-zero polynomial of total degree DD vanishes at a single uniformly random point is at most D/|𝔽q|D/|\mathbb{F}_{q}|. Applying this observation to the output polynomial and to each opened residual and then taking a union bound produces the linear bound in Eq. (39). If the ℓ\ell challenges are independent and the adversary must succeed at all openings simultaneously, the failure probability multiplies and yields the exponential bound in Eq. (40). Practical parameter selection thus chooses |𝔽q||\mathbb{F}_{q}| and ℓ\ell so that the exponentiated bound meets the desired security parameter λ\lambda.
Summary.
When the underlying commitment scheme permits appending a low-degree witness polynomial W′​(X)W^{\prime}(X) to the oracles (as is possible with opening-friendly schemes), prefer including W′​(X)W^{\prime}(X) in the transcript: this reduces extraction cost to O⁡(n​log⁡n)O(n\log n) and makes replaying P′​(x′)P^{\prime}(x^{\prime}) optional for correctness while still preserving strong knowledge guarantees.
6.3 Error bounds and complexity
This appendix states rigorous probabilistic bounds that govern extractor failure for the three-round public-coin Sum-Check IOP used in zkCraft, and it provides concrete asymptotic cost estimates for the principal IOP operations.
Lemma 6.3 (Indicator polynomial non-vanishing).
Let
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X),\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X),
(46)
where y′y^{\prime} is the extracted public-output vector, yy is the claimed public-output vector, and Lj​(X)L_{j}(X) denotes the Lagrange basis polynomial associated with the distinct evaluation point uju_{j} for j=0,…,mout−1j=0,\dots,m_{\mathrm{out}}-1. If y′≠yy^{\prime}\neq y then
Prζ​←$​𝔽q[Δout(ζ)=0]≤mout−1|𝔽q|,\Pr_{\zeta\overset{\$}{\leftarrow}\mathbb{F}_{q}}\bigl[\Delta_{\mathrm{out}}(\zeta)=0\bigr]\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|},
(47)
where mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates and deg⁡(Δout)≤mout−1\deg\!\bigl(\Delta_{\mathrm{out}}\bigr)\leq m_{\mathrm{out}}-1.
Proof.
From definition (46) the polynomial Δout​(X)\Delta_{\mathrm{out}}(X) is nonzero whenever y′≠yy^{\prime}\neq y. Its degree is bounded by mout−1m_{\mathrm{out}}-1 because the Lagrange basis polynomials Lj​(X)L_{j}(X) have degree at most mout−1m_{\mathrm{out}}-1. The Schwartz–Zippel lemma asserts that a nonzero polynomial of degree at most rr over 𝔽q\mathbb{F}_{q} evaluates to zero at a uniformly random point with probability at most r/|𝔽q|r/|\mathbb{F}_{q}|. Applying this lemma with r≤mout−1r\leq m_{\mathrm{out}}-1 yields inequality (47).
∎
Let ΦR\Phi_{R} denote the verifier’s aggregated residual polynomial and let dd be an explicit upper bound on its degree:
deg⁡(ΦR)≤d,\deg(\Phi_{R})\leq d,
(48)
where, in our encoding, a conservative choice is d=2​n+k−1d=2n+k-1 with nn the witness dimension and k=|ℛ|k=|\mathcal{R}| the candidate-pool size. Assume the extractor obtains ℓ\ell independent openings of residual-related polynomials by obtaining accepting transcripts at ℓ\ell distinct challenge points.
Theorem 6.4 (Knowledge-error explicit bound).
Under the above assumptions the extractor’s failure probability (knowledge error) δ\delta satisfies
δ≤mout−1+ℓ​d|𝔽q|.\delta\leq\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}.
(49)
Here the additive term mout−1|𝔽q|\tfrac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|} bounds the probability that the output-difference polynomial vanishes at a random challenge (Lemma 6.3) and the term ℓ⋅d|𝔽q|\ell\cdot\tfrac{d}{|\mathbb{F}_{q}|} upper-bounds the aggregate probability that one of the ℓ\ell opened residual polynomials (each of degree ≤d\leq d) passes the verifier checks by coincidence.
Proof.
Successful extraction requires two conditions simultaneously: the accepted transcripts must demonstrate a nonzero public-output difference and the opened residual-related polynomials must be consistent with the claimed encodings. Failure of extraction therefore arises only if at least one of the following events occurs at the sampled challenge point: the output-indicator polynomial evaluates to zero, or an opened residual polynomial of degree at most dd collides with the verifier’s consistency predicates by chance.
By Lemma 6.3 the probability that Δout\Delta_{\mathrm{out}} vanishes at a uniformly sampled field element is at most (mout−1)/|𝔽q|(m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|. For any fixed residual-related polynomial of degree at most dd, the Schwartz–Zippel lemma gives a single-point collision probability at most d/|𝔽q|d/|\mathbb{F}_{q}|. Since the extractor obtains ℓ\ell independent openings, a union bound over these ℓ\ell events yields at most ℓ​d/|𝔽q|\ell\,d/|\mathbb{F}_{q}| probability for a residual-related coincidence. A further union bound combining the output-indicator failure and the residual-opening failures yields
δ≤mout−1|𝔽q|+ℓ​d|𝔽q|,\delta\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}+\frac{\ell\,d}{|\mathbb{F}_{q}|},
(50)
establishing (49).
∎
If the extractor repeats the Δout\Delta_{\mathrm{out}} test at tt independently sampled challenge points, then the probability that a nonzero polynomial vanishes at all tt points is at most ((mout−1)/|𝔽q|)t\bigl((m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|\bigr)^{t}. Consequently the knowledge error satisfies
δ≤(mout−1|𝔽q|)t+ℓ⋅d|𝔽q|,\delta\leq\left(\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}\right)^{\!t}+\ell\cdot\frac{d}{|\mathbb{F}_{q}|},
(51)
where tt is the number of independent checks applied to Δout\Delta_{\mathrm{out}}. More generally, if each of the ℓ\ell residual openings is independently repeated trest_{\mathrm{res}} times then the residual-term in (49) is replaced by ℓ⋅(d/|𝔽q|)tres\ell\cdot\bigl(d/|\mathbb{F}_{q}|\bigr)^{t_{\mathrm{res}}}.
Parameter selection should ensure that δ\delta meets a chosen security target 2−λ2^{-\lambda}. For typical cryptographic fields (for example q≈2255q\approx 2^{255}) small repetition counts render the polynomial-vanishing term negligible for practical moutm_{\mathrm{out}}, while modest residual repetitions suffice to suppress collision risk below cryptographic thresholds.
Proposition 6.5 (Practical IOP cost).
Let kk be the
candidate-pool size, mm the number of constraints, nn the witness dimension, and dd the residual-degree bound (for example d=2​n+k−1d=2n+k-1). Let |D|=2⌈log2⁡m⌉|D|=2^{\lceil\log_{2}m\rceil} denote the Sum-Check domain size chosen as the next power-of-two above mm. Using an opening-friendly commitment scheme (for example HyperPlonk+ or BaseFold) and a performance-oriented implementation, a non-amortized IOP instance satisfies the following asymptotic cost estimates:
Prover time\displaystyle\text{Prover time}
=O(kdlog|D|)field multiplications,\displaystyle=O\bigl(k\,d\,\log|D|\bigr)\quad\text{field multiplications},
(52)
Verifier time\displaystyle\text{Verifier time}
=O(d)field multiplications\displaystyle=O(d)\quad\text{field multiplications}
+O⁡(1)pairings,\displaystyle+\;O(1)\quad\text{pairings},
Proof size\displaystyle\text{Proof size}
=O(1)(commitment)\displaystyle=O(1)\quad\text{(commitment)}
+O⁡(λ⁡(d+1))(opening proofs in bits).\displaystyle+\;O\bigl(\lambda(d+1)\bigr)\quad\text{(opening proofs in bits)}.
where λ\lambda is the security parameter (bit-length associated with the field/commitment) and the constants hidden by O⁡(⋅)O(\cdot) depend on low-level choices such as FFT model and field representation.
Proof.
The prover’s principal computational burden is dominated by materializing and evaluating the Row-Vortex-derived encodings across the Sum-Check domain and by constructing the Sum-Check auxiliary polynomials and openings. Evaluating degree-dd polynomials on a domain of size |D||D| can be executed in O⁡(d​log⁡|D|)O(d\log|D|) field operations using FFT/NTT techniques when the domain supports such transforms. Aggregation across kk candidate contributions yields the factor kk, hence the O⁡(k​d​log⁡|D|)O(k\,d\,\log|D|) bound for prover field multiplications.
Opening-friendly commitment schemes allow attaching low-degree witness polynomials and producing succinct evaluation proofs whose bit-length scales with the security parameter λ\lambda and the number of opened coefficients (on the order of d+1d+1). Therefore the proof-size model in (52) captures the commitment overhead plus the opening proof cost.
The verifier’s computation consists of evaluating the Sum-Check consistency relations a
采集信息与校验
完整来源元数据
{
  "authors": [
    "Fu, Rong",
    "Tan, Jia Yee",
    "Kong, Ziyu",
    "Zhang, Shuning",
    "Li, Xianda",
    "Liu, Kun",
    "Fong, Simon"
  ],
  "content_level": "full_text_segment",
  "date_basis": "explicit_published",
  "date_evidence": {
    "published": "2026-01-31T11:31:00Z",
    "updated": "2026-10-29T08:48:16Z"
  },
  "fallback_pdf_url": "https://arxiv.org/pdf/2602.00667v7",
  "html_coordinate_space": "complete_deterministic_HTML_text_conversion",
  "html_group_id": "HTML-3805828ae3505f06ee5615907ec4e8fb9c4151d1e36d19a93cd8084b450c9897",
  "html_head_external_id": "arxiv:2602.00667",
  "html_original_title": "zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing",
  "html_segment_count": 2,
  "html_segment_index": 1,
  "html_text_end": 100000,
  "html_text_sha256": "b0cb286b793fa7e0ba1e79e9afa6d90f353ac94f1cdfaa28a04d4ed6c0b9c196",
  "html_text_start": 0,
  "html_total_chars": 130953,
  "identifiers": [
    "arxiv:2602.00667"
  ],
  "landing_page": "https://arxiv.org/abs/2602.00667v7",
  "rolling_atom_sha256": "3c34ba1af117a58a9031246c2b6b44b80d6d418f3244338eac2d87c4fab1d876",
  "source_updated_at": "2026-10-29T08:48:16+00:00",
  "version_label": "v7"
}
{
  "format": "source_html",
  "source_fields": {
    "authors": [
      "Fu, Rong",
      "Tan, Jia Yee",
      "Kong, Ziyu",
      "Zhang, Shuning",
      "Li, Xianda",
      "Liu, Kun",
      "Fong, Simon"
    ],
    "content_level": "full_text_segment",
    "date_basis": "explicit_published",
    "field_evidence": {},
    "html_text_end": 100000,
    "html_text_start": 0,
    "identifiers": [
      "arxiv:2602.00667"
    ],
    "mapping_version": 1,
    "published_at": "2026-01-31T11:31:00Z",
    "source_format": "a_622f2d2c978f798f_html",
    "source_key": "a-622f2d2c978f798f",
    "source_updated_at": "2026-10-29T08:48:16Z",
    "title": "zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing",
    "unknown_fields": [],
    "url": "https://arxiv.org/html/2602.00667v7"
  },
  "source_format": "a_622f2d2c978f798f_html"
}
原文版本历史与校验
版本入库更新时间来源发布日期校验标识
v1 · 正在查看2026-11-04 18:14 UTC2026-01-31 11:31 UTC31230c4494fc480cd955647c1f8d07a2c6b2d7a936e5a79214a58e30f7bb5887
可引用分片 · 87 段

CHK-cb5228c83e47d460f6008644

zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing
Rong Fu
Affiliation: Independent Researcher
Affiliation: Corresponding author
Jia Yee Tan
Affiliation: Independent Researcher
Ziyu Kong
Affiliation: Independent Researcher
Shuning Zhang
Affiliation: Independent Researcher
Xianda Li
Affiliation: Independent Researcher
Kun Liu
Affiliation: Independent Researcher
Simon Fong
Affiliation: Independent Researcher
Abstract
Zero-knowledge circuits enable privacy-preserving and scalable systems but are difficult to implement correctly due to the tight coupling between witness computation and circuit constraints. We present zkCraft, a practical framework that combines deterministic, R1CS-aware localization with proof-bearing search to detect semantic inconsistencies. zkCraft encodes candidate constraint edits into a single Row-Vortex polynomial and replaces repeated solver queries with a Violation IOP that certifies the existence of edits together with a succinct proof. Deterministic LLM-driven mutation templates bias exploration toward edge cases while preserving auditable algebraic verification. Evaluation on real Circom code shows that proof-bearing localization detects diverse under- and over-constrained faults with low false positives and reduces costly solver interaction.

CHK-eb435448f2a1b0f987a26db3

om code shows that proof-bearing localization detects diverse under- and over-constrained faults with low false positives and reduces costly solver interaction. Our approach bridges formal verification and automated debugging, offering a scalable path for robust ZK circuit development.
Keywords zero-knowledge proofs, fuzzing, Circom, TCCT, Row-Vortex commitment, Violation IOP, large language models, mutation testing
1 Introduction
Zero-knowledge circuits provide succinct, verifiable proofs while exposing minimal information about private inputs, and they form the foundation of many privacy and scalability systems. Writing correct circuits is difficult because the witness generator that computes private values must align precisely with the constraint system used for proof verification. When this alignment fails, two broad classes of faults appear. Under-constrained faults arise when the constraint system admits execution traces that no valid witness can produce. Over-constrained faults arise when a valid witness-producing execution is rejected by the constraints. Both fault classes have important security and operational consequences in deployed systems and have driven significant recent research efforts  [1, 2, 3, 4, 5, 6].
Prior work addresses these problems from multiple perspectives.

CHK-641849905a468fe6a505c7ac

ces in deployed systems and have driven significant recent research efforts  [1, 2, 3, 4, 5, 6].
Prior work addresses these problems from multiple perspectives. Static and pattern-based detectors reveal common syntactic mistakes but often miss semantic discrepancies that manifest only during witness generation or under specific inputs  [7, 8, 9]. Formal verification and SMT-based analyses can provide strong guarantees but typically do not scale to large circuits, and they struggle with the combined search space of program edits and input assignments  [10, 11, 12]. Dynamic approaches based on fuzzing and metamorphic testing improve practical bug-finding coverage, yet they frequently depend on many expensive solver calls or unguided mutations that produce numerous low-value candidates  [1, 2, 4]. Recent work on verifier-side encodings, interactive oracle proofs, and efficient polynomial commitments offers promising primitives to compress or certify search outcomes  [5, 13, 14]. In parallel, advances in model-guided mutation and LLM-driven fuzzing have shown that language models can generate semantically rich test patterns and seed mutations for security testing  [15, 16, 17, 18, 19, 20].
Despite these developments, important gaps remain.

CHK-666babdab098be11464c2a8d

n generate semantically rich test patterns and seed mutations for security testing  [15, 16, 17, 18, 19, 20].
Despite these developments, important gaps remain. Most algebraic and IOP-style techniques have not been integrated with practical program-level mutation strategies, so solver costs remain a bottleneck for end-to-end bug discovery. Conversely, LLM-guided mutation methods improve suggestion quality but they are typically detached from proof-bearing search and therefore can produce proposals that are expensive to validate or that lead to many false positives  [21, 20, 16]. Compilers and zkVM toolchains introduce additional complexity related to optimization and backend behavior, which further complicates end-to-end detection and increases the cost of exhaustive solver-based validation  [22, 23, 24, 25].
Motivated by these observations, we design zkCraft, a ZK-native pipeline that tightly couples algebraic localization, succinct violation proofs, and deterministic, prompt-guided mutation templates. zkCraft reduces the combinatorial task of finding small, vulnerability-inducing edits to a single algebraic existence statement.

CHK-1a6bf17e6823420ac9842686

ompt-guided mutation templates. zkCraft reduces the combinatorial task of finding small, vulnerability-inducing edits to a single algebraic existence statement. It constructs compact per-row fingerprints to prioritize a limited candidate pool, encodes row selection and substitution parameters as a Row-Vortex polynomial, and asks a prover to produce a Violation interactive oracle proof that certifies the existence of a witness satisfying the edited constraints while yielding a different public output. The proof serves as an auditable counterexample from which concrete substitutions can be recovered. To focus search on high-yield edits, zkCraft employs deterministic LLM-driven mutation templates as a zero-shot pattern oracle for right-hand-side edits and for input-sampling heuristics. These templates propose algebraic edits but do not replace the proof-producing components.
Our contributions are as follows. We present a ZK-native search framework that maps the search for small, vulnerability-causing edits to a single algebraic existence statement encoded as a Row-Vortex polynomial and certified with a Violation IOP. We design deterministic LLM interfaces that act as zero-shot mutation-template oracles to propose right-hand-side edits and input-sampling biases while remaining decoupled from proof generation.

CHK-04891eed5e0273b86d76f826

aces that act as zero-shot mutation-template oracles to propose right-hand-side edits and input-sampling biases while remaining decoupled from proof generation. We describe practical implementation techniques for compact per-row fingerprinting, a scoring heuristic to select a small candidate pool, and a deterministic finite-field synthesis that recovers concrete substitutions from proof-embedded encodings. We evaluate the approach on representative Circom circuits and zkVM workloads and show that the ZK-native workflow discovers diverse under- and over-constrained faults while substantially reducing solver calls and producing auditable counterexamples suitable for developer inspection.
2 Related Work
2.1 Correctness and verification of ZK pipelines and compilers
The correctness of zero-knowledge compilation and circuit-processing pipelines has attracted growing attention because compiler or pipeline bugs can yield accepted yet invalid proofs. Static and dynamic analyses specifically targeting ZK circuit representations and their compilers have been proposed to reveal semantic and logic flaws early in the toolchain. Prior work presents static detectors over circuit dependence graphs and evaluates them on large Circom codebases, demonstrating that semantic checks can recover subtle vulnerabilities in real projects  [2].

CHK-f367864c8128ebac99933aff

uit dependence graphs and evaluates them on large Circom codebases, demonstrating that semantic checks can recover subtle vulnerabilities in real projects  [2]. Metamorphic and mutation-driven approaches have been adapted to the ZK compiler setting to detect incorrect compilation behaviors by generating semantically equivalent variants and checking for inconsistent outputs  [4, 26]. Systematic fuzzing of end-to-end ZK pipelines has also been shown to surface logic bugs that elude conventional testing, illustrating the importance of domain-aware test oracles for pipelines that span DSL, compiler, and proof-generation layers  [27, 28].
2.2 Fuzzing, metamorphic testing, and oracles for ZK systems
Fuzzing and metamorphic testing have been successfully adapted to find pipeline-level and finalization bugs in ZK deployments, including rollup finalization failures and pipeline logic flaws; these techniques emphasize careful oracle design and input-generation strategies to trigger diverse behaviors  [26, 29]. Tools that combine metamorphic relations with fault-injection or targeted mutation expose both soundness and completeness weaknesses in zkVMs and related infrastructures  [30, 26]. Work that specifically targets the oracle problem in ZK fuzzing highlights the need for proofs or semantic checks that distinguish genuine counterexamples from benign variations  [28, 27].

CHK-60f84d761dd7b372788f92be

ts the oracle problem in ZK fuzzing highlights the need for proofs or semantic checks that distinguish genuine counterexamples from benign variations  [28, 27]. Complementary studies show that bounded, structured mutation templates and algebraic checks outperform unguided random mutation when the objective is to find under-constrained or mis-specified constraints  [31, 32].
2.3 LLMs and automated test/mutation generation
Large language models have been explored as code-generation and test-generation oracles across multiple domains. In compiler and test-generation settings, LLMs can be guided to produce high-quality test programs or mutation patterns when fed targeted prompts and feedback, enabling discovery of deep optimization and correctness bugs  [33, 34, 35]. Recent work combines LLMs with mutation testing and iterative refinement to generate tests that kill mutants and to produce sampling strategies tailored to observed failures  [36, 37, 38]. Studies that evaluate LLMs specifically for ZK program generation report that off-the-shelf models often produce syntactically plausible but semantically incorrect ZK code, motivating augmentation strategies such as constraint sketching and guided retrieval  [39, 40]. These findings motivate zkCraft’s design choice to treat LLMs as deterministic template oracles rather than as formal solvers  [39, 40].

CHK-8275b488512f3a4724dfa680

d retrieval  [39, 40]. These findings motivate zkCraft’s design choice to treat LLMs as deterministic template oracles rather than as formal solvers  [39, 40].
2.4 Symbolic execution, SMT guidance, and hybrid strategies
Symbolic execution enhanced with solver-time prediction and synthesized solver strategies has been shown to improve scalability for complex programs, and these ideas inform hybrid pipelines that combine symbolic techniques with search or sampling  [34, 35, 41]. For ZK circuit mutation and verification, solver-guided fallback channels that ground small template families and use finite-field SMT/SAT queries remain practical when pure ZK-native IOPs are infeasible; this hybrid approach balances completeness and engineering constraints  [42, 43]. Machine-checked proofs and formally verified protocol implementations provide strong guarantees and serve as an orthogonal means to reduce the trusted code base for ZK constructions  [43, 42].
2.5 ZK-native proof techniques, commitments, and succinct verification
Recent advances in polynomial commitments, IOPs and succinct proof systems enable encoding higher-level search oracles as compact ZK statements.

CHK-e8ec2da789fab22478da341d

ct verification
Recent advances in polynomial commitments, IOPs and succinct proof systems enable encoding higher-level search oracles as compact ZK statements. Systems that adopt ZK-native encodings show how commitment-and-IOP primitives can be repurposed to certify existential properties about edits and witnesses, thereby converting existential search into a single verifiable artifact  [44, 45, 46]. GPU-accelerated proof systems and hardware-algorithm co-design work illustrate routes to practical prover performance that scale to larger circuits  [47, 48, 49]. Benchmarks and tooling that provide comparative performance baselines for SNARK stacks are useful for choosing commit/IOP backends when building ZK-native workflows  [31, 50].
2.6 Circuit languages, compilers and verification frameworks
Domain-specific languages for ZK, their compiler frontends, and associated verification toolchains form a rich ecosystem. Efforts to improve circuit description languages and make them amenable to static verification encourage safer ZK application development  [45, 51]. Compiler-focused fuzzing and white-box analysis have uncovered deep logic bugs in real-world compilers, motivating tighter integration of source-level diagnostics with pipeline-level checks  [33, 4].

CHK-a247777ccd3414a6f148b7b3

analysis have uncovered deep logic bugs in real-world compilers, motivating tighter integration of source-level diagnostics with pipeline-level checks  [33, 4]. Tools that certify circuits with refinement types or other higher-level specifications reduce a class of errors by construction and complement testing-based approaches  [52, 32].
2.7 Applications, surveys, and domain-specific ZK use cases
Zero-knowledge proofs are being applied widely, from verifiable decentralized machine learning to privacy-preserving credentialing and domain-specific verification tasks  [53, 54, 55]. Surveys and systematizations contextualize verifiability challenges and catalog practical design patterns and open problems for ZKP-based applications  [56, 57]. Domain work that integrates anomaly detection, sensing, or constrained hardware contexts highlights practical verification needs in applied settings  [58, 59, 60].
2.8 Mutation tooling, scientific debugging and cross-domain testing
Mutation testing and scientific debugging have been adapted to multiple domains including quantum circuits and hardware verification; these adaptations emphasize careful mutant design and oracle selection to obtain meaningful faults  [61, 62].

CHK-928c2244fe35832f3cabf3d1

luding quantum circuits and hardware verification; these adaptations emphasize careful mutant design and oracle selection to obtain meaningful faults  [61, 62]. Iterative, model-guided debugging pipelines that combine LLMs with mutation testing demonstrate that principled human-in-the-loop strategies and automated refinement can improve fault detection while keeping developer review effort manageable  [36, 37, 38]. These cross-domain lessons guided the design of zkCraft’s mutation templates and deterministic post-processing to keep generated edits syntactically valid and semantically focused  [39, 36].
2.9 Summary of positioning
In summary, prior work supplies three families of building blocks for zkCraft. The first family covers ZK pipeline correctness, compilers, and static/dynamic detectors that expose semantic vulnerabilities  [2, 4, 27, 26]. The second family comprises mutation, fuzzing, and LLM-guided test generation techniques that provide high-yield input and edit proposals  [33, 36, 37, 38]. The third family contains ZK-native proof primitives, commitment/IOP engineering, and performance tooling that enable replacing many solver calls with compact cryptographic artifacts  [44, 46, 47, 50].

CHK-979399c149b6acd8462fabda

 primitives, commitment/IOP engineering, and performance tooling that enable replacing many solver calls with compact cryptographic artifacts  [44, 46, 47, 50]. zkCraft integrates elements from all three families by combining algebraic localization, a Row-Vortex commitment with a Violation IOP, and deterministic LLM-driven mutation templates to produce proof-bearing counterexamples that are both practical and auditable  [63, 32, 40].
guarantees, advancing the state-of-the-art in ZKP security.
Figure 1: Overview of the zkCraft framework for ZK-native fuzzing and mutation. The pipeline begins at the Input Layer, where a Circom program is decomposed into R1CS matrices. In Stage 1 (The Slicer), a Sparse Fingerprint Scanner computes diagnostic scores to prune the constraint space into a manageable Candidate Pool ℛcand\mathcal{R}_{\mathrm{cand}}. This process is accelerated by the LLM Oracles, which provide zero-shot Mutation Templates and learn vulnerability patterns to bias the search. In Stage 2 (ZK-Native Engine), candidate edits are bundled into the Row-Vortex Commitment R⁡(X,Y)R(X,Y). A Violation IOP (utilizing algebraic Sum-Check identities) then searches for a witness that satisfies the edited constraints while diverging from the original output.

CHK-ae647bfa4836dd6720746875

ation IOP (utilizing algebraic Sum-Check identities) then searches for a witness that satisfies the edited constraints while diverging from the original output. The resulting Succinct Proof π\pi serves as a Proof-as-Counterexample, from which the Witness Extraction machinery reconstructs the concrete trace to confirm the vulnerability via TCCT.
Figure 2: zkCraft versus baseline tools. The horizontal axis uses a logarithmic scale from one second to two hours. Curves show cumulative unique true positives averaged over five seeds and shaded bands indicate one standard deviation. A gold marker at 100 seconds highlights early convergence.
Figure 3: Ablation results. Bars represent the log10 of the slowdown factor relative to the default configuration. The red line reports the number of bugs not discovered within 24 hours when a single module is removed. A horizontal threshold marks a 100 times slowdown.
Figure 4: zkCraft convergence under four mutation/population settings. Time (log scale) on the horizontal axis; cumulative true positives on the vertical. Gold dashed line marks 100-second convergence; shaded areas show one standard deviation.
Figure 5: Row-Vortex commitment schematic. The three panels illustrate candidate row selection, construction of the bivariate polynomial, and the Violation IOP that yields a succinct proof.

CHK-0cfa153d665c5b13bcc43540

nt schematic. The three panels illustrate candidate row selection, construction of the bivariate polynomial, and the Violation IOP that yields a succinct proof. The top annotation summarizes the replacement of many SMT calls by a single commitment.
Figure 6: Proof size vs. constraint count (top) and prover time (bottom), both on log-scaled axes. Dashed line shows proportional growth; horizontal marker highlights small proof size in ZK-native mode.
Figure 7: Representative confirmed vulnerabilities and corresponding counterexamples. Left panels show compact code excerpts with highlighted weak assignments. Right panels list concrete input values and the observed outputs that demonstrate the fault.
Figure 8: Strategy comparison as a radar plot. Axes report early discovery at two short checkpoints, final discovery at two hours, false positive tendency after inversion, and normalized median runtime after inversion. Polygons show the mean over five seeds.
Figure 9: Hyperparameter sensitivity heatmap. The horizontal axis is mutation strength and the vertical axis is population size. Colors encode the number of true positives found within the two-hour budget. The default configuration is framed and annotated.
Figure 10: Sensitivity of zkCraft to key hyperparameters across four settings.

CHK-2ad8e1eea1469a8a7f3a200b

nd within the two-hour budget. The default configuration is framed and annotated.
Figure 10: Sensitivity of zkCraft to key hyperparameters across four settings. Each panel varies one parameter with others fixed; curves show cumulative true positives over time (log scale), averaged across five seeds. A gold dashed line at 100 seconds marks the early-convergence regime.
3 Methodology
This section formalizes the zkCraft methodology and its ZK-native extension.
We present a deterministic, R1CS-aware pipeline that replaces randomized program
mutation with a small-scope, algebraic slicing procedure. The novel extension
replaces the external SMT/SAT oracle with a succinct zero-knowledge protocol.
Under this design the existence of a small edit set and the concrete edits
themselves are certified by a single proof π\pi; proof verification both confirms
the vulnerability and yields the concrete counterexample trace without a separate
TCCT [63] invocation.
3.1 Notation and preliminaries
Let 𝔽q\mathbb{F}_{q} denote a prime finite field of order qq. An R1CS instance with
mm constraints and nn variables is represented by matrices
A,B,C∈𝔽qm×nA,B,C\in\mathbb{F}_{q}^{m\times n}. For each row index i∈{1,…,m}i\in\{1,\dots,m\}, let
ai,bi,cia_{i},b_{i},c_{i} denote the ii-th rows of A,B,CA,B,C, respectively. A witness vector
is w∈𝔽qnw\in\mathbb{F}_{q}^{n}.

CHK-f83916d3d506860a168efc38

x i∈{1,…,m}i\in\{1,\dots,m\}, let
ai,bi,cia_{i},b_{i},c_{i} denote the ii-th rows of A,B,CA,B,C, respectively. A witness vector
is w∈𝔽qnw\in\mathbb{F}_{q}^{n}.
⟨ai,w⟩⋅⟨bi,w⟩=⟨ci,w⟩,\displaystyle\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle\;=\;\langle c_{i},w\rangle,
(1)
where ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle denotes the inner product over 𝔽q\mathbb{F}_{q} and
Eq. (1) expresses the ii-th Rank-1 constraint.
F⁡(w)=(⟨ai,w⟩⋅⟨bi,w⟩−⟨ci,w⟩)i=1m.\displaystyle F(w)\;=\;\big(\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle-\langle c_{i},w\rangle\big)_{i=1}^{m}.
(2)
where F⁡(w)F(w) is the vector of per-row residuals and a valid witness satisfies F⁡(w)=0F(w)=0.
We use the Trace-Constraint Consistency Test (TCCT) as semantic acceptance: a mutated
program P′P^{\prime} and input x′x^{\prime} produce a TCCT counterexample if the execution trace
(z′,y′)(z^{\prime},y^{\prime}) satisfies the original constraints CC while yielding public output
y′≠yy^{\prime}\neq y, where yy denotes the original public output for the relevant input.
3.2 Formal problem statement
Given an R1CS ℛ=(A,B,C)\mathcal{R}=(A,B,C) over 𝔽q\mathbb{F}_{q}, a program PP that produces
a witness ww on input xx, a mapping from source-level weak-assignment sites to
R1CS rows, and an edit budget tmax∈ℕt_{\max}\in\mathbb{N}, we seek a small collection

CHK-a1c0cb63f2e68df44db63c41

ness ww on input xx, a mapping from source-level weak-assignment sites to
R1CS rows, and an edit budget tmax∈ℕt_{\max}\in\mathbb{N}, we seek a small collection
of right-hand-side edits (restricted to weak assignments) producing P′P^{\prime} and a
witness w′w^{\prime} for some input x′x^{\prime} such that
P′​(x′)=(z′,y′),C⁡(x′,z′,y′)=true,y′≠y.\displaystyle P^{\prime}(x^{\prime})=(z^{\prime},y^{\prime}),\qquad C(x^{\prime},z^{\prime},y^{\prime})=\textsf{true},\qquad y^{\prime}\neq y.
(3)
where yy denotes the public output of the original program on the considered input.
The decision variant asks whether such a set of edits of size at most tmaxt_{\max} exists.
Because TCCT decision problems are hard in the worst case, we optimize for small edit
cardinalities via a focused search.
3.3 Stage 1: Sparse signature extraction
For every constraint row ii compute the nonzero index supports
supp⁡(ai),supp⁡(bi),supp⁡(ci),\displaystyle\mathrm{supp}(a_{i}),\ \mathrm{supp}(b_{i}),\ \mathrm{supp}(c_{i}),
(4)
where supp⁡(⋅)\mathrm{supp}(\cdot) returns the set of indices with nonzero coefficients.
Define two integer diagnostics per row:
κiw\displaystyle\kappa^{\mathrm{w}}_{i}
:=|(supp⁡(ai)∪supp⁡(bi)∪supp⁡(ci))∩𝒲|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{W}\big|,
(5)
κic\displaystyle\kappa^{\mathrm{c}}_{i}

CHK-98344389b768b31979d43bd0

playstyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{W}\big|,
(5)
κic\displaystyle\kappa^{\mathrm{c}}_{i}
:=|(supp⁡(ai)∪supp⁡(bi)∪supp⁡(ci))∩𝒦|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{K}\big|,
(6)
where 𝒲\mathcal{W} indexes witness/intermediate variables and 𝒦\mathcal{K} indexes
constant/public/simple-expression terms.
Form a compact per-row fingerprint and a scalar score:
fpi=Trunc64⁡(Hash⁡(coeffs⁡(ai,bi,ci)​‖κiw‖​κic)),\displaystyle\mathrm{fp}_{i}\;=\;\mathrm{Trunc64}\big(\mathrm{Hash}(\mathrm{coeffs}(a_{i},b_{i},c_{i})\,\|\,\kappa^{\mathrm{w}}_{i}\,\|\,\kappa^{\mathrm{c}}_{i})\big),
(7)
where Hash\mathrm{Hash} is a collision-resistant hash and Trunc64\mathrm{Trunc64} truncates to 64 bits; and
si=λ⋅κicκiw+1−μ⋅κiw,\displaystyle s_{i}\;=\;\lambda\cdot\frac{\kappa^{\mathrm{c}}_{i}}{\kappa^{\mathrm{w}}_{i}+1}\;-\;\mu\cdot\kappa^{\mathrm{w}}_{i},
(8)
where λ,μ>0\lambda,\mu>0 are tunable scalars and the fractional term stabilizes ratio sensitivity.
Select the top-kk rows with smallest sis_{i} to form the candidate pool
ℛcand\mathcal{R}_{\mathrm{cand}} (typical k≤32k\leq 32). This stage runs in time linear in the
number of nonzeros.
3.4 Stage 2: Row-Vortex commitment and Violation IOP (ZK-native)

CHK-82b2fc0521aede1bc2796dec

athrm{cand}} (typical k≤32k\leq 32). This stage runs in time linear in the
number of nonzeros.
3.4 Stage 2: Row-Vortex commitment and Violation IOP (ZK-native)
Row-Vortex is a bivariate polynomial encoding that combines candidate row selections and substitution constants for R1CS constraints, providing a compact representation of mutation choices within the zkCraft framework. We replace the loop of SMT/SAT queries by a single zero-knowledge interactive proof that simultaneously attests to the existence of a small set of edits and carries a compact counterexample when one exists. The protocol works on a preselected candidate set ℛ\mathcal{R} and encodes both binary row selection and per-site substitutions into a two-variable polynomial, which we call the Row-Vortex polynomial:
R⁡(X,Y)\displaystyle R(X,Y)
=∑i∈ℛδi​rowi​(X)+ci​seli​(Y).\displaystyle=\sum_{i\in\mathcal{R}}\delta_{i}\,\mathrm{row}_{i}(X)\;+\;c_{i}\,\mathrm{sel}_{i}(Y).
(9)
where δi∈{0,1}\delta_{i}\in\{0,1\} denotes whether row ii is chosen, ci∈𝔽qc_{i}\in\mathbb{F}_{q} is the substitution constant associated with row ii, rowi​(X)\mathrm{row}_{i}(X) is a low-degree univariate encoding of the ii-th R1CS row in variable XX, seli​(Y)\mathrm{sel}_{i}(Y) isolates the ii-th slot via YY, and ℛ\mathcal{R} is the candidate index set.

CHK-301cd43679a815e654ec5604

variate encoding of the ii-th R1CS row in variable XX, seli​(Y)\mathrm{sel}_{i}(Y) isolates the ii-th slot via YY, and ℛ\mathcal{R} is the candidate index set.
The prover commits to R⁡(X,Y)R(X,Y) under an efficient polynomial commitment scheme (for example, contemporary HyperPlonk+/BaseFold-style constructions). The commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) binds the prover to a unique pair (δ,c)(\delta,c) while remaining succinct. The prover additionally holds a candidate witness w′w^{\prime} that, together with (δ,c)(\delta,c), is intended to satisfy the edited constraint system.
To express the public-output divergence in algebraic form, fix distinct evaluation points {uj}j=0mout−1\{u_{j}\}_{j=0}^{m_{\mathrm{out}}-1} for the public-output coordinates and let Lj​(X)L_{j}(X) be the corresponding Lagrange basis polynomials. Define the multilinear output-difference polynomial
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X).\displaystyle\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X).
(10)
where yj′y^{\prime}_{j} denotes the jj-th coordinate of the public output produced by w′w^{\prime}, yjy_{j} denotes the original public output coordinate, and Lj​(X)L_{j}(X) is the degree ≤mout−1\leq m_{\mathrm{out}}-1 Lagrange basis polynomial for point uju_{j}.

CHK-963f197cba07e9dfd127ff77

_{j} denotes the original public output coordinate, and Lj​(X)L_{j}(X) is the degree ≤mout−1\leq m_{\mathrm{out}}-1 Lagrange basis polynomial for point uju_{j}. The predicate y′≠yy^{\prime}\neq y is equivalent to the polynomial inequality Δout​(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0.
Aggregate the edited constraint residuals into a single per-evaluation polynomial by evaluating the Row-Vortex encoding on an evaluation domain 𝒟\mathcal{D} (for example a subset of {0,1}ℓ\{0,1\}^{\ell}) and summing the pointwise residual encodings:
ΦR​(U)=∑i∈𝒟ϕi​(R⁡(U,⋅),w′).\displaystyle\Phi_{R}(U)\;=\;\sum_{i\in\mathcal{D}}\phi_{i}\big(R(U,\cdot),\,w^{\prime}\big).
(11)
where 𝒟\mathcal{D} is the chosen evaluation domain, ϕi​(⋅)\phi_{i}(\cdot) denotes the algebraic form of the ii-th constraint residual when evaluated at domain point UU, and R⁡(U,⋅)R(U,\cdot) is the polynomial in the remaining variable obtained by fixing the first argument X=UX=U.
We capture the localization predicate, namely the existence of edits that zero the edited residuals while changing the public output, by the following existential algebraic statement:
∃(CLOSE\displaystyle\exists\;(
OPENδ∈{0,1}|ℛ|,c∈𝔽q|ℛ|,w′∈𝔽qn)s.t.\displaystyle\delta\in\{0,1\}^{|\mathcal{R}|},\;c\in\mathbb{F}_{q}^{|\mathcal{R}|},\;w^{\prime}\in\mathbb{F}_{q}^{n})\quad\text{s.t.}
(12)

CHK-6a625007912fc1f48a48c90a

|,c∈𝔽q|ℛ|,w′∈𝔽qn)s.t.\displaystyle\delta\in\{0,1\}^{|\mathcal{R}|},\;c\in\mathbb{F}_{q}^{|\mathcal{R}|},\;w^{\prime}\in\mathbb{F}_{q}^{n})\quad\text{s.t.}
(12)
Fδ,c​(w′)=0andΔout​(X)≢0.\displaystyle F_{\delta,c}(w^{\prime})=0\quad\text{and}\quad\Delta_{\mathrm{out}}(X)\not\equiv 0.
(13)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited per-row residuals obtained after applying the selection δ\delta and substitutions cc; Fδ,c​(w′)=0F_{\delta,c}(w^{\prime})=0 means the edited R1CS is satisfied by w′w^{\prime}, and Δout​(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0 arithmetizes the requirement that the public outputs differ.
The prover reduces the existential statement (13) to a Sum-Check style identity over 𝒟\mathcal{D}. Concretely, form the global algebraic sum
∑U∈𝒟ΦR​(U)​Δout​(U)= 0.\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U)\;=\;0.
(14)
where the integrand pairs the edited residual aggregation ΦR​(U)\Phi_{R}(U) with the arithmeticized divergence Δout​(U)\Delta_{\mathrm{out}}(U), so that a valid triple (δ,c,w′)(\delta,c,w^{\prime}) makes the summand vanish pointwise and the global sum evaluate to zero.
The prover runs a standard public-coin Sum-Check/IOP over the committed polynomial.

CHK-6eef078df631fe2094832778

me}) makes the summand vanish pointwise and the global sum evaluate to zero.
The prover runs a standard public-coin Sum-Check/IOP over the committed polynomial. Let t=⌈log2⁡|𝒟|⌉t=\lceil\log_{2}|\mathcal{D}|\rceil and decompose 𝒟=𝒟1×⋯×𝒟t\mathcal{D}=\mathcal{D}_{1}\times\cdots\times\mathcal{D}_{t}. The Sum-Check transcript is produced as a sequence of univariate polynomials g1,…,gtg_{1},\dots,g_{t} satisfying the iterated-sum relations:
∑U∈𝒟ΦR​(U)​Δout​(U)\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U)
=∑u1∈𝒟1g1​(u1),\displaystyle=\sum_{u_{1}\in\mathcal{D}_{1}}g_{1}(u_{1}),
(15)
gk​(u1,…,uk)\displaystyle g_{k}(u_{1},\dots,u_{k})
=∑uk+1∈𝒟k+1gk+1​(u1,…,uk+1)\displaystyle=\sum_{u_{k+1}\in\mathcal{D}_{k+1}}g_{k+1}(u_{1},\dots,u_{k+1})
(16)
for ​k=1,…,t−1.\displaystyle\quad\text{for }k=1,\dots,t-1.
(17)
where each gkg_{k} is univariate in its last argument (degree bounded by a small constant determined by the encoding), and the equalities enforce consistency between the iterated sums and the claimed global value.
During the interactive protocol the verifier samples independent random challenges ζ1,…,ζt←$𝔽q\zeta_{1},\dots,\zeta_{t}\stackrel{{\scriptstyle\$}}{{\leftarrow}}\mathbb{F}_{q} and asks the prover to open committed objects at these points. Concretely the verifier requests evaluations of

CHK-d77afa4da6f0b98ab8ce4e47

el{{\scriptstyle\$}}{{\leftarrow}}\mathbb{F}_{q} and asks the prover to open committed objects at these points. Concretely the verifier requests evaluations of
R⁡(ζk,Y),ΦR​(ζk),Δout​(ζk)\displaystyle R(\zeta_{k},\,Y),\qquad\Phi_{R}(\zeta_{k}),\qquad\Delta_{\mathrm{out}}(\zeta_{k})
(18)
for the appropriate indices kk. Here R⁡(ζk,Y)R(\zeta_{k},Y) denotes the univariate polynomial in YY obtained by substituting X=ζkX=\zeta_{k}, ΦR​(ζk)\Phi_{R}(\zeta_{k}) is the aggregated residual value at U=ζkU=\zeta_{k}, and Δout​(ζk)\Delta_{\mathrm{out}}(\zeta_{k}) is the divergence test evaluation at the same point.
In the final step, the prover opens the commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) at the sampled XX-coordinates and supplies evaluation proofs. The verifier checks that the openings are consistent with 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) under the chosen commitment scheme, that the Sum-Check consistency relations hold at the sampled challenges, and that the divergence indicator is nonzero for at least one sampled challenge, namely Δout​(ζk)≠0\Delta_{\mathrm{out}}(\zeta_{k})\neq 0 for some kk. The verifier accepts exactly when all checks succeed.
Soundness follows from two mechanisms.

CHK-a5d7bd1baa900c35f20a892e

mely Δout​(ζk)≠0\Delta_{\mathrm{out}}(\zeta_{k})\neq 0 for some kk. The verifier accepts exactly when all checks succeed.
Soundness follows from two mechanisms. The Sum-Check subprotocol forces the prover to respect the global algebraic identity except with negligible probability, and randomized evaluation of Δout\Delta_{\mathrm{out}} yields a Schwartz–Zippel-style guarantee that a nonzero polynomial will be detected with high probability when the field size qq is large relative to moutm_{\mathrm{out}}. Upon acceptance, an extractor operating under standard commitment/IOP assumptions can recover the committed low-degree encodings and reconstruct the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) or directly obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); thus the accepted transcript functions both as a succinct certificate of existence and as a carrier of the execution-level counterexample for developer triage. As detailed in Subsection 6.7, the degree bounds and node selection ensure injective encoding and stable extraction.
3.5 Proof-as-counterexample (verification and extraction)
A verifier’s successful validation of the succinct proof π\pi certifies the existence of a witness satisfying the target algebraic statement in Eq. (13).

CHK-a6abae13fd0faffafb0488f3

ction)
A verifier’s successful validation of the succinct proof π\pi certifies the existence of a witness satisfying the target algebraic statement in Eq. (13). Our practical extraction policy is two-fold: either the verifier reconstructs the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) from openings produced against the polynomial commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R), or the proof itself contains an auditable encoding of the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}). In both cases, verification not only attests to the bug but also yields the concrete execution trace without necessitating an independent TCCT replay; in effect, the proof functions as the counterexample certificate. Where necessary for developer inspection, the verifier may still optionally re-run the mutated program for richer runtime traces.
From commitment opening to counterexample recovery
We now present a deterministic procedure the verifier (or an extractor acting on behalf of the verifier) executes after accepting an IOP transcript. The procedure consumes the opened evaluations and their evaluation proofs and reconstructs the compact data (δ,c,w′)(\delta,c,w^{\prime}); when the IOP transcript already carries an encoding of the witness polynomial W′​(X)W^{\prime}(X) the procedure is simpler because interpolation yields w′w^{\prime} directly.

CHK-e91aa0b6b995f0dcc12dda11

anscript already carries an encoding of the witness polynomial W′​(X)W^{\prime}(X) the procedure is simpler because interpolation yields w′w^{\prime} directly.
Algorithm 1 Extractor: recover concrete counterexample from an accepted IOP transcript
Input : Accepted transcript containing commitment openings and evaluations, and evaluation proofs
Output : Recovered tuple (δ,c,w′)(\delta,c,w^{\prime}) and the synthesized program P′P^{\prime} (or fail)
1
Collect opened values and their proofs: {R⁡(ζk,Y),ΦR​(ζk),Δout​(ζk),πeval}k\{R(\zeta_{k},Y),\Phi_{R}(\zeta_{k}),\Delta_{\mathrm{out}}(\zeta_{k}),\pi_{\mathrm{eval}}\}_{k}
2
Compute ρ\rho, the compact vector derived from the opened encodings (aggregation step)
3
Compute (δ,c)←M−1⋅ρ(\delta,c)\leftarrow M^{-1}\cdot\rho using the inverse affine map associated with the encoding
4
if witness polynomial W′​(X)W^{\prime}(X) is present in the transcript then
5
Interpolate W′​(X)W^{\prime}(X) to obtain the vector w′w^{\prime};
6
else
7
Form the algebraic reconstruction system Fδ,c​(w′)=0F_{\delta,c}(w^{\prime})=0 derived from the substituted constraints
8
Solve for w′w^{\prime} by Gaussian elimination or an n×nn\times n linear solve over 𝔽q\mathbb{F}_{q};
9
Synthesize mutated source P′P^{\prime} by substituting the recovered constants cc into the identified weak-assignment sites
10

CHK-a1a03c9d862a5d50e9f4e18b

r solve over 𝔽q\mathbb{F}_{q};
9
Synthesize mutated source P′P^{\prime} by substituting the recovered constants cc into the identified weak-assignment sites
10
Derive public inputs x′x^{\prime} from the public entries of w′w^{\prime} and output the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime})
11
return (δ,c,w′)(\delta,c,w^{\prime})
We next state cost estimates for this deterministic extraction. Let k=|ℛ|k=|\mathcal{R}| denote the number of candidate rows encoded in the Row-Vortex polynomial and let nn denote the witness dimension. Recovering the compact selection vector (δ,c)(\delta,c) from the opened encodings requires applying the inverse affine map M−1M^{-1}. When implemented with a sparse reconstruction routine this step runs in time
Tselect=O⁡(k​log⁡k),T_{\mathrm{select}}\;=\;O(k\log k),
(19)
where kk is the size of the candidate set and the logarithmic factor accounts for sorting/hashed-sparse recovery primitives.
If the transcript contains an encoded witness polynomial W′​(X)W^{\prime}(X), interpolation recovers w′w^{\prime} in time
Tinterp=O⁡(n​log⁡n),T_{\mathrm{interp}}\;=\;O(n\log n),
(20)
where nn is the number of witness coordinates and the complexity assumes FFT-style interpolation over a suitable evaluation domain.
If W′​(X)W^{\prime}(X) is not provided, the extractor assembles the linear/algebraic reconstruction system

CHK-0b2079fcdcc5e4c2757c8ead

yle interpolation over a suitable evaluation domain.
If W′​(X)W^{\prime}(X) is not provided, the extractor assembles the linear/algebraic reconstruction system
Fδ,c​(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0,
(21)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited residuals after applying (δ,c)(\delta,c).
Solving Eq. (21) by standard Gaussian elimination costs
Tsolve=O⁡(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}),
(22)
where ω∈[2,3]\omega\in[2,3] is the exponent of matrix multiplication; in practice a direct solver yields Tsolve=O⁡(n3)T_{\mathrm{solve}}=O(n^{3}) field operations for dense systems, while sparse linear algebra often achieves substantially better constants.
Combining these terms, and accounting for the verifier-side checks (pairing/opening verifications) which add only a small constant factor, we obtain the pragmatic bound
Textract≤\displaystyle T_{\mathrm{extract}}\;\leq
2​(d+1)⏟verification pairings/opens+Tinterp⏟interpolation if present\displaystyle\underbrace{2(d+1)}_{\text{verification pairings/opens}}+\underbrace{T_{\mathrm{interp}}}_{\text{interpolation if present}}
(23)
+Tselect⏟sparse reconstruction=O~​(n+k),\displaystyle+\underbrace{T_{\mathrm{select}}}_{\text{sparse reconstruction}}=\widetilde{O}(n+k),

CHK-57545b13b72ee4b4a153999f

ion if present}}
(23)
+Tselect⏟sparse reconstruction=O~​(n+k),\displaystyle+\underbrace{T_{\mathrm{select}}}_{\text{sparse reconstruction}}=\widetilde{O}(n+k),
where dd denotes the opening degree parameter of the commitment scheme and the O~​(⋅)\widetilde{O}(\cdot) notation hides polylogarithmic factors. The dominant term is problem-dependent: when the proof carries W′​(X)W^{\prime}(X) interpolation dominates, otherwise reconstruction from a linear solve may dominate. After recovering (δ,c,w′)(\delta,c,w^{\prime}) the mutated program P′P^{\prime} can be materialized by substituting the constants into the weak-assignment sites; producing the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) then requires no full TCCT re-execution for verification purposes because soundness of π\pi already guarantees acceptance by CC.
3.6 Stage 3: Deterministic finite-field synthesis (integrated)
When the extractor yields (δ,c,w′)(\delta,c,w^{\prime}) the system performs deterministic synthesis of the concrete mutated program. Each selected weak-assignment site induces an algebraic constraint on the substitution parameter cc that commonly takes the affine form
αi​(c)⋅c+βi​(c)= 0,\alpha_{i}(c)\cdot c+\beta_{i}(c)\;=\;0,
(24)

CHK-625c479b690acfbdf3c8f4f8

s an algebraic constraint on the substitution parameter cc that commonly takes the affine form
αi​(c)⋅c+βi​(c)= 0,\alpha_{i}(c)\cdot c+\beta_{i}(c)\;=\;0,
(24)
where αi​(c)\alpha_{i}(c) and βi​(c)\beta_{i}(c) are field-valued expressions resulting from substituting known partial witness values or symbol placeholders into the site’s algebraic template; these expressions are explicit low-degree polynomials in the relevant parameters.
In the simple affine case the solution is obtained by a modular inversion
c=−αi−1​βi(modq),c\;=\;-\alpha_{i}^{-1}\beta_{i}\pmod{q},
(25)
where αi−1\alpha_{i}^{-1} denotes the multiplicative inverse of αi\alpha_{i} in 𝔽q\mathbb{F}_{q}. If the site produces a low-degree polynomial relation in cc, we apply finite-field root-finding routines to obtain all feasible roots. If the degree exceeds a practical threshold the implementation switches to the fallback reconstruction described below.
IOP-provided witness vs. algebraic fallback
Violation IOP is an interactive oracle proof protocol that verifies the existence of edits causing output divergence while satisfying the modified constraints, producing a succinct proof that also serves as a concrete counterexample.

CHK-c8f1ef38ba834682a8b27653

xistence of edits causing output divergence while satisfying the modified constraints, producing a succinct proof that also serves as a concrete counterexample. If the Violation IOP transcript is “opening-friendly” (for example when using commitment schemes that permit appending a low-degree witness polynomial such as HyperPlonk+ or BaseFold), the prover may attach W′​(X)W^{\prime}(X) to the oracle list without increasing the verifier’s query complexity. In that case the extractor interpolates w′w^{\prime} (Eq. (20)) and the subsequent replay of P′​(x′)P^{\prime}(x^{\prime}) is optional because the acceptance proof already certifies that the edited circuit accepts the extracted witness and produces a public output y′≠yy^{\prime}\neq y.
If the transcript does not contain W′​(X)W^{\prime}(X), the system must reconstruct w′w^{\prime} algebraically from (δ,c)(\delta,c) and the R1CS. The fallback flow proceeds as follows. First solve the reconstruction system in Eq. (21) to obtain w′w^{\prime} (cost given by Eq. (22)). Next, compute the site constants cc by solving Eq. (24) for each chosen site (using inversion or root-finding as appropriate).

CHK-d208f591df2b65d7ece66f49

\prime} (cost given by Eq. (22)). Next, compute the site constants cc by solving Eq. (24) for each chosen site (using inversion or root-finding as appropriate). Finally, synthesize the mutated source P′P^{\prime} and, if desired for debugging, run P′​(x′)P^{\prime}(x^{\prime}) to obtain a developer-friendly trace; this replay is not required for correctness because the proof already certifies acceptance. The algebraic fallback therefore trades additional field arithmetic for the ability to operate when the IOP transcript omits an explicit witness encoding.
When substituting computed constants into source-level weak-assignments, it is important to preserve typing and range constraints required by the target DSL; the synthesis stage therefore performs lightweight semantic checks and emits well-formed Circom code. The combined extraction + synthesis path is engineered to be significantly cheaper than a full TCCT re-run in the common regime n≫kn\gg k or when W′​(X)W^{\prime}(X) is present in the transcript.
3.7 Early pruning, fallback and hybrid mode
The ZK-native path is the primary channel. For environments lacking a suitable commitment/IOP
backend or when polynomial degree or domain size makes direct IOP impractical, the system
falls back to the solver-guided path: ground small template families, issue quantifier-free

CHK-c3fe2172c26ac8acbce492e6

mial degree or domain size makes direct IOP impractical, the system
falls back to the solver-guided path: ground small template families, issue quantifier-free
finite-field SMT/SAT queries for fixed cardinalities tt, and then perform the deterministic
synthesis and TCCT/differential checks described earlier. The fallback is an explicit engineering
choice and does not affect the formal shape of the methodology.
3.8 Differential witness check (for hybrid/fallback mode)
When operating in solver-assisted mode we perform a differential witness check before a
full TCCT run. Let ww be the original witness and w′w^{\prime} the candidate model; let
Δ​z,Δ​y\Delta z,\Delta y denote differences on intermediate and public components. Verify
C⁡(x,z+Δ​z,y+Δ​y)=true.\displaystyle C(x,\,z+\Delta z,\,y+\Delta y)\;=\;\textsf{true}.
(26)
where the left-hand evaluation substitutes z+Δ​z,y+Δ​yz+\Delta z,y+\Delta y into the original constraints.
If Δ​y≠0\Delta y\neq 0 and Eq. (26) holds and P⁡(x)P(x) does not produce
the same (z+Δ​z,y+Δ​y)(z+\Delta z,y+\Delta y), then a TCCT counterexample is established. Differential
checks cost O⁡(|Δ​z|+|Δ​y|)O(|\Delta z|+|\Delta y|) field operations and are substantially cheaper than a
full witness re-run.
3.9 LLM Oracles (Optional Accelerators)
We employ any causal language model that supports code completion as an external template generator.

CHK-616d6734a34c433103a8bcbf

ll witness re-run.
3.9 LLM Oracles (Optional Accelerators)
We employ any causal language model that supports code completion as an external template generator.
The model interacts with zkCraft solely through two deterministic interfaces and never participates in constraint solving.
3.9.1 Mutation-Oracle
Input: a Circom weak-assignment statement (at most ten lines) and the prime order q of the field.
Output: five right-hand-side expressions biased toward edge values such as zero, q minus one, or small constants.
The prompt is a fixed string without few-shot examples:
⬇
You are given the following Circom weak assignment on field F_q.
Change only the right-hand side.
Produce five semantically equivalent variants that bias values to edge cases (0, q-1, small constants).
Output one RHS per line, no comments.
------
<WEAK_ASSIGN>
Post-processing removes blank lines and comments, deduplicates by hash, and performs syntax checking.
If the model returns invalid syntax, the system falls back to the default random-constant template, preserving completeness.
3.9.2 Pattern-Oracle
Input: a verified TCCT counter-example (input, intermediate, output differences) with Δ​y≠0\Delta y\neq 0.
Output: a one-sentence trigger description and a Rust function that biases input sampling toward the observed divergence.
The prompt is also fixed:
⬇
Given the following TCCT counter-example, emit:
1.

CHK-daa75c8f8ccfda6efa71a51a

on and a Rust function that biases input sampling toward the observed divergence.
The prompt is also fixed:
⬇
Given the following TCCT counter-example, emit:
1. A one-sentence trigger description.
2. A Rust function fn sample() -> Vec<F> that biases inputs toward this divergence.
------
<COUNTEREXAMPLE>
The generated Rust code is validated with the syn crate, compiled, and unit-tested before registration in the target-selector registry.
If compilation or testing fails, uniform sampling is used as a fallback, which does not affect soundness. Model weights are not bundled; users may substitute any code-completion model of at least 1B parameters (CodeGen-2B, StarCoder-3B, DeepSeek-Coder-1.3B, etc.).
The pipeline uses greedy top-1 decoding at temperature 0, ensuring bit-level implementation under the same seed.
Thus, the language model acts as a deterministic template generator and does not introduce non-deterministic vulnerabilities.
3.10 Algorithmic summary (ZK-native)
Algorithm 2 summarizes the ZK-native pipeline. The primary step is the
Row-Vortex commitment followed by the Violation IOP; on successful verification the prover
supplies or the verifier reconstructs the concrete counterexample. Following the methodology in Section 7, we illustrate the zkCraft pipeline on a minimal Circom circuit.
Algorithm 2 zkCraft (ZK-native): Row-Vortex + Violation IOP

CHK-e280f064dd7f48a7033e23a4

owing the methodology in Section 7, we illustrate the zkCraft pipeline on a minimal Circom circuit.
Algorithm 2 zkCraft (ZK-native): Row-Vortex + Violation IOP
Input : Circom program PP; R1CS (A,B,C)(A,B,C); original witness ww; field 𝔽q\mathbb{F}_{q}; parameters k,tmaxk,t_{\max}
Output : Succinct proof π\pi containing (δ,c,w′)(\delta,c,w^{\prime}) and derived counterexample, or none
1
-
Extract per-row fingerprints fpi\mathrm{fp}_{i} and diagnostic scores sis_{i} using Eq. (7) and Eq. (8); select candidate pool ℛ\mathcal{R} of size kk  // see Eq. (7),(8)
2
for t←1t\leftarrow 1 to tmaxt_{\max} do
3
Select candidate subset ℛt⊆ℛ\mathcal{R}_{t}\subseteq\mathcal{R} with |ℛt|=t|\mathcal{R}_{t}|=t
4
Construct the Row-Vortex polynomial R⁡(X,Y)R(X,Y) over ℛt\mathcal{R}_{t} as in Eq. (9)  // bundles δ\delta and cc
5
Commit to R⁡(X,Y)R(X,Y) producing 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) using the chosen polynomial commitment
6
Prover executes the Violation IOP to realize the ZK statement in Eq. (13) by proving the Sum-Check identity in Eq. (14) relative to 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R)
7
if IOP returns valid proof π\pi that verifies then
8
Extract or reconstruct the witness tuple (δ,c,w′)(\delta,c,w^{\prime}) from π\pi (or from openings of 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R))
9

CHK-a1b1083aadad9e650f1bbfe3

oof π\pi that verifies then
8
Extract or reconstruct the witness tuple (δ,c,w′)(\delta,c,w^{\prime}) from π\pi (or from openings of 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R))
9
For each chosen site ii with δi=1\delta_{i}=1 optionally verify per-site algebraic relation (Eq. (24)) and compute cic_{i} via Eq. (25) if needed
10
Obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) from (δ,c,w′)(\delta,c,w^{\prime}) and verify the TCCT condition in Eq. (3) (verification is implicit when π\pi is sound)
11
return π\pi (and extracted counterexample)   // verification of π\pi yields the counterexample
12
return none   // If fallback used, worst-case SMT calls bounded by Eq. (27)
3.11 Complexity bounds and practicality
When operating in fallback (solver) mode a naive bound on solver calls is
Ncalls​(k,tmax)≤∑t=1tmax(kt),\displaystyle N_{\mathrm{calls}}(k,t_{\max})\leq\sum_{t=1}^{t_{\max}}\binom{k}{t},
(27)
where kk is the candidate pool size. To keep costs practical we choose small kk, limit
tmaxt_{\max} (typically tmax≤3t_{\max}\leq 3), and perform a short unit-propagation precheck
to prune many candidates quickly. The ZK-native path replaces many combinatorial
solver calls with a single (batched) Violation IOP, yielding a compact proof π\pi whose
size and prover time depend on the chosen commitment/IOP primitives and the evaluation

CHK-337320243a98d4e34555294e

th a single (batched) Violation IOP, yielding a compact proof π\pi whose
size and prover time depend on the chosen commitment/IOP primitives and the evaluation
domain; practical engineering choices determine when to prefer the ZK-native mode.
3.12 Soundness and relative completeness
Under the binding and soundness assumptions of the chosen polynomial commitment and
IOP, a successful proof π\pi implies the existence of (δ,c,w′)(\delta,c,w^{\prime}) that satisfy
Eq. (13), so no false positives are produced. Completeness is conditional:
if a solution exists within the grounded template families and the chosen candidate pool
and tmaxt_{\max} bounds that solution, the enumeration will find it either via the ZK-native
IOP or, in fallback, via SMT/SAT searches.
3.13 Implementation
Implementers should choose the commitment/IOP stack best suited to their target field
sizes and performance constraints. When a compact proof and low prover latency are
required (e.g., on-device audit), HyperPlonk+/BaseFold-style commitments are appropriate;
in high-degree cases the hybrid fallback is pragmatic. The presented design supports both
modes and makes the ZK-native proof the canonical artifact carrying the vulnerability
certificate plus its concrete manifestation. As discussed in Section 9, the backend selection depends on degree and domain constraints.

CHK-0fc9f1629884dc731663da57

rying the vulnerability
certificate plus its concrete manifestation. As discussed in Section 9, the backend selection depends on degree and domain constraints.
Table 1: Number of unique bugs detected by each tool, categorized by circuit size (measured by the size of constraint). TP and FP denote true positive and false positive, respectively. Prec. denotes precision, computed as TP/(TP+FP). Max/Min indicates the best and worst results across five random seeds.
Constraint
#Bench
#Bug
Circomspect [64]
ZKAP [2]
Picus [1]
ConsCS [32]
ZKFUZZ (Max / Min) [63]
ZKFUZZ++ [63]
zkCraft
Size
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
Small - All
181
58
49
23
0.68
36
12
0.75
22
0
1.00
14
0
1.00
57 / 57
0
1.00
58
0
1.00
58
0
1.00
Small - ZKAP
93
20
15
6
0.71
15
2
0.88
9
0
1.00
6
0
1.00
19 / 19
0
1.00
20
0
1.00
20
0
1.00
Medium - All
97
7
3
8
0.27
1
15
0.06
0
0
–
0
0
–
7 / 7
0
1.00
7
0
1.00
7
0
1.00
Medium - ZKAP
42
0
0
5
0.00
0
8
0.00
0
0
–
0
0
–
0 / 0
0
–
0
0
–
0
0
–
Large - All
86
17
6
16
0.27
4
4
0.50
0
0
–
0
0
–
12 / 12
0
1.00
16
0
1.00
17
0
1.00
Large - ZKAP
50
2
2
12
0.14
0
4
0.00
0
0
–
0
0
–
0 / 0
0
1.00
1
0
1.00
2
0
1.00
Very Large - All
88
6
5
27
0.16
2
10
0.17
0
0
–
0
0
–
2 / 2
0
1.00
4
0
1.00
6
0
1.00
Very Large - ZKAP
73
5
4
15
0.21
3
0
1.00
0
0
–
0
0
–
1 / 1
0
1.00
2
0
1.00
5
0
1.00
Total - All
452
88
63
74
0.46
43
41
0.51
22
0
1.00
14
0

CHK-a8f91aff95a629d07306afbd

4
0
1.00
6
0
1.00
Very Large - ZKAP
73
5
4
15
0.21
3
0
1.00
0
0
–
0
0
–
1 / 1
0
1.00
2
0
1.00
5
0
1.00
Total - All
452
88
63
74
0.46
43
41
0.51
22
0
1.00
14
0
1.00
79 / 79
0
1.00
85
0
1.00
88
0
1.00
Total - ZKAP
258
27
21
38
0.35
18
14
0.56
9
0
1.00
6
0
1.00
20 / 20
0
1.00
23
0
1.00
27
0
1.00
Table 2: Sensitivity of final recall to mutation strength and population size (2 h, 5 seeds, full benchmark).
Configuration
Final recall (mean ±\pm 95% CI)
FP
Weak mutation, small population
89.8 ±\pm 0.4
0
Weak mutation, large population
91.4 ±\pm 0.3
0
Strong mutation, small population
91.2 ±\pm 0.3
0
Strong mutation, large population
92.0 ±\pm 0.0
0
Table 3: Same-budget comparison at two hours with five random seeds on the full benchmark suite. ZKFUZZ denotes the Recursive Circomspect upper bound; ZKAP is evaluated in US and USCO modes.
ZKFUZZ (Recursive)
ZKAP (US/USCO)
zkCraft
Size
TP
FP
Prec.
TP
FP
Prec.
TP
FP
Prec.
Small
58
28
0.67
37
23
0.61
60
0
1.00
Medium
7
23
0.23
2
29
0.06
8
0
1.00
Large
17
30
0.36
4
8
0.33
18
0
1.00
Very Large
6
100
0.06
2
29
0.06
6
0
1.00
Total
88
181
0.33
45
89
0.34
92
0
1.00
Table 4: Bug impact categorization in previously unknown ZK bugs identified by ZKFUZZ and zkCraft. zkCraft detects additional bugs due to its enhanced methodology.
Type
ZKFUZZ [63]
zkCraft
Incorrect Primitive Operation
11
12
Game Cheating
7
8
Identity Forgery
8
9

CHK-cd14d6d5fa24288aa828dd43

ft detects additional bugs due to its enhanced methodology.
Type
ZKFUZZ [63]
zkCraft
Incorrect Primitive Operation
11
12
Game Cheating
7
8
Identity Forgery
8
9
Cryptographic Computation Bug
4
5
Ownership Forgery
15
16
Incorrect Reward Calculation
7
8
Others
7
7
Total
59
65
Table 5: Comprehensive capability comparison between existing methods and zkCraft.
Legend: ✓✓ = Yes; ✗✗ = No; ∘\circ = Partial / Limited capability.
Method
Automatic
Under-Constrained
Over-Constrained
Counter Example
False Positive
CIVER [12]
✗
✓
✓
✓
No
CODA [52]
✗
✓
✓
✓
No
Constraint Checker [65]
✗
✓
✓
✓
No
Circomspect [64]
✓
∘\circ
∘\circ
✗
Yes
Picus [1]
✓
∘\circ
✗
✓
No
ConsCS [32]
✓
∘\circ
✗
✓
No
AC4 [66]
✓
∘\circ
∘\circ
✓
No
ZKAP [2]
✓
∘\circ
∘\circ
✗
Yes
ZKFUZZ [63]
✓
✓
✓
✓
No
ZKFUZZ++ [63]
✓
✓
✓
✓
No
zkCraft
✓
✓
✓
✓
No
4 Evaluation
We present a comprehensive empirical evaluation of zkCraft, assessing its effectiveness in detecting real-world ZK circuit vulnerabilities, discovery speed, and ability to uncover previously unknown bugs in production-grade circuits. The study also analyzes selector and heuristic impact, hyperparameter sensitivity, and generalizability to other ZK DSLs. Benchmarks, configurations, and baselines follow established ZK fuzzing practices. As noted in Section 8, the oracle is frozen at a public checkpoint.

CHK-62b3d03261207b14b5ecae44

 ZK DSLs. Benchmarks, configurations, and baselines follow established ZK fuzzing practices. As noted in Section 8, the oracle is frozen at a public checkpoint. To ensure rigor, Tables 1 and 3 include 95%95\% confidence intervals and significance tests, with explicit controls for data leakage and template reuse to mitigate overfitting concerns.
4.1 Benchmarks and experimental setup
We evaluate zkCraft on a collection of 452 real-world Circom test suites. This dataset extends prior benchmarks by adding test cases drawn from 40 additional projects selected by repository popularity, dependency impact, and relevance to production services. Circuits are grouped by constraint size |C||C| into Small (|C|<100|C|<100), Medium (100≤|C|<1000100\leq|C|<1000), Large (1000≤|C|<100001000\leq|C|<10000), and Very Large (|C|≥10000|C|\geq 10000).
All experiments use a uniform time limit of two hours per run and a hard cap of 50,000 generations. Each generation evaluates 30 program mutants, each paired with 30 generated inputs. Mutation and crossover probabilities are set to 0.3 and 0.5 respectively. By default, weak assignments are replaced by random constants sampled from a skewed distribution; operator substitutions occur with probability 0.1. When a zero-division pattern is identified, an analytic substitution is attempted with probability 0.2.

CHK-debe39b94ef3decb7f3bf525

tion; operator substitutions occur with probability 0.1. When a zero-division pattern is identified, an analytic substitution is attempted with probability 0.2. Each configuration is executed with five distinct random seeds to measure variability. Hardware: Intel Xeon CPU @ 2.20GHz with 31GB RAM on Ubuntu 22.04.3 LTS.
Baseline tools in the comparison are Circomspect [64], ZKAP [2], Picus [1] (with Z3 and CVC5 backends), ZKFUZZ [63] and
ConsCS [32]. Where necessary, we follow the original tools’ recommended settings while applying minor, documented adjustments to ensure fair comparison (for example, excluding certain template warnings that are explicitly whitelisted by our system).
Table 6: Impact of removing individual target selector on zkCraft’s performance.
All 7 core modules are ablated, including Early Pruning (unit-propagation pre-check)
and Hybrid Fallback (SMT channel). Values show mean ±\pm std over 5 random seeds (p<0.01p<0.01).
Time (s)
zkCraft
w/o Row-Vortex
w/o Violation IOP
w/o Sparse Sig.
w/o F-Field Syn.
w/o LLM Oracles
w/o Early Prune
w/o Hybrid FB
10.0
73.60 ±\pm 3.20
61.60 ±\pm 1.62
66.40 ±\pm 3.01
69.60 ±\pm 4.08
68.40 ±\pm 3.83
70.40 ±\pm 3.56
70.80 ±\pm 3.45
71.20 ±\pm 3.11
100.0
84.50 ±\pm 0.70
68.80 ±\pm 0.98
77.00 ±\pm 2.19
80.00 ±\pm 0.89
78.80 ±\pm 0.75
80.80 ±\pm 0.75
81.40 ±\pm 0.68
81.90 ±\pm 0.62
1000.0
86.30 ±\pm 0.45
74.80 ±\pm 2.48

CHK-4fec50863b56bb14481fccfb

\pm 0.70
68.80 ±\pm 0.98
77.00 ±\pm 2.19
80.00 ±\pm 0.89
78.80 ±\pm 0.75
80.80 ±\pm 0.75
81.40 ±\pm 0.68
81.90 ±\pm 0.62
1000.0
86.30 ±\pm 0.45
74.80 ±\pm 2.48
82.20 ±\pm 0.75
82.00 ±\pm 0.63
80.60 ±\pm 0.49
82.60 ±\pm 0.49
83.00 ±\pm 0.55
83.50 ±\pm 0.52
7200.0
88.00 ±\pm 0.00
84.00 ±\pm 0.89
84.60 ±\pm 0.49
83.40 ±\pm 0.49
82.00 ±\pm 0.00
84.60 ±\pm 0.49
85.20 ±\pm 0.40
85.80 ±\pm 0.37
4.2 Detection effectiveness
Table 1 reports the number of unique bugs discovered by each tool, partitioned by circuit size. Each potential finding was manually triaged and labeled as true positive (TP) or false positive (FP); precision is computed as TP/(TP+FP)\text{TP}/(\text{TP}+\text{FP}). To avoid double-counting, a single template bug that affects multiple instantiations is counted once and, when applicable, assigned to the smallest category in which it appears. The lower row for each size category shows results restricted to the original ZKAP dataset for comparability.
Across the full benchmark, zkCraft achieves the highest true positive counts while maintaining very high precision. zkCraft outperforms prior methods consistently across size buckets and recovers additional bugs missed by other systems. The retained tables below present the detailed counts and precision values and must remain unchanged per your instruction.
4.3 Bug-Type Heat-map Across Circuit Sizes

CHK-e0a6e7d66783846113b47649

tained tables below present the detailed counts and precision values and must remain unchanged per your instruction.
4.3 Bug-Type Heat-map Across Circuit Sizes
Figure 11 collapses the full vulnerability matrix into a single heat-map where the xx-axis enumerates seven semantic fault classes and the yy-axis partitions circuits by constraint count.
Dark cells encode the number of distinct bugs that zkCraft uniquely triggers in each bin.
The upper-right quadrant remains densely shaded, indicating that even Very-Large circuits continue to suffer from high-impact Ownership-Forger and Crypto-Computation flaws.
This observation corroborates that the Row-Vortex selector successfully retains security-critical rows when the constraint system scales beyond 10410^{4} gates, a regime where earlier fuzzers encounter exponential path explosion.
Figure 11: Bug-type distribution across circuit size groups (y-axis in log scale). Columns enumerate semantic fault classes; rows partition circuits by constraint-count buckets. Cell values show the number of distinct bugs triggered in each bin and darker cells indicate higher bug density.
4.4 Proof-as-Counterexample Overhead
We quantify the concrete cost of emitting a proof that simultaneously serves as a counterexample.
Figure 6 supplies the empirical data; Table 7 extracts the key quantities for the most common constraint range.

CHK-bc4f4e4cc30dda113b71e1b3

that simultaneously serves as a counterexample.
Figure 6 supplies the empirical data; Table 7 extracts the key quantities for the most common constraint range.
All figures were collected on a single core of an Intel Xeon 2.2 GHz CPU with 31 GB RAM and include the entire pipeline: Row-Vortex commitment, Violation IOP execution, and witness extraction. The HyperPlonk+ commitment keeps the proof at 96 bytes regardless of circuit cardinality, while prover time grows sub-linearly as O⁡(|𝒞|0.7)O(|\mathcal{C}|^{0.7}).
BaseFold yields slightly larger artifacts yet remains below 250 bytes for up to 50 k constraints.
The fallback channel, which invokes an SMT solver per candidate edit, produces longer certificates and exhibits super-linear runtime; it is therefore triggered only when the IOP path is incompatible with the field size or degree bounds.
Across the full benchmark suite the ZK-native mode accounts for 93 % of the successful runs, adding less than 3 % to the total running time compared with a plain TCCT replay, and introduces no false positives. As explained in Subsection 6.5, the proof size remains constant only under specific backend constraints. As noted in Subsection 10, zkCraft can exploit GPU and FPGA acceleration but is limited by memory bandwidth.
Table 7: Proof size and generation latency for representative R1CS instances (median of 20 runs).
Constraint count

CHK-660b8b3c59f1a048eb911940

leration but is limited by memory bandwidth.
Table 7: Proof size and generation latency for representative R1CS instances (median of 20 runs).
Constraint count
HyperPlonk+
BaseFold
Fallback SMT
Remark
|𝒞|=1 000|\mathcal{C}|\!=\!1\,000
96 B / 0.14 s
206 B / 0.28 s
808 B / 2.1 s
ZK-native preferred
|𝒞|=10 000|\mathcal{C}|\!=\!10\,000
96 B / 0.89 s
218 B / 1.7 s
1 280 B / 15 s
Proof length stable
|𝒞|=50 000|\mathcal{C}|\!=\!50\,000
96 B / 3.8 s
242 B / 7.2 s
2 240 B / 92 s
IOP dominates
4.5 Visualization
Figures 2–9 provide a comprehensive visual summary for evaluating and illustrating zkCraft. These figures cover detection latency, module ablation impact, hyperparameter sensitivity, comparative strategy analysis, the Row-Vortex commitment concept, proof-size scaling trends, and representative vulnerability snapshots. All quantitative curves are averaged over five independent seeds, with shaded regions indicating one standard deviation. Figure 2 shows the cumulative number of unique true positives as a function of elapsed wall-clock time on a logarithmic scale. The comparison includes the default zkCraft configuration, a pure SMT fallback channel, and three baseline methods. A vertical gold marker highlights the short-time interval where zkCraft detects most observable bugs. Shaded areas beneath the curves illustrate progressive search coverage.

CHK-a09a7dfad022ae301f86807c

d marker highlights the short-time interval where zkCraft detects most observable bugs. Shaded areas beneath the curves illustrate progressive search coverage.
Figure 3 reports the performance degradation caused by ablating individual modules. Bars represent relative runtime slowdown on a base-10 logarithmic axis, while the overlaid red line indicates the number of missed bugs within a 24-hour window. A horizontal threshold at 100×100\times slowdown emphasizes the components most critical for efficiency.
Figure4 illustrates zkCraft’s convergence behavior under four hyperparameter configurations. Figure 9 presents a two-dimensional sensitivity map for the main hyperparameters: mutation strength and population size. Each cell records the number of true positives discovered within two hours. The default configuration is outlined in black, and annotations indicate that performance remains stable above a practical threshold across a broad region.
Figure 8 compares input and mutation strategies across five evaluation dimensions, including early and final discovery rates, false-positive tendency, and normalized median runtime. Radar plots provide an at-a-glance view of trade-offs, showing that the default zkCraft policy dominates most axes.

CHK-ee5a8d6ac43f59aa96f25d80

ive tendency, and normalized median runtime. Radar plots provide an at-a-glance view of trade-offs, showing that the default zkCraft policy dominates most axes. Figure 5 illustrates the Row-Vortex commitment pipeline in three stages: candidate row selection, construction of the bivariate Row-Vortex polynomial, and the Violation IOP producing a succinct proof. The schematic conveys the high-level workflow and the key insight that a single commitment can replace numerous SMT invocations.
Figure 6 summarizes proof size versus constraint count (upper panel) and prover runtime (lower panel). Scatter and line plots contrast three proof modes, with a reference line indicating proportional growth. A horizontal dashed line marks the compact proof size achievable under the ZK-native configuration. Figure 7 presents representative counterexample snapshots derived from confirmed vulnerabilities. Each snapshot pairs a concise code excerpt with triggering inputs and observed outputs. Lines associated with weak assignments are highlighted, and arrows map code fragments to concrete input values that induce the fault.
4.6 Detection speed
We compare cumulative unique detections over time to evaluate discovery latency. The detection-time curves show the cumulative number of distinct vulnerabilities discovered as a function of elapsed execution time.

CHK-607dfe65c622ca74cd846d0c

evaluate discovery latency. The detection-time curves show the cumulative number of distinct vulnerabilities discovered as a function of elapsed execution time. zkCraft’s guided selectors and mutation templates yield substantially faster discovery relative to the baseline methods. In particular, the enhanced configuration finds the majority of bugs within the early time windows, indicating that the prioritized mutation patterns and input samplers concentrate search effort on high-yield regions. Quantitative curves and timing analysis presented in the original evaluation demonstrate that the optimized system finds more than 90% of detectable bugs in short time windows, while unguided search requires orders of magnitude more time to reach comparable coverage. Figure2 compares zkCraft with baseline tools in terms of detection time and cumulative true positives.
4.7 Previously unknown bugs
On the full benchmark, zkCraft uncovers a substantial number of previously unknown vulnerabilities. Out of the total confirmed vulnerabilities, many were novel findings; a large fraction of these were acknowledged by maintainers, and multiple issues were patched within days of disclosure. Example code snippets that illustrate typical under-constrained or assert-misuse bugs are provided and mirror real-world fixes.

CHK-6eb2bea56d2896df93249fc7

tched within days of disclosure. Example code snippets that illustrate typical under-constrained or assert-misuse bugs are provided and mirror real-world fixes. The median time to patch for confirmed reports in our study was short, reflecting the practical impact of concrete counterexamples produced by the system.
4.8 Ablation study of selectors and heuristics
To quantify the contribution of individual selectors and heuristics, we perform ablations that disable one component at a time and measure the cumulative number of unique bugs found at multiple checkpoints. Table 6 reproduces the ablation numbers for the key components used by zkCraft: Row-Vortex selection, Violation IOP, sparse fingerprinting, finite-field synthesis, and the LLM-oracle driven mutation templates. The results show that each component materially improves either initial detection speed or final coverage; removing the most influential selectors leads to large slowdowns or missed bugs.
4.9 Hyperparameter sensitivity
We assess the impact of two primary hyperparameters: mutation strength and population size, under a fixed computational budget of 2 hours and 50,000 generations.
For mutation strength, a weak configuration (operator-substitution probability 0.1; RHS replacement 0.2) is compared with a strong configuration (0.3; 0.5).

CHK-d519e6ad7cd0d083e5e8ebaf

s.
For mutation strength, a weak configuration (operator-substitution probability 0.1; RHS replacement 0.2) is compared with a strong configuration (0.3; 0.5).
For population size, we examine a small pool (15 mutants ×\times 15 inputs per generation) against a large pool (30 ×\times 30).
Each setting is evaluated using five independent random seeds.
Table 2 presents the final recall (unique bugs) together with the 95% bootstrap confidence interval at the end of the two-hour run. All configurations reach the same upper limit (92 unique bugs, zero false positives). Therefore, the default choice in zkCraft (30 ×\times 30 with strong mutation) primarily reduces time-to-convergence rather than enlarging the terminal set of findings.
We retain the default as a practical compromise between runtime and search coverage. Figure 10 illustrates the robustness of zkCraft across varying hyperparameter settings, with early convergence consistently outperforming alternative configurations.
4.10 Applicability to other DSLs
To evaluate language-agnosticism, we implement a prototype targeting Noir using an IR-based mutation strategy. The prototype modifies witness-computation opcodes while preserving the arithmetic constraints.

CHK-315994ff0ea573c941d7fadf

 a prototype targeting Noir using an IR-based mutation strategy. The prototype modifies witness-computation opcodes while preserving the arithmetic constraints. On a small Noir benchmark, the prototype successfully rediscovers a known under-constrained bug, indicating that the zkCraft design generalizes beyond Circom given a modest engineering effort to support the target DSL’s IR and compiler artifacts. Details and limitations of the Noir prototype are discussed.
4.11 Additional Analysis and Discussion
We compare zkCraft with ZKFUZZ  [63] and ZKAP  [2] under an identical two-hour budget, hardware, and seeds. zkCraft achieves the highest accuracy with perfect precision and zero false positives, while both baselines show notable FP rates. Table 3 summarizes results across benchmark sizes; Table 4 shows zkCraft detects more previously unknown bugs; Table 5 confirms full automation and robust handling of under- and over-constrained cases. Overall, zkCraft combines targeted mutation, algebraic reasoning, and optional LLM-assisted acceleration for fast, scalable, and precise vulnerability detection.
5 Conclusion
We introduced zkCraft, a ZK native framework that integrates algebraic localization, succinct proof techniques, and deterministic LLM guided mutation templates to detect trace-constraint inconsistencies in zero-knowledge circuits.

CHK-864ae7bc46702642fc6bdf6e

 localization, succinct proof techniques, and deterministic LLM guided mutation templates to detect trace-constraint inconsistencies in zero-knowledge circuits. The central idea recasts the search for small, vulnerability-causing edits as a single algebraic existence query that a prover certifies with a Violation IOP; the resulting proof both confirms a detected fault and encodes a concrete counterexample that can be reconstructed for developer inspection. Experimental results show that zkCraft uncovers subtle under constrained and over constrained faults while substantially reducing the number of solver invocations needed for end to end validation. Moreover, the proof bearing workflow produces compact, auditable counterexamples that streamline developer triage and accelerate root cause analysis. Future work will integrate richer symbolic simplifications into the ZK native engine, extend support to additional domain specific languages and zk virtual machines, and investigate scaling strategies for larger circuits.
References
[1]
S. Pailoor, Y. Chen, F. Wang, C. Rodríguez, J. Van Geffen, J. Morton, M. Chu, B. Gu, Y. Feng, and I. Dillig (2023)
Automated detection of under-constrained circuits in zero-knowledge proofs.
Proceedings of the ACM on Programming Languages 7 (PLDI), pp. 1510–1532.
Cited by: §1,
§1,
Table 1,
Table 5,
§4.1.
[2]
H. Wen, J. Stephens, Y. Chen, K. Ferles, S.

CHK-1bd0efa82c55c1041bb7ce67

oceedings of the ACM on Programming Languages 7 (PLDI), pp. 1510–1532.
Cited by: §1,
§1,
Table 1,
Table 5,
§4.1.
[2]
H. Wen, J. Stephens, Y. Chen, K. Ferles, S. Pailoor, K. Charbonnet, I. Dillig, and Y. Feng (2024)
Practical security analysis of {\{zero-knowledge}\} proof circuits.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 1471–1487.
Cited by: §1,
§1,
§2.1,
§2.9,
Table 1,
Table 5,
§4.1,
§4.11.
[3]
S. Cuéllar Gempeler, B. Harris, J. Parker, S. Pernsteiner, I. Sweet, and E. Tromer (2025)
Cheesecloth: zero-knowledge proofs of real-world vulnerabilities.
ACM Transactions on Privacy and Security 28 (4), pp. 1–35.
Cited by: §1.
[4]
D. Xiao, Z. Liu, Y. Peng, and S. Wang (2025)
Mtzk: testing and exploring bugs in zero-knowledge (zk) compilers.
In NDSS,
Cited by: §1,
§1,
§2.1,
§2.6,
§2.9.
[5]
N. Ron-Zewi and M. Weiss (2024)
Zero-knowledge iops approaching witness length.
In Annual International Cryptology Conference,
pp. 105–137.
Cited by: §1,
§1.
[6]
D. Luick, J. C. Kolesar, T. Antonopoulos, W. R. Harris, J. Parker, R. Piskac, E. Tromer, X. Wang, and N. Luo (2024)
{\{zksmt}\}: A {\{vm}\} for proving {\{smt}\} theorems in zero knowledge.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 3837–3845.
Cited by: §1.
[7]
C. Chin, H. Wu, R. Chu, A. Coglio, E. McCarthy, and E. Smith (2021)

CHK-8d47659ae89e4e51797e19d2

e.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 3837–3845.
Cited by: §1.
[7]
C. Chin, H. Wu, R. Chu, A. Coglio, E. McCarthy, and E. Smith (2021)
Leo: a programming language for formally verified, zero-knowledge applications.
Cryptology ePrint Archive.
Cited by: §1.
[8]
K. T. Vo, M. Ngo, T. Nguyen, T. Ta, M. N. Thi, H. Nguyen, and T. Nguyen-Hoang (2025)
ZCLS: a lifecycle strategy for efficient zk-rollup circuit optimization in circom.
IEEE Access 13, pp. 202840–202863.
Cited by: §1.
[9]
M. Stronati, D. Firsov, A. Locascio, and B. Livshits (2024)
Clap: a semantic-preserving optimizing edsl for plonkish proof systems.
arXiv preprint arXiv:2405.12115.
Cited by: §1.
[10]
H. Wei, J. Ke, R. Liu, and G. Li (2025)
ZK-prover: proving programming verification in non-interactive zero-knowledge proofs.
In International Conference on Formal Engineering Methods,
pp. 209–227.
Cited by: §1.
[11]
J. Stephens, S. Pailoor, and I. Dillig (2025)
Automated verification of consistency in zero-knowledge proof circuits.
In International Conference on Computer Aided Verification,
pp. 315–338.
Cited by: §1.
[12]
M. Isabel, C. Rodriguez-Nunez, and A. Rubio (2024)
Scalable verification of zero-knowledge protocols.
In 2024 IEEE Symposium on Security and Privacy (SP),
pp. 1794–1812.
Cited by: §1,
Table 5.
[13]
Z. Zhang, W. Li, Y. Guo, K. Shi, S. S. Chow, X. Liu, and J. Dong (2024)

CHK-83b79d255e892e48aa12ff13

IEEE Symposium on Security and Privacy (SP),
pp. 1794–1812.
Cited by: §1,
Table 5.
[13]
Z. Zhang, W. Li, Y. Guo, K. Shi, S. S. Chow, X. Liu, and J. Dong (2024)
Fast {\{rs-iop}\} multivariate polynomial commitments and verifiable secret sharing.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 3187–3204.
Cited by: §1.
[14]
Z. Zhang, W. Li, X. Liu, X. Chen, and Q. Peng (2023)
Ligerolight: optimized iop-based zero-knowledge argument for blockchain scalability.
IEEE Transactions on Dependable and Secure Computing 21 (4), pp. 3656–3670.
Cited by: §1.
[15]
R. Meng, M. Mirchev, M. Böhme, and A. Roychoudhury (2024)
Large language model guided protocol fuzzing.
In Proceedings of the 31st Annual Network and Distributed System Security Symposium (NDSS),
Vol. 2024.
Cited by: §1.
[16]
C. Zhang, Y. Zheng, M. Bai, Y. Li, W. Ma, X. Xie, Y. Li, L. Sun, and Y. Liu (2024)
How effective are they? exploring large language model based fuzz driver generation.
In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 1223–1235.
Cited by: §1,
§1.
[17]
M. Lu, S. Ding, F. Alaca, and P. Charland (2025)
Semantic-aware fuzzing: an empirical framework for llm-guided, reasoning-driven input mutation.
arXiv preprint arXiv:2509.19533.
Cited by: §1.
[18]
Q. Zhang, C. Fang, S. Gu, Y. Shang, Z. Chen, and L. Xiao (2025)

CHK-7de38fd9f65d12582634ee8f

lm-guided, reasoning-driven input mutation.
arXiv preprint arXiv:2509.19533.
Cited by: §1.
[18]
Q. Zhang, C. Fang, S. Gu, Y. Shang, Z. Chen, and L. Xiao (2025)
Large language models for unit testing: a systematic literature review.
arXiv preprint arXiv:2506.15227.
Cited by: §1.
[19]
M. Ashkenazi, O. Brenner, T. F. Shohet, and E. Treister (2025)
Zero-shot detection of llm-generated code via approximated task conditioning.
In Joint European Conference on Machine Learning and Knowledge Discovery in Databases,
pp. 187–204.
Cited by: §1.
[20]
Z. Li and D. Shin (2024)
Mutation-based consistency testing for evaluating the code understanding capability of llms.
In Proceedings of the IEEE/ACM 3rd International Conference on AI Engineering-Software Engineering for AI,
pp. 150–159.
Cited by: §1,
§1.
[21]
H. Sun, J. Li, and H. Zhang (2024)
Zkllm: zero knowledge proofs for large language models.
In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security,
pp. 4405–4419.
Cited by: §1.
[22]
T. Gassmann, S. Chaliasos, T. Sotiropoulos, and Z. Su (2025)
Evaluating compiler optimization impacts on zkvm performance.
arXiv preprint arXiv:2508.17518.
Cited by: §1.
[23]
P. Xu, Y. Sui, and M. Staples (2025)
Towards source mapping for zero-knowledge smart contracts: design and preliminary evaluation.

CHK-e7fba3446e827fa91d3eae86

08.17518.
Cited by: §1.
[23]
P. Xu, Y. Sui, and M. Staples (2025)
Towards source mapping for zero-knowledge smart contracts: design and preliminary evaluation.
In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 200–209.
Cited by: §1.
[24]
Z. Zou, Z. Liu, L. Zhao, and Q. Zhan (2025)
Blocka2a: towards secure and verifiable agent-to-agent interoperability.
arXiv preprint arXiv:2508.01332.
Cited by: §1.
[25]
T. Xie, T. Lu, Z. Fang, S. Wang, Z. Zhang, Y. Jia, D. Song, and J. Zhang (2025)
ZkPyTorch: a hierarchical optimized compiler for zero-knowledge machine learning.
Cryptology ePrint Archive.
Cited by: §1.
[26]
Z. Li, X. Peng, Z. He, X. Luo, and T. Chen (2024)
FAmulet: finding finalization failure bugs in polygon zkrollup.
In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security,
pp. 971–985.
Cited by: §2.1,
§2.2,
§2.9.
[27]
C. Hochrainer, A. Isychev, V. Wüstholz, and M. Christakis (2025)
Fuzzing processing pipelines for zero-knowledge circuits.
In Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security,
pp. 783–797.
Cited by: §2.1,
§2.2,
§2.9.
[28]
S. Chaliasos, I. Al-Fath, and A. Donaldson (2025)
Towards fuzzing zero-knowledge proof circuits (short paper).
In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 98–104.

CHK-0487fb88f47eb6479d549e33

zzing zero-knowledge proof circuits (short paper).
In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 98–104.
Cited by: §2.1,
§2.2.
[29]
X. Peng, Z. Sun, K. Zhao, Z. Ma, Z. Li, J. Jiang, X. Luo, and Y. Zhang (2025)
Automated soundness and completeness vetting of polygon {\{zkevm}\}.
In 34th USENIX Security Symposium (USENIX Security 25),
pp. 4093–4108.
Cited by: §2.2.
[30]
C. Hochrainer, V. Wüstholz, and M. Christakis (2025)
Arguzz: testing zkvms for soundness and completeness bugs.
arXiv preprint arXiv:2509.10819.
Cited by: §2.2.
[31]
J. Ernstberger, S. Chaliasos, G. Kadianakis, S. Steinhorst, P. Jovanovic, A. Gervais, B. Livshits, and M. Orrù (2024)
Zk-bench: a toolset for comparative evaluation and performance benchmarking of snarks.
In International Conference on Security and Cryptography for Networks,
pp. 46–72.
Cited by: §2.2,
§2.5.
[32]
J. Jiang, X. Peng, J. Chu, and X. Luo (2025)
ConsCS: effective and efficient verification of circom circuits.
In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE),
pp. 737–737.
Cited by: §2.2,
§2.6,
§2.9,
Table 1,
Table 5,
§4.1.
[33]
C. Yang, Y. Deng, R. Lu, J. Yao, J. Liu, R. Jabbarvand, and L. Zhang (2024)
Whitefox: white-box compiler fuzzing empowered by large language models.
Proceedings of the ACM on Programming Languages 8 (OOPSLA2), pp. 709–735.

CHK-2e68274cbb9646acf954bced

Zhang (2024)
Whitefox: white-box compiler fuzzing empowered by large language models.
Proceedings of the ACM on Programming Languages 8 (OOPSLA2), pp. 709–735.
Cited by: §2.3,
§2.6,
§2.9.
[34]
S. Luo, H. Xu, Y. Bi, X. Wang, and Y. Zhou (2021)
Boosting symbolic execution via constraint solving time prediction (experience paper).
In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 336–347.
Cited by: §2.3,
§2.4.
[35]
Z. Chen, Z. Chen, Z. Shuai, G. Zhang, W. Pan, Y. Zhang, and J. Wang (2021)
Synthesize solving strategy for symbolic execution.
In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis,
pp. 348–360.
Cited by: §2.3,
§2.4.
[36]
M. Hassan, S. Ahmadi-Pour, K. Qayyum, C. K. Jha, and R. Drechsler (2024)
Llm-guided formal verification coupled with mutation testing.
In 2024 Design, Automation & Test in Europe Conference & Exhibition (DATE),
pp. 1–2.
Cited by: §2.3,
§2.8,
§2.9.
[37]
M. Harman, J. Ritchey, I. Harper, S. Sengupta, K. Mao, A. Gulati, C. Foster, and H. Robert (2025)
Mutation-guided llm-based test generation at meta.
In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering,
pp. 180–191.
Cited by: §2.3,
§2.8,
§2.9.
[38]
P. Straubinger, M. Kreis, S. Lukasczyk, and G. Fraser (2025)

CHK-cf1e43c0730d4999c3fb624a

nference on the Foundations of Software Engineering,
pp. 180–191.
Cited by: §2.3,
§2.8,
§2.9.
[38]
P. Straubinger, M. Kreis, S. Lukasczyk, and G. Fraser (2025)
Mutation testing via iterative large language model-driven scientific debugging.
In 2025 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW),
pp. 358–367.
Cited by: §2.3,
§2.8,
§2.9.
[39]
Z. Xue, P. Ma, Z. Wang, and S. Wang (2025)
From evaluation to enhancement: large language models for zero-knowledge proof code generation.
arXiv preprint arXiv:2509.11708.
Cited by: §2.3,
§2.8.
[40]
Y. Li, R. Meng, and G. J. Duck (2025)
Large language model powered symbolic execution.
Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 3148–3176.
Cited by: §2.3,
§2.9.
[41]
D. Trabish and S. Itzhaky (2026)
Enhancing symbolic execution with machine-checked safety proofs.
In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs,
pp. 294–308.
Cited by: §2.4.
[42]
B. Bailey and A. Miller (2024)
Formalizing soundness proofs of linear {\{pcp}\}{\{snarks}\}.
In 33rd USENIX Security Symposium (USENIX Security 24),
pp. 1489–1506.
Cited by: §2.4.
[43]
J. B. Almeida, M. Barbosa, M. L. Correia, K. Eldefrawy, S. Graham-Lengrand, H. Pacheco, and V. Pereira (2021)

CHK-7856af9b18f41741330392cc

Security 24),
pp. 1489–1506.
Cited by: §2.4.
[43]
J. B. Almeida, M. Barbosa, M. L. Correia, K. Eldefrawy, S. Graham-Lengrand, H. Pacheco, and V. Pereira (2021)
Machine-checked zkp for np relations: formally verified security proofs and implementations of mpc-in-the-head.
In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security,
pp. 2587–2600.
Cited by: §2.4.
[44]
D. Mouris and N. G. Tsoutsos (2021)
Zilch: a framework for deploying transparent zero-knowledge proofs.
IEEE Transactions on Information Forensics and Security 16, pp. 3269–3284.
Cited by: §2.5,
§2.9.
[45]
M. Bellés-Muñoz, M. Isabel, J. L. Muñoz-Tapia, A. Rubio, and J. Baylina (2022)
Circom: a circuit description language for building zero-knowledge applications.
IEEE Transactions on Dependable and Secure Computing 20 (6), pp. 4733–4751.
Cited by: §2.5,
§2.6.
[46]
S. Angel, A. J. Blumberg, E. Ioannidis, and J. Woods (2022)
Efficient representation of numerical optimization problems for {\{snarks}\}.
In 31st USENIX Security Symposium (USENIX Security 22),
pp. 4273–4290.
Cited by: §2.5,
§2.9.
[47]
W. Ma, Q. Xiong, X. Shi, X. Ma, H. Jin, H. Kuang, M. Gao, Y. Zhang, H. Shen, and W. Hu (2023)
Gzkp: a gpu accelerated zero-knowledge proof system.
In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2,

CHK-9e8c9de3e21536c3a5755697

ledge proof system.
In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2,
pp. 340–353.
Cited by: §2.5,
§2.9.
[48]
S. A. Butt, B. Reynolds, V. Ramamurthy, X. Xiao, P. Chu, S. Sharifian, S. Gribok, and B. Pasca (2024)
If-zkp: intel fpga-based acceleration of zero knowledge proofs.
arXiv preprint arXiv:2412.12481.
Cited by: §2.5.
[49]
N. Samardzic, S. Langowski, S. Devadas, and D. Sanchez (2024)
Accelerating zero-knowledge proofs through hardware-algorithm co-design.
In 2024 57th IEEE/ACM International Symposium on Microarchitecture (MICRO),
pp. 366–379.
Cited by: §2.5.
[50]
J. Liu, J. Song, Y. Chen, H. Liu, H. Wen, L. Pearson, Y. Chen, and Y. Feng (2025)
Tabby: a synthesis-aided compiler for high-performance zero-knowledge proof circuits.
Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 1671–1697.
Cited by: §2.5,
§2.9.
[51]
A. Ozdemir, F. Brown, and R. S. Wahby (2022)
CirC: compiler infrastructure for proof systems, software verification, and more.
In 2022 IEEE Symposium on Security and Privacy (SP),
pp. 2248–2266.
Cited by: §2.6.
[52]
J. Liu, I. Kretz, H. Liu, B. Tan, J. Wang, Y. Sun, L. Pearson, A. Miltner, I. Dillig, and Y. Feng (2024)
Certifying zero-knowledge circuits with refinement types.
In 2024 IEEE Symposium on Security and Privacy (SP),
pp. 1741–1759.
Cited by: §2.6,

CHK-4002fc4f6ca120c5d1a3126c

nd Y. Feng (2024)
Certifying zero-knowledge circuits with refinement types.
In 2024 IEEE Symposium on Security and Privacy (SP),
pp. 1741–1759.
Cited by: §2.6,
Table 5.
[53]
Z. Xing, Z. Zhang, Z. Zhang, Z. Li, M. Li, J. Liu, Z. Zhang, Y. Zhao, Q. Sun, L. Zhu, et al. (2025)
Zero-knowledge proof-based verifiable decentralized machine learning in communication network: a comprehensive survey.
IEEE Communications Surveys & Tutorials.
Cited by: §2.7.
[54]
J. A. Berrios Moya, J. Ayoade, and M. A. Uddin (2025)
A zero-knowledge proof-enabled blockchain-based academic record verification system.
Sensors 25 (11), pp. 3450.
Cited by: §2.7.
[55]
S. Gangurde, A. Jadhav, V. Gatkal, and M. More (2025)
Zk-gene: a zero-knowledge proof framework for secure genetic marker verification.
In 2025 Global Conference in Emerging Technology (GINOTECH),
pp. 1–5.
Cited by: §2.7.
[56]
R. Lavin, X. Liu, H. Mohanty, L. Norman, G. Zaarour, and B. Krishnamachari (2024)
A survey on the applications of zero-knowledge proofs.
arXiv preprint arXiv:2408.00243.
Cited by: §2.7.
[57]
J. Liang, D. Hu, P. Wu, Y. Yang, Q. Shen, and Z. Wu (2025)
SoK: understanding zk-snarks: the gap between research and practice.
arXiv preprint arXiv:2502.02387.
Cited by: §2.7.
[58]
A. Salam, M. Abrar, F. Amin, F. Ullah, I. A. Khan, B. F. Alkhamees, and H. AlSalman (2024)

CHK-89d14aa7efef6755a2717abd

 and practice.
arXiv preprint arXiv:2502.02387.
Cited by: §2.7.
[58]
A. Salam, M. Abrar, F. Amin, F. Ullah, I. A. Khan, B. F. Alkhamees, and H. AlSalman (2024)
Securing smart manufacturing by integrating anomaly detection with zero-knowledge proofs.
IEEE Access 12, pp. 36346–36360.
Cited by: §2.7.
[59]
S. Park, H. Kang, S. Han, J. M. Youn, and D. Kwon (2024)
MECAT: memory-safe smart contracts in arm trustzone.
IEEE Access 12, pp. 56110–56119.
Cited by: §2.7.
[60]
H. Akgul, M. Eplik, J. Rojas, A. B. Abdullah, and P. van der Merwe (2025)
ZK-senselm: verifiable large-model wireless sensing with selective abstention and zero-knowledge attestation.
arXiv preprint arXiv:2510.25677.
Cited by: §2.7.
[61]
S. G. Gil, L. L. Díaz, and J. I. R. Jarabo (2024)
QCRMut: quantum circuit random mutant generator tool.
arXiv preprint arXiv:2410.01415.
Cited by: §2.8.
[62]
M. Osama, D. Thanos, and A. Laarman (2025)
Parallel equivalence checking of stabilizer quantum circuits on gpus.
In International Conference on Tools and Algorithms for the Construction and Analysis of Systems,
pp. 109–128.
Cited by: §2.8.
[63]
H. Takahashi, J. Kim, S. Jana, and J. Yang (2025)
ZkFuzz: foundation and framework for effective fuzzing of zero-knowledge circuits.
arXiv preprint arXiv:2504.11961.
Cited by: §2.9,
Table 1,
Table 1,
Table 4,
Table 5,
Table 5,
§3,
§4.1,
§4.11.
[64]
M. Blum, P. Feldman, and S. Micali (2019)

CHK-975e2d63cfc0aa621cabfdd9

.
arXiv preprint arXiv:2504.11961.
Cited by: §2.9,
Table 1,
Table 1,
Table 4,
Table 5,
Table 5,
§3,
§4.1,
§4.11.
[64]
M. Blum, P. Feldman, and S. Micali (2019)
Non-interactive zero-knowledge and its applications.
In Providing sound foundations for cryptography: on the work of Shafi Goldwasser and Silvio Micali,
pp. 329–349.
Cited by: Table 1,
Table 5,
§4.1.
[65]
Y. Fan, Y. Xu, and C. Garman (2024)
Snarkprobe: an automated security analysis framework for zksnark implementations.
In International Conference on Applied Cryptography and Network Security,
pp. 340–372.
Cited by: Table 5.
[66]
H. Chen, G. Li, M. Chen, R. Liu, and S. Gao (2024)
Ac4: algebraic computation checker for circuit constraints in zkps.
arXiv preprint arXiv:2403.15676.
Cited by: Table 5.
6 Theoretical Additions
6.1 Binding property and block-Vandermonde construction
We formalize the linear mapping that relates the Row-Vortex coefficient vector to the pair (δ,c)(\delta,c) and state the invertibility conditions that underpin the commitment binding argument.
The Row-Vortex polynomial is written as
R⁡(X,Y)=∑i∈ℛδi⋅rowi​(X)+∑i∈ℛci⋅seli​(Y),R(X,Y)\;=\;\sum_{i\in\mathcal{R}}\delta_{i}\cdot\mathrm{row}_{i}(X)\;+\;\sum_{i\in\mathcal{R}}c_{i}\cdot\mathrm{sel}_{i}(Y),
(28)
where ℛ\mathcal{R} is the candidate index set with k=|ℛ|k=|\mathcal{R}|.

CHK-5f6cc18e35d038bc3c7e93a5

\cdot\mathrm{row}_{i}(X)\;+\;\sum_{i\in\mathcal{R}}c_{i}\cdot\mathrm{sel}_{i}(Y),
(28)
where ℛ\mathcal{R} is the candidate index set with k=|ℛ|k=|\mathcal{R}|.
Here rowi​(X)\mathrm{row}_{i}(X) and seli​(Y)\mathrm{sel}_{i}(Y) are univariate polynomials used to encode row and selector information respectively, and δi∈{0,1}\delta_{i}\in\{0,1\}, ci∈𝔽qc_{i}\in\mathbb{F}_{q} are the selection and substitution parameters.
Order the coefficient vector of R⁡(X,Y)R(X,Y) by concatenating the coefficient vectors of the row-blocks and selector-blocks to obtain ρ→∈𝔽q2​k\vec{\rho}\in\mathbb{F}_{q}^{2k}. The affine relation between ρ→\vec{\rho} and the parameter pair (δ,c)(\delta,c) is
ρ→=M​[δc]+t→,\vec{\rho}\;=\;M\begin{bmatrix}\delta\\[2.0pt]
c\end{bmatrix}\;+\;\vec{t},
(29)
where M∈𝔽q2​k×2​kM\in\mathbb{F}_{q}^{2k\times 2k} is the block-diagonal matrix
M=[Vrow𝟎𝟎Vsel],M\;=\;\begin{bmatrix}V_{\mathrm{row}}&\mathbf{0}\\[4.0pt]
\mathbf{0}&V_{\mathrm{sel}}\end{bmatrix},
(30)
and t→\vec{t} collects constant terms independent of (δ,c)(\delta,c).

CHK-11064bb9559d10ed134338f3

atrix}V_{\mathrm{row}}&\mathbf{0}\\[4.0pt]
\mathbf{0}&V_{\mathrm{sel}}\end{bmatrix},
(30)
and t→\vec{t} collects constant terms independent of (δ,c)(\delta,c).
In Eq. (30), VrowV_{\mathrm{row}} and VselV_{\mathrm{sel}} are k×kk\times k Vandermonde matrices defined on two disjoint sets of evaluation points {αi}i=1k\{\alpha_{i}\}_{i=1}^{k} and {βi}i=1k\{\beta_{i}\}_{i=1}^{k}, respectively, with entries of the form (Vrow)j,i=αij−1(V_{\mathrm{row}})_{j,i}=\alpha_{i}^{j-1} and (Vsel)j,i=βij−1(V_{\mathrm{sel}})_{j,i}=\beta_{i}^{\,j-1}.
where αi,βi∈𝔽q\alpha_{i},\beta_{i}\in\mathbb{F}_{q} are the nodes used for coefficient representation of rowi\mathrm{row}_{i} and seli\mathrm{sel}_{i}, and t→\vec{t} denotes any fixed offset arising from constant polynomial terms.
The determinant factorizes as the product of the two Vandermonde determinants:
det(M)=det(Vrow)⋅det(Vsel)=∏1≤i<j≤k(αj−αi)⋅∏1≤i<j≤k(βj−βi).\det(M)\;=\;\det(V_{\mathrm{row}})\cdot\det(V_{\mathrm{sel}})\;=\;\prod_{1\leq i<j\leq k}(\alpha_{j}-\alpha_{i})\;\cdot\;\prod_{1\leq i<j\leq k}(\beta_{j}-\beta_{i}).
(31)
where the two products vanish exactly when either {αi}\{\alpha_{i}\} or {βi}\{\beta_{i}\} contains repeated elements; hence nonzero determinant is equivalent to pairwise distinct nodes within each block.
A sufficient practical condition to guarantee the existence of two disjoint kk-tuples of distinct nodes is

CHK-427b9058622d7e3b0a5dbfda

valent to pairwise distinct nodes within each block.
A sufficient practical condition to guarantee the existence of two disjoint kk-tuples of distinct nodes is
|𝔽q|> 2​k.|\mathbb{F}_{q}|\;>\;2k.
(32)
where |𝔽q||\mathbb{F}_{q}| denotes the field cardinality; Eq. (63) ensures one can choose {αi}\{\alpha_{i}\} and {βi}\{\beta_{i}\} as disjoint sets of kk distinct field elements. The invertibility of MM follows from Eq. (31) under the distinctness assumption.
Theorem 6.1 (Binding reduction for Row-Vortex commitment).
Let 𝖯𝖢\mathsf{PC} be a polynomial commitment scheme that is computationally binding on coefficient vectors. Suppose the evaluator uses the block-Vandermonde map MM of Eqs. (30)–(31) with pairwise distinct nodes and with field size satisfying Eq. (63). If an adversary produces two openings (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}) that both verify against the same public commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R), then 𝖯𝖢\mathsf{PC} ’s binding property is violated.
Proof.
Let ρ→\vec{\rho} and ρ→′\vec{\rho}^{\prime} denote the coefficient vectors computed from (δ,c)(\delta,c) and (δ′,c′)(\delta^{\prime},c^{\prime}) via Eq. (29). Subtracting the two relations yields
ρ→−ρ→′=M​[δ−δ′c−c′].\vec{\rho}-\vec{\rho}^{\prime}\;=\;M\begin{bmatrix}\delta-\delta^{\prime}\\[2.0pt]
c-c^{\prime}\end{bmatrix}.
(33)

CHK-84056d9d13bb725231931c38

the two relations yields
ρ→−ρ→′=M​[δ−δ′c−c′].\vec{\rho}-\vec{\rho}^{\prime}\;=\;M\begin{bmatrix}\delta-\delta^{\prime}\\[2.0pt]
c-c^{\prime}\end{bmatrix}.
(33)
Because MM is invertible under the distinct-nodes condition, Eq. (33) implies ρ→≠ρ→′\vec{\rho}\neq\vec{\rho}^{\prime} whenever (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}).
where invertibility of MM guarantees injectivity of the affine mapping from (δ,c)(\delta,c) to ρ→\vec{\rho}. Therefore the same public commitment 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) cannot correctly open to two different coefficient vectors unless the commitment scheme 𝖯𝖢\mathsf{PC} itself is not binding. This reduction shows that any adversary that finds two distinct valid openings yields a breaker for 𝖯𝖢\mathsf{PC}, contradicting its assumed binding security.
∎
Practical parameters
Selecting |𝔽q|>2​k|\mathbb{F}_{q}|>2k and ensuring that node sets {αi}\{\alpha_{i}\}, {βi}\{\beta_{i}\} consist of pairwise distinct elements suffices for invertibility of MM in realistic parameter regimes. For example, with a candidate pool size k≤32k\leq 32 the condition |𝔽q|>64|\mathbb{F}_{q}|>64 is easily met by standard prime fields used in practice (e.g., q=2255−19q=2^{255}-19).
where the numerical example illustrates that typical cryptographic fields comfortably satisfy Eq. (63).
6.2 Knowledge Soundness of the Violation IOP

CHK-c44dcf55907609ce851fe7df

{255}-19).
where the numerical example illustrates that typical cryptographic fields comfortably satisfy Eq. (63).
6.2 Knowledge Soundness of the Violation IOP
Public-coin three-round Sum-Check (detailed). The protocol takes the public input 𝖢𝗈𝗆𝗆⁡(R)\mathsf{Comm}(R) together with the claimed public output vector y∈𝔽qmouty\in\mathbb{F}_{q}^{m_{\mathrm{out}}}. The interaction proceeds as follows.
Round 1 (Sum-Check). The prover transmits a collection of univariate polynomials
g1​(X),g2​(X),…,gt​(X),g_{1}(X),\,g_{2}(X),\,\dots,\,g_{t}(X),
(34)
where t=log⁡|D|t=\log|D| and each polynomial has degree at most
d= 2​n+k−1.d\;=\;2n+k-1.
(35)
where nn denotes the witness dimension and k=|ℛ|k=|\mathcal{R}| denotes the number of candidate rows encoded in the Row-Vortex polynomial.
Round 2 (Challenge). The verifier samples a challenge
ζ​←$​𝔽q,\zeta\;\overset{\$}{\leftarrow}\;\mathbb{F}_{q},
(36)
where 𝔽q\mathbb{F}_{q} is the finite field of size |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} (and λ\lambda the security parameter).
Round 3 (Openings). The prover opens the evaluated objects at the sampled challenge:
R⁡(ζ,Y),ΦR​(ζ),Δout​(ζ).R(\zeta,Y),\qquad\Phi_{R}(\zeta),\qquad\Delta_{\mathrm{out}}(\zeta).
(37)

CHK-fde9a7df24982359288bbcd3

 prover opens the evaluated objects at the sampled challenge:
R⁡(ζ,Y),ΦR​(ζ),Δout​(ζ).R(\zeta,Y),\qquad\Phi_{R}(\zeta),\qquad\Delta_{\mathrm{out}}(\zeta).
(37)
where R⁡(ζ,Y)R(\zeta,Y) is the Row-Vortex bivariate evaluation at ζ\zeta; ΦR\Phi_{R} is the verifier’s residual polynomial of degree at most dd; and Δout​(X)\Delta_{\mathrm{out}}(X) is the output-difference polynomial defined by
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X).\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}(y^{\prime}_{j}-y_{j})\,L_{j}(X).
(38)
where Lj​(X)L_{j}(X) denotes the jj-th Lagrange basis polynomial over the chosen evaluation domain and mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates.
The verifier accepts if and only if Δout​(ζ)≠0\Delta_{\mathrm{out}}(\zeta)\neq 0 and all openings verify under the commitment scheme.
Theorem 6.2 (Explicit knowledge-error bound).
Let λ\lambda be the security parameter and let |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} denote the field size. Let dd be the residual polynomial degree (Eq. (35)), let moutm_{\mathrm{out}} be the output length, and let ℓ\ell denote the number of independent opening points used in the extractor (for example ℓ=O⁡(log⁡m)\ell=O(\log m) when multi-point openings are deployed). Then the three-round public-coin Sum-Check IOP is knowledge-sound with knowledge error δ\delta satisfying the conservative explicit bound

CHK-71b0b2c92aced086eb20babf

enings are deployed). Then the three-round public-coin Sum-Check IOP is knowledge-sound with knowledge error δ\delta satisfying the conservative explicit bound
δ≤mout−1+ℓ​d|𝔽q|.\delta\;\leq\;\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}.
(39)
where moutm_{\mathrm{out}} counts the nontrivial coefficients of Δout\Delta_{\mathrm{out}}, dd bounds the degree of residual polynomials opened by the prover, and ℓ\ell counts independent openings or challenge points.
In many implementations the ℓ\ell opening challenges are chosen independently and the extractor requires the adversary to cause all ℓ\ell checks to pass simultaneously. In this independent-challenge regime the single-point failure probability multiplies across openings, yielding exponential suppression of the knowledge error:
δ≤(mout−1+d|𝔽q|)ℓ.\delta\;\leq\;\left(\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|}\right)^{\!\ell}.
(40)
where the base mout−1+d|𝔽q|\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|} is the per-point failure probability (degree divided by field size) and the exponent ℓ\ell measures independent repetitions. Thus, multi-point independent challenges produce an exponential decay in the knowledge error as ℓ\ell grows.
Extractor description and complexity.
We give a concise,
implementation-oriented description of the extractor (the reader can regard this text as the replacement for the detailed pseudocode).

CHK-ac4f92bb6234f378466aec9e

exity.
We give a concise,
implementation-oriented description of the extractor (the reader can regard this text as the replacement for the detailed pseudocode). After accepting an IOP transcript the extractor first collects the opened evaluations {R⁡(ζi,Y),ΦR​(ζi),Δout​(ζi)}i=1ℓ\{R(\zeta_{i},Y),\Phi_{R}(\zeta_{i}),\Delta_{\mathrm{out}}(\zeta_{i})\}_{i=1}^{\ell} together with their evaluation proofs. From these openings the extractor aggregates a compact encoding ρ\rho and applies the inverse affine mapping M−1M^{-1} associated with the commitment encoding to recover the sparse selection vector (δ,c)(\delta,c). If the transcript already includes a low-degree witness polynomial W′​(X)W^{\prime}(X), the extractor interpolates W′​(X)W^{\prime}(X) to obtain the witness vector w′w^{\prime}. Otherwise the extractor assembles the algebraic reconstruction system
Fδ,c​(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0,
(41)
where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the edited R1CS residuals after substituting (δ,c)(\delta,c). The extractor then solves Eq. (41) by linear algebra to recover w′w^{\prime}.

CHK-12d0ddb279be4aad77fe4ac9

b{F}_{q}^{m} denotes the edited R1CS residuals after substituting (δ,c)(\delta,c). The extractor then solves Eq. (41) by linear algebra to recover w′w^{\prime}. Finally, substituting the computed constants into the identified weak-assignment sites yields the mutated program P′P^{\prime} and the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); replaying P′​(x′)P^{\prime}(x^{\prime}) is optional for verification because the proof already certifies acceptance.
The principal computational costs are summarized by the following expressions. Recovering (δ,c)(\delta,c) from the aggregated encoding via sparse reconstruction or inversion of the affine map runs in time
Tselect=O⁡(k​log⁡k),T_{\mathrm{select}}\;=\;O(k\log k),
(42)
where k=|ℛ|k=|\mathcal{R}| is the number of candidate rows and the cost assumes sparse recovery primitives or hashing-based aggregation. If a low-degree witness polynomial W′​(X)W^{\prime}(X) is present interpolation recovers w′w^{\prime} in
Tinterp=O⁡(n​log⁡n),T_{\mathrm{interp}}\;=\;O(n\log n),
(43)
where nn is the witness dimension and the bound assumes FFT-style interpolation over a suitable domain. If interpolation is not available solving Eq. (41) by direct linear algebra costs
Tsolve=O⁡(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}),
(44)

CHK-03a0069760a0423a4cdf91e1

r a suitable domain. If interpolation is not available solving Eq. (41) by direct linear algebra costs
Tsolve=O⁡(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}),
(44)
where ω∈[2,3]\omega\in[2,3] denotes the matrix-multiplication exponent; in practice dense Gaussian elimination yields O⁡(n3)O(n^{3}) field operations while sparse solvers typically achieve substantially smaller constants. Combining these contributions and adding the constant verifier pairing/open checks gives the practical bound
Textract=O~​(n+k),T_{\mathrm{extract}}\;=\;\widetilde{O}(n+k),
(45)
where O~​(⋅)\widetilde{O}(\cdot) hides polylogarithmic factors and the dominant term depends on whether W′​(X)W^{\prime}(X) is present in the transcript.
Error analysis sketch.
The extractor uses a forking strategy on the verifier challenge(s) to obtain multiple accepting transcripts at distinct challenge points ζ1,…,ζℓ\zeta_{1},\dots,\zeta_{\ell}. Interpolating the values of Δout\Delta_{\mathrm{out}} at these points yields the coefficient vector (y′−y)(y^{\prime}-y) unless Δout\Delta_{\mathrm{out}} vanishes at all sampled points. By the Schwartz–Zippel lemma the probability that a non-zero polynomial of total degree DD vanishes at a single uniformly random point is at most D/|𝔽q|D/|\mathbb{F}_{q}|.

CHK-6fc8ca87684f2e7e5de3bb0a

artz–Zippel lemma the probability that a non-zero polynomial of total degree DD vanishes at a single uniformly random point is at most D/|𝔽q|D/|\mathbb{F}_{q}|. Applying this observation to the output polynomial and to each opened residual and then taking a union bound produces the linear bound in Eq. (39). If the ℓ\ell challenges are independent and the adversary must succeed at all openings simultaneously, the failure probability multiplies and yields the exponential bound in Eq. (40). Practical parameter selection thus chooses |𝔽q||\mathbb{F}_{q}| and ℓ\ell so that the exponentiated bound meets the desired security parameter λ\lambda.
Summary.
When the underlying commitment scheme permits appending a low-degree witness polynomial W′​(X)W^{\prime}(X) to the oracles (as is possible with opening-friendly schemes), prefer including W′​(X)W^{\prime}(X) in the transcript: this reduces extraction cost to O⁡(n​log⁡n)O(n\log n) and makes replaying P′​(x′)P^{\prime}(x^{\prime}) optional for correctness while still preserving strong knowledge guarantees.
6.3 Error bounds and complexity
This appendix states rigorous probabilistic bounds that govern extractor failure for the three-round public-coin Sum-Check IOP used in zkCraft, and it provides concrete asymptotic cost estimates for the principal IOP operations.
Lemma 6.3 (Indicator polynomial non-vanishing).
Let

CHK-9b2be7b4e71795632739d7bd

k IOP used in zkCraft, and it provides concrete asymptotic cost estimates for the principal IOP operations.
Lemma 6.3 (Indicator polynomial non-vanishing).
Let
Δout​(X)=∑j=0mout−1(yj′−yj)​Lj​(X),\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X),
(46)
where y′y^{\prime} is the extracted public-output vector, yy is the claimed public-output vector, and Lj​(X)L_{j}(X) denotes the Lagrange basis polynomial associated with the distinct evaluation point uju_{j} for j=0,…,mout−1j=0,\dots,m_{\mathrm{out}}-1. If y′≠yy^{\prime}\neq y then
Prζ​←$​𝔽q[Δout(ζ)=0]≤mout−1|𝔽q|,\Pr_{\zeta\overset{\$}{\leftarrow}\mathbb{F}_{q}}\bigl[\Delta_{\mathrm{out}}(\zeta)=0\bigr]\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|},
(47)
where mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates and deg⁡(Δout)≤mout−1\deg\!\bigl(\Delta_{\mathrm{out}}\bigr)\leq m_{\mathrm{out}}-1.
Proof.
From definition (46) the polynomial Δout​(X)\Delta_{\mathrm{out}}(X) is nonzero whenever y′≠yy^{\prime}\neq y. Its degree is bounded by mout−1m_{\mathrm{out}}-1 because the Lagrange basis polynomials Lj​(X)L_{j}(X) have degree at most mout−1m_{\mathrm{out}}-1. The Schwartz–Zippel lemma asserts that a nonzero polynomial of degree at most rr over 𝔽q\mathbb{F}_{q} evaluates to zero at a uniformly random point with probability at most r/|𝔽q|r/|\mathbb{F}_{q}|.

CHK-b2b45b547e8cbcf26b170b6b

a nonzero polynomial of degree at most rr over 𝔽q\mathbb{F}_{q} evaluates to zero at a uniformly random point with probability at most r/|𝔽q|r/|\mathbb{F}_{q}|. Applying this lemma with r≤mout−1r\leq m_{\mathrm{out}}-1 yields inequality (47).
∎
Let ΦR\Phi_{R} denote the verifier’s aggregated residual polynomial and let dd be an explicit upper bound on its degree:
deg⁡(ΦR)≤d,\deg(\Phi_{R})\leq d,
(48)
where, in our encoding, a conservative choice is d=2​n+k−1d=2n+k-1 with nn the witness dimension and k=|ℛ|k=|\mathcal{R}| the candidate-pool size. Assume the extractor obtains ℓ\ell independent openings of residual-related polynomials by obtaining accepting transcripts at ℓ\ell distinct challenge points.
Theorem 6.4 (Knowledge-error explicit bound).
Under the above assumptions the extractor’s failure probability (knowledge error) δ\delta satisfies
δ≤mout−1+ℓ​d|𝔽q|.\delta\leq\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}.
(49)
Here the additive term mout−1|𝔽q|\tfrac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|} bounds the probability that the output-difference polynomial vanishes at a random challenge (Lemma 6.3) and the term ℓ⋅d|𝔽q|\ell\cdot\tfrac{d}{|\mathbb{F}_{q}|} upper-bounds the aggregate probability that one of the ℓ\ell opened residual polynomials (each of degree ≤d\leq d) passes the verifier checks by coincidence.
Proof.

CHK-37a5de5e4613187aae82a160

-bounds the aggregate probability that one of the ℓ\ell opened residual polynomials (each of degree ≤d\leq d) passes the verifier checks by coincidence.
Proof.
Successful extraction requires two conditions simultaneously: the accepted transcripts must demonstrate a nonzero public-output difference and the opened residual-related polynomials must be consistent with the claimed encodings. Failure of extraction therefore arises only if at least one of the following events occurs at the sampled challenge point: the output-indicator polynomial evaluates to zero, or an opened residual polynomial of degree at most dd collides with the verifier’s consistency predicates by chance.
By Lemma 6.3 the probability that Δout\Delta_{\mathrm{out}} vanishes at a uniformly sampled field element is at most (mout−1)/|𝔽q|(m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|. For any fixed residual-related polynomial of degree at most dd, the Schwartz–Zippel lemma gives a single-point collision probability at most d/|𝔽q|d/|\mathbb{F}_{q}|. Since the extractor obtains ℓ\ell independent openings, a union bound over these ℓ\ell events yields at most ℓ​d/|𝔽q|\ell\,d/|\mathbb{F}_{q}| probability for a residual-related coincidence. A further union bound combining the output-indicator failure and the residual-opening failures yields

CHK-abdf59844683d64cbb2f2d67

b{F}_{q}| probability for a residual-related coincidence. A further union bound combining the output-indicator failure and the residual-opening failures yields
δ≤mout−1|𝔽q|+ℓ​d|𝔽q|,\delta\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}+\frac{\ell\,d}{|\mathbb{F}_{q}|},
(50)
establishing (49).
∎
If the extractor repeats the Δout\Delta_{\mathrm{out}} test at tt independently sampled challenge points, then the probability that a nonzero polynomial vanishes at all tt points is at most ((mout−1)/|𝔽q|)t\bigl((m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|\bigr)^{t}. Consequently the knowledge error satisfies
δ≤(mout−1|𝔽q|)t+ℓ⋅d|𝔽q|,\delta\leq\left(\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}\right)^{\!t}+\ell\cdot\frac{d}{|\mathbb{F}_{q}|},
(51)
where tt is the number of independent checks applied to Δout\Delta_{\mathrm{out}}. More generally, if each of the ℓ\ell residual openings is independently repeated trest_{\mathrm{res}} times then the residual-term in (49) is replaced by ℓ⋅(d/|𝔽q|)tres\ell\cdot\bigl(d/|\mathbb{F}_{q}|\bigr)^{t_{\mathrm{res}}}.
Parameter selection should ensure that δ\delta meets a chosen security target 2−λ2^{-\lambda}.

CHK-c4da7232eca836442c6d0577

|)tres\ell\cdot\bigl(d/|\mathbb{F}_{q}|\bigr)^{t_{\mathrm{res}}}.
Parameter selection should ensure that δ\delta meets a chosen security target 2−λ2^{-\lambda}. For typical cryptographic fields (for example q≈2255q\approx 2^{255}) small repetition counts render the polynomial-vanishing term negligible for practical moutm_{\mathrm{out}}, while modest residual repetitions suffice to suppress collision risk below cryptographic thresholds.
Proposition 6.5 (Practical IOP cost).
Let kk be the
candidate-pool size, mm the number of constraints, nn the witness dimension, and dd the residual-degree bound (for example d=2​n+k−1d=2n+k-1). Let |D|=2⌈log2⁡m⌉|D|=2^{\lceil\log_{2}m\rceil} denote the Sum-Check domain size chosen as the next power-of-two above mm. Using an opening-friendly commitment scheme (for example HyperPlonk+ or BaseFold) and a performance-oriented implementation, a non-amortized IOP instance satisfies the following asymptotic cost estimates:
Prover time\displaystyle\text{Prover time}
=O(kdlog|D|)field multiplications,\displaystyle=O\bigl(k\,d\,\log|D|\bigr)\quad\text{field multiplications},
(52)
Verifier time\displaystyle\text{Verifier time}
=O(d)field multiplications\displaystyle=O(d)\quad\text{field multiplications}
+O⁡(1)pairings,\displaystyle+\;O(1)\quad\text{pairings},
Proof size\displaystyle\text{Proof size}

CHK-33aff976a03d98c804be95e5

plications\displaystyle=O(d)\quad\text{field multiplications}
+O⁡(1)pairings,\displaystyle+\;O(1)\quad\text{pairings},
Proof size\displaystyle\text{Proof size}
=O(1)(commitment)\displaystyle=O(1)\quad\text{(commitment)}
+O⁡(λ⁡(d+1))(opening proofs in bits).\displaystyle+\;O\bigl(\lambda(d+1)\bigr)\quad\text{(opening proofs in bits)}.
where λ\lambda is the security parameter (bit-length associated with the field/commitment) and the constants hidden by O⁡(⋅)O(\cdot) depend on low-level choices such as FFT model and field representation.
Proof.
The prover’s principal computational burden is dominated by materializing and evaluating the Row-Vortex-derived encodings across the Sum-Check domain and by constructing the Sum-Check auxiliary polynomials and openings. Evaluating degree-dd polynomials on a domain of size |D||D| can be executed in O⁡(d​log⁡|D|)O(d\log|D|) field operations using FFT/NTT techniques when the domain supports such transforms. Aggregation across kk candidate contributions yields the factor kk, hence the O⁡(k​d​log⁡|D|)O(k\,d\,\log|D|) bound for prover field multiplications.
Opening-friendly commitment schemes allow attaching low-degree witness polynomials and producing succinct evaluation proofs whose bit-length scales with the security parameter λ\lambda and the number of opened coefficients (on the order of d+1d+1).

CHK-8d45c2ef2ca3bd85cb2490d3

roducing succinct evaluation proofs whose bit-length scales with the security parameter λ\lambda and the number of opened coefficients (on the order of d+1d+1). Therefore the proof-size model in (52) captures the commitment overhead plus the opening proof cost.
The verifier’s computation consists of evaluating the Sum-Check consistency relations a
补充资料

中文译文

已保存部分中文译文,其余段落请查看下方原文。

zkCraft:以提示引导的大语言模型作为零样本变异模式预言机,用于 TCCT 驱动的零知识模糊测试 Rong Fu 所属机构:独立研究者 身份:通讯作者 Jia Yee Tan 所属机构:独立研究者 Ziyu Kong 所属机构:独立研究者 Shuning Zhang 所属机构:独立研究者 Xianda Li 所属机构:独立研究者 Kun Liu 所属机构:独立研究者 Simon Fong 所属机构:独立研究者 摘要 零知识电路支持保护隐私且可扩展的系统,但由于见证计算与电路约束紧密耦合,正确实现零知识电路并不容易。我们提出 zkCraft,这是一个将确定性的、感知 R1CS 的定位方法与附带证明的搜索相结合,以检测语义不一致的实用框架。zkCraft 将候选约束修改编码到单个 Row-Vortex 多项式中,并以 Violation IOP 取代重复的求解器查询

已采集原文

访问来源网页

zkCraft: Prompt-Guided LLM as a Zero-Shot Mutation Pattern Oracle for TCCT-Powered ZK Fuzzing Rong Fu Affiliation: Independent Researcher Affiliation: Corresponding author Jia Yee Tan Affiliation: Independent Researcher Ziyu Kong Affiliation: Independent Researcher Shuning Zhang Affiliation: Independent Researcher Xianda Li Affiliation: Independent Researcher Kun Liu Affiliation: Independent Researcher Simon Fong Affiliation: Independent Researcher Abstract Zero-knowledge circuits enable privacy-preserving and scalable systems but are difficult to implement correctly due to the tight coupling between witness computation and circuit constraints. We present zkCraft, a practical framework that combines deterministic, R1CS-aware localization with proof-bearing search to detect semantic inconsistencies. zkCraft encodes candidate constraint edits into a single Row-Vortex polynomial and replaces repeated solver queries with a Violation IOP that certifies the existence of edits together with a succinct proof. Deterministic LLM-driven mutation templates bias exploration toward edge cases while preserving auditable algebraic verification. Evaluation on real Circom code shows that proof-bearing localization detects diverse under- and over-constrained faults with low false positives and reduces costly solver interaction. Our approach bridges formal verification and automated debugging, offering a scalable path for robust ZK circuit development. Keywords zero-knowledge proofs, fuzzing, Circom, TCCT, Row-Vortex commitment, Violation IOP, large language models, mutation testing 1 Introduction Zero-knowledge circuits provide succinct, verifiable proofs while exposing minimal information about private inputs, and they form the foundation of many privacy and scalability systems. Writing correct circuits is difficult because the witness generator that computes private values must align precisely with the constraint system used for proof verification. When this alignment fails, two broad classes of faults appear. Under-constrained faults arise when the constraint system admits execution traces that no valid witness can produce. Over-constrained faults arise when a valid witness-producing execution is rejected by the constraints. Both fault classes have important security and operational consequences in deployed systems and have driven significant recent research efforts  [1, 2, 3, 4, 5, 6]. Prior work addresses these problems from multiple perspectives. Static and pattern-based detectors reveal common syntactic mistakes but often miss semantic discrepancies that manifest only during witness generation or under specific inputs  [7, 8, 9]. Formal verification and SMT-based analyses can provide strong guarantees but typically do not scale to large circuits, and they struggle with the combined search space of program edits and input assignments  [10, 11, 12]. Dynamic approaches based on fuzzing and metamorphic testing improve practical bug-finding coverage, yet they frequently depend on many expensive solver calls or unguided mutations that produce numerous low-value candidates  [1, 2, 4]. Recent work on verifier-side encodings, interactive oracle proofs, and efficient polynomial commitments offers promising primitives to compress or certify search outcomes  [5, 13, 14]. In parallel, advances in model-guided mutation and LLM-driven fuzzing have shown that language models can generate semantically rich test patterns and seed mutations for security testing  [15, 16, 17, 18, 19, 20]. Despite these developments, important gaps remain. Most algebraic and IOP-style techniques have not been integrated with practical program-level mutation strategies, so solver costs remain a bottleneck for end-to-end bug discovery. Conversely, LLM-guided mutation methods improve suggestion quality but they are typically detached from proof-bearing search and therefore can produce proposals that are expensive to validate or that lead to many false positives  [21, 20, 16]. Compilers and zkVM toolchains introduce additional complexity related to optimization and backend behavior, which further complicates end-to-end detection and increases the cost of exhaustive solver-based validation  [22, 23, 24, 25]. Motivated by these observations, we design zkCraft, a ZK-native pipeline that tightly couples algebraic localization, succinct violation proofs, and deterministic, prompt-guided mutation templates. zkCraft reduces the combinatorial task of finding small, vulnerability-inducing edits to a single algebraic existence statement. It constructs compact per-row fingerprints to prioritize a limited candidate pool, encodes row selection and substitution parameters as a Row-Vortex polynomial, and asks a prover to produce a Violation interactive oracle proof that certifies the existence of a witness satisfying the edited constraints while yielding a different public output. The proof serves as an auditable counterexample from which concrete substitutions can be recovered. To focus search on high-yield edits, zkCraft employs deterministic LLM-driven mutation templates as a zero-shot pattern oracle for right-hand-side edits and for input-sampling heuristics. These templates propose algebraic edits but do not replace the proof-producing components. Our contributions are as follows. We present a ZK-native search framework that maps the search for small, vulnerability-causing edits to a single algebraic existence statement encoded as a Row-Vortex polynomial and certified with a Violation IOP. We design deterministic LLM interfaces that act as zero-shot mutation-template oracles to propose right-hand-side edits and input-sampling biases while remaining decoupled from proof generation. We describe practical implementation techniques for compact per-row fingerprinting, a scoring heuristic to select a small candidate pool, and a deterministic finite-field synthesis that recovers concrete substitutions from proof-embedded encodings. We evaluate the approach on representative Circom circuits and zkVM workloads and show that the ZK-native workflow discovers diverse under- and over-constrained faults while substantially reducing solver calls and producing auditable counterexamples suitable for developer inspection. 2 Related Work 2.1 Correctness and verification of ZK pipelines and compilers The correctness of zero-knowledge compilation and circuit-processing pipelines has attracted growing attention because compiler or pipeline bugs can yield accepted yet invalid proofs. Static and dynamic analyses specifically targeting ZK circuit representations and their compilers have been proposed to reveal semantic and logic flaws early in the toolchain. Prior work presents static detectors over circuit dependence graphs and evaluates them on large Circom codebases, demonstrating that semantic checks can recover subtle vulnerabilities in real projects  [2]. Metamorphic and mutation-driven approaches have been adapted to the ZK compiler setting to detect incorrect compilation behaviors by generating semantically equivalent variants and checking for inconsistent outputs  [4, 26]. Systematic fuzzing of end-to-end ZK pipelines has also been shown to surface logic bugs that elude conventional testing, illustrating the importance of domain-aware test oracles for pipelines that span DSL, compiler, and proof-generation layers  [27, 28]. 2.2 Fuzzing, metamorphic testing, and oracles for ZK systems Fuzzing and metamorphic testing have been successfully adapted to find pipeline-level and finalization bugs in ZK deployments, including rollup finalization failures and pipeline logic flaws; these techniques emphasize careful oracle design and input-generation strategies to trigger diverse behaviors  [26, 29]. Tools that combine metamorphic relations with fault-injection or targeted mutation expose both soundness and completeness weaknesses in zkVMs and related infrastructures  [30, 26]. Work that specifically targets the oracle problem in ZK fuzzing highlights the need for proofs or semantic checks that distinguish genuine counterexamples from benign variations  [28, 27]. Complementary studies show that bounded, structured mutation templates and algebraic checks outperform unguided random mutation when the objective is to find under-constrained or mis-specified constraints  [31, 32]. 2.3 LLMs and automated test/mutation generation Large language models have been explored as code-generation and test-generation oracles across multiple domains. In compiler and test-generation settings, LLMs can be guided to produce high-quality test programs or mutation patterns when fed targeted prompts and feedback, enabling discovery of deep optimization and correctness bugs  [33, 34, 35]. Recent work combines LLMs with mutation testing and iterative refinement to generate tests that kill mutants and to produce sampling strategies tailored to observed failures  [36, 37, 38]. Studies that evaluate LLMs specifically for ZK program generation report that off-the-shelf models often produce syntactically plausible but semantically incorrect ZK code, motivating augmentation strategies such as constraint sketching and guided retrieval  [39, 40]. These findings motivate zkCraft’s design choice to treat LLMs as deterministic template oracles rather than as formal solvers  [39, 40]. 2.4 Symbolic execution, SMT guidance, and hybrid strategies Symbolic execution enhanced with solver-time prediction and synthesized solver strategies has been shown to improve scalability for complex programs, and these ideas inform hybrid pipelines that combine symbolic techniques with search or sampling  [34, 35, 41]. For ZK circuit mutation and verification, solver-guided fallback channels that ground small template families and use finite-field SMT/SAT queries remain practical when pure ZK-native IOPs are infeasible; this hybrid approach balances completeness and engineering constraints  [42, 43]. Machine-checked proofs and formally verified protocol implementations provide strong guarantees and serve as an orthogonal means to reduce the trusted code base for ZK constructions  [43, 42]. 2.5 ZK-native proof techniques, commitments, and succinct verification Recent advances in polynomial commitments, IOPs and succinct proof systems enable encoding higher-level search oracles as compact ZK statements. Systems that adopt ZK-native encodings show how commitment-and-IOP primitives can be repurposed to certify existential properties about edits and witnesses, thereby converting existential search into a single verifiable artifact  [44, 45, 46]. GPU-accelerated proof systems and hardware-algorithm co-design work illustrate routes to practical prover performance that scale to larger circuits  [47, 48, 49]. Benchmarks and tooling that provide comparative performance baselines for SNARK stacks are useful for choosing commit/IOP backends when building ZK-native workflows  [31, 50]. 2.6 Circuit languages, compilers and verification frameworks Domain-specific languages for ZK, their compiler frontends, and associated verification toolchains form a rich ecosystem. Efforts to improve circuit description languages and make them amenable to static verification encourage safer ZK application development  [45, 51]. Compiler-focused fuzzing and white-box analysis have uncovered deep logic bugs in real-world compilers, motivating tighter integration of source-level diagnostics with pipeline-level checks  [33, 4]. Tools that certify circuits with refinement types or other higher-level specifications reduce a class of errors by construction and complement testing-based approaches  [52, 32]. 2.7 Applications, surveys, and domain-specific ZK use cases Zero-knowledge proofs are being applied widely, from verifiable decentralized machine learning to privacy-preserving credentialing and domain-specific verification tasks  [53, 54, 55]. Surveys and systematizations contextualize verifiability challenges and catalog practical design patterns and open problems for ZKP-based applications  [56, 57]. Domain work that integrates anomaly detection, sensing, or constrained hardware contexts highlights practical verification needs in applied settings  [58, 59, 60]. 2.8 Mutation tooling, scientific debugging and cross-domain testing Mutation testing and scientific debugging have been adapted to multiple domains including quantum circuits and hardware verification; these adaptations emphasize careful mutant design and oracle selection to obtain meaningful faults  [61, 62]. Iterative, model-guided debugging pipelines that combine LLMs with mutation testing demonstrate that principled human-in-the-loop strategies and automated refinement can improve fault detection while keeping developer review effort manageable  [36, 37, 38]. These cross-domain lessons guided the design of zkCraft’s mutation templates and deterministic post-processing to keep generated edits syntactically valid and semantically focused  [39, 36]. 2.9 Summary of positioning In summary, prior work supplies three families of building blocks for zkCraft. The first family covers ZK pipeline correctness, compilers, and static/dynamic detectors that expose semantic vulnerabilities  [2, 4, 27, 26]. The second family comprises mutation, fuzzing, and LLM-guided test generation techniques that provide high-yield input and edit proposals  [33, 36, 37, 38]. The third family contains ZK-native proof primitives, commitment/IOP engineering, and performance tooling that enable replacing many solver calls with compact cryptographic artifacts  [44, 46, 47, 50]. zkCraft integrates elements from all three families by combining algebraic localization, a Row-Vortex commitment with a Violation IOP, and deterministic LLM-driven mutation templates to produce proof-bearing counterexamples that are both practical and auditable  [63, 32, 40]. guarantees, advancing the state-of-the-art in ZKP security. Figure 1: Overview of the zkCraft framework for ZK-native fuzzing and mutation. The pipeline begins at the Input Layer, where a Circom program is decomposed into R1CS matrices. In Stage 1 (The Slicer), a Sparse Fingerprint Scanner computes diagnostic scores to prune the constraint space into a manageable Candidate Pool ℛcand\mathcal{R}_{\mathrm{cand}}. This process is accelerated by the LLM Oracles, which provide zero-shot Mutation Templates and learn vulnerability patterns to bias the search. In Stage 2 (ZK-Native Engine), candidate edits are bundled into the Row-Vortex Commitment R(X,Y)R(X,Y). A Violation IOP (utilizing algebraic Sum-Check identities) then searches for a witness that satisfies the edited constraints while diverging from the original output. The resulting Succinct Proof π\pi serves as a Proof-as-Counterexample, from which the Witness Extraction machinery reconstructs the concrete trace to confirm the vulnerability via TCCT. Figure 2: zkCraft versus baseline tools. The horizontal axis uses a logarithmic scale from one second to two hours. Curves show cumulative unique true positives averaged over five seeds and shaded bands indicate one standard deviation. A gold marker at 100 seconds highlights early convergence. Figure 3: Ablation results. Bars represent the log10 of the slowdown factor relative to the default configuration. The red line reports the number of bugs not discovered within 24 hours when a single module is removed. A horizontal threshold marks a 100 times slowdown. Figure 4: zkCraft convergence under four mutation/population settings. Time (log scale) on the horizontal axis; cumulative true positives on the vertical. Gold dashed line marks 100-second convergence; shaded areas show one standard deviation. Figure 5: Row-Vortex commitment schematic. The three panels illustrate candidate row selection, construction of the bivariate polynomial, and the Violation IOP that yields a succinct proof. The top annotation summarizes the replacement of many SMT calls by a single commitment. Figure 6: Proof size vs. constraint count (top) and prover time (bottom), both on log-scaled axes. Dashed line shows proportional growth; horizontal marker highlights small proof size in ZK-native mode. Figure 7: Representative confirmed vulnerabilities and corresponding counterexamples. Left panels show compact code excerpts with highlighted weak assignments. Right panels list concrete input values and the observed outputs that demonstrate the fault. Figure 8: Strategy comparison as a radar plot. Axes report early discovery at two short checkpoints, final discovery at two hours, false positive tendency after inversion, and normalized median runtime after inversion. Polygons show the mean over five seeds. Figure 9: Hyperparameter sensitivity heatmap. The horizontal axis is mutation strength and the vertical axis is population size. Colors encode the number of true positives found within the two-hour budget. The default configuration is framed and annotated. Figure 10: Sensitivity of zkCraft to key hyperparameters across four settings. Each panel varies one parameter with others fixed; curves show cumulative true positives over time (log scale), averaged across five seeds. A gold dashed line at 100 seconds marks the early-convergence regime. 3 Methodology This section formalizes the zkCraft methodology and its ZK-native extension. We present a deterministic, R1CS-aware pipeline that replaces randomized program mutation with a small-scope, algebraic slicing procedure. The novel extension replaces the external SMT/SAT oracle with a succinct zero-knowledge protocol. Under this design the existence of a small edit set and the concrete edits themselves are certified by a single proof π\pi; proof verification both confirms the vulnerability and yields the concrete counterexample trace without a separate TCCT [63] invocation. 3.1 Notation and preliminaries Let 𝔽q\mathbb{F}_{q} denote a prime finite field of order qq. An R1CS instance with mm constraints and nn variables is represented by matrices A,B,C∈𝔽qm×nA,B,C\in\mathbb{F}_{q}^{m\times n}. For each row index i∈{1,…,m}i\in\{1,\dots,m\}, let ai,bi,cia_{i},b_{i},c_{i} denote the ii-th rows of A,B,CA,B,C, respectively. A witness vector is w∈𝔽qnw\in\mathbb{F}_{q}^{n}. ⟨ai,w⟩⋅⟨bi,w⟩=⟨ci,w⟩,\displaystyle\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle\;=\;\langle c_{i},w\rangle, (1) where ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle denotes the inner product over 𝔽q\mathbb{F}_{q} and Eq. (1) expresses the ii-th Rank-1 constraint. F(w)=(⟨ai,w⟩⋅⟨bi,w⟩−⟨ci,w⟩)i=1m.\displaystyle F(w)\;=\;\big(\langle a_{i},w\rangle\cdot\langle b_{i},w\rangle-\langle c_{i},w\rangle\big)_{i=1}^{m}. (2) where F(w)F(w) is the vector of per-row residuals and a valid witness satisfies F(w)=0F(w)=0. We use the Trace-Constraint Consistency Test (TCCT) as semantic acceptance: a mutated program P′P^{\prime} and input x′x^{\prime} produce a TCCT counterexample if the execution trace (z′,y′)(z^{\prime},y^{\prime}) satisfies the original constraints CC while yielding public output y′≠yy^{\prime}\neq y, where yy denotes the original public output for the relevant input. 3.2 Formal problem statement Given an R1CS ℛ=(A,B,C)\mathcal{R}=(A,B,C) over 𝔽q\mathbb{F}_{q}, a program PP that produces a witness ww on input xx, a mapping from source-level weak-assignment sites to R1CS rows, and an edit budget tmax∈ℕt_{\max}\in\mathbb{N}, we seek a small collection of right-hand-side edits (restricted to weak assignments) producing P′P^{\prime} and a witness w′w^{\prime} for some input x′x^{\prime} such that P′(x′)=(z′,y′),C(x′,z′,y′)=true,y′≠y.\displaystyle P^{\prime}(x^{\prime})=(z^{\prime},y^{\prime}),\qquad C(x^{\prime},z^{\prime},y^{\prime})=\textsf{true},\qquad y^{\prime}\neq y. (3) where yy denotes the public output of the original program on the considered input. The decision variant asks whether such a set of edits of size at most tmaxt_{\max} exists. Because TCCT decision problems are hard in the worst case, we optimize for small edit cardinalities via a focused search. 3.3 Stage 1: Sparse signature extraction For every constraint row ii compute the nonzero index supports supp(ai),supp(bi),supp(ci),\displaystyle\mathrm{supp}(a_{i}),\ \mathrm{supp}(b_{i}),\ \mathrm{supp}(c_{i}), (4) where supp(⋅)\mathrm{supp}(\cdot) returns the set of indices with nonzero coefficients. Define two integer diagnostics per row: κiw\displaystyle\kappa^{\mathrm{w}}_{i} :=|(supp(ai)∪supp(bi)∪supp(ci))∩𝒲|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{W}\big|, (5) κic\displaystyle\kappa^{\mathrm{c}}_{i} :=|(supp(ai)∪supp(bi)∪supp(ci))∩𝒦|,\displaystyle:=\big|\big(\mathrm{supp}(a_{i})\cup\mathrm{supp}(b_{i})\cup\mathrm{supp}(c_{i})\big)\cap\mathcal{K}\big|, (6) where 𝒲\mathcal{W} indexes witness/intermediate variables and 𝒦\mathcal{K} indexes constant/public/simple-expression terms. Form a compact per-row fingerprint and a scalar score: fpi=Trunc64(Hash(coeffs(ai,bi,ci)‖κiw‖κic)),\displaystyle\mathrm{fp}_{i}\;=\;\mathrm{Trunc64}\big(\mathrm{Hash}(\mathrm{coeffs}(a_{i},b_{i},c_{i})\,\|\,\kappa^{\mathrm{w}}_{i}\,\|\,\kappa^{\mathrm{c}}_{i})\big), (7) where Hash\mathrm{Hash} is a collision-resistant hash and Trunc64\mathrm{Trunc64} truncates to 64 bits; and si=λ⋅κicκiw+1−μ⋅κiw,\displaystyle s_{i}\;=\;\lambda\cdot\frac{\kappa^{\mathrm{c}}_{i}}{\kappa^{\mathrm{w}}_{i}+1}\;-\;\mu\cdot\kappa^{\mathrm{w}}_{i}, (8) where λ,μ>0\lambda,\mu>0 are tunable scalars and the fractional term stabilizes ratio sensitivity. Select the top-kk rows with smallest sis_{i} to form the candidate pool ℛcand\mathcal{R}_{\mathrm{cand}} (typical k≤32k\leq 32). This stage runs in time linear in the number of nonzeros. 3.4 Stage 2: Row-Vortex commitment and Violation IOP (ZK-native) Row-Vortex is a bivariate polynomial encoding that combines candidate row selections and substitution constants for R1CS constraints, providing a compact representation of mutation choices within the zkCraft framework. We replace the loop of SMT/SAT queries by a single zero-knowledge interactive proof that simultaneously attests to the existence of a small set of edits and carries a compact counterexample when one exists. The protocol works on a preselected candidate set ℛ\mathcal{R} and encodes both binary row selection and per-site substitutions into a two-variable polynomial, which we call the Row-Vortex polynomial: R(X,Y)\displaystyle R(X,Y) =∑i∈ℛδirowi(X)+ciseli(Y).\displaystyle=\sum_{i\in\mathcal{R}}\delta_{i}\,\mathrm{row}_{i}(X)\;+\;c_{i}\,\mathrm{sel}_{i}(Y). (9) where δi∈{0,1}\delta_{i}\in\{0,1\} denotes whether row ii is chosen, ci∈𝔽qc_{i}\in\mathbb{F}_{q} is the substitution constant associated with row ii, rowi(X)\mathrm{row}_{i}(X) is a low-degree univariate encoding of the ii-th R1CS row in variable XX, seli(Y)\mathrm{sel}_{i}(Y) isolates the ii-th slot via YY, and ℛ\mathcal{R} is the candidate index set. The prover commits to R(X,Y)R(X,Y) under an efficient polynomial commitment scheme (for example, contemporary HyperPlonk+/BaseFold-style constructions). The commitment 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) binds the prover to a unique pair (δ,c)(\delta,c) while remaining succinct. The prover additionally holds a candidate witness w′w^{\prime} that, together with (δ,c)(\delta,c), is intended to satisfy the edited constraint system. To express the public-output divergence in algebraic form, fix distinct evaluation points {uj}j=0mout−1\{u_{j}\}_{j=0}^{m_{\mathrm{out}}-1} for the public-output coordinates and let Lj(X)L_{j}(X) be the corresponding Lagrange basis polynomials. Define the multilinear output-difference polynomial Δout(X)=∑j=0mout−1(yj′−yj)Lj(X).\displaystyle\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X). (10) where yj′y^{\prime}_{j} denotes the jj-th coordinate of the public output produced by w′w^{\prime}, yjy_{j} denotes the original public output coordinate, and Lj(X)L_{j}(X) is the degree ≤mout−1\leq m_{\mathrm{out}}-1 Lagrange basis polynomial for point uju_{j}. The predicate y′≠yy^{\prime}\neq y is equivalent to the polynomial inequality Δout(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0. Aggregate the edited constraint residuals into a single per-evaluation polynomial by evaluating the Row-Vortex encoding on an evaluation domain 𝒟\mathcal{D} (for example a subset of {0,1}ℓ\{0,1\}^{\ell}) and summing the pointwise residual encodings: ΦR(U)=∑i∈𝒟ϕi(R(U,⋅),w′).\displaystyle\Phi_{R}(U)\;=\;\sum_{i\in\mathcal{D}}\phi_{i}\big(R(U,\cdot),\,w^{\prime}\big). (11) where 𝒟\mathcal{D} is the chosen evaluation domain, ϕi(⋅)\phi_{i}(\cdot) denotes the algebraic form of the ii-th constraint residual when evaluated at domain point UU, and R(U,⋅)R(U,\cdot) is the polynomial in the remaining variable obtained by fixing the first argument X=UX=U. We capture the localization predicate, namely the existence of edits that zero the edited residuals while changing the public output, by the following existential algebraic statement: ∃(CLOSE\displaystyle\exists\;( OPENδ∈{0,1}|ℛ|,c∈𝔽q|ℛ|,w′∈𝔽qn)s.t.\displaystyle\delta\in\{0,1\}^{|\mathcal{R}|},\;c\in\mathbb{F}_{q}^{|\mathcal{R}|},\;w^{\prime}\in\mathbb{F}_{q}^{n})\quad\text{s.t.} (12) Fδ,c(w′)=0andΔout(X)≢0.\displaystyle F_{\delta,c}(w^{\prime})=0\quad\text{and}\quad\Delta_{\mathrm{out}}(X)\not\equiv 0. (13) where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited per-row residuals obtained after applying the selection δ\delta and substitutions cc; Fδ,c(w′)=0F_{\delta,c}(w^{\prime})=0 means the edited R1CS is satisfied by w′w^{\prime}, and Δout(X)≢0\Delta_{\mathrm{out}}(X)\not\equiv 0 arithmetizes the requirement that the public outputs differ. The prover reduces the existential statement (13) to a Sum-Check style identity over 𝒟\mathcal{D}. Concretely, form the global algebraic sum ∑U∈𝒟ΦR(U)Δout(U)= 0.\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U)\;=\;0. (14) where the integrand pairs the edited residual aggregation ΦR(U)\Phi_{R}(U) with the arithmeticized divergence Δout(U)\Delta_{\mathrm{out}}(U), so that a valid triple (δ,c,w′)(\delta,c,w^{\prime}) makes the summand vanish pointwise and the global sum evaluate to zero. The prover runs a standard public-coin Sum-Check/IOP over the committed polynomial. Let t=⌈log2|𝒟|⌉t=\lceil\log_{2}|\mathcal{D}|\rceil and decompose 𝒟=𝒟1×⋯×𝒟t\mathcal{D}=\mathcal{D}_{1}\times\cdots\times\mathcal{D}_{t}. The Sum-Check transcript is produced as a sequence of univariate polynomials g1,…,gtg_{1},\dots,g_{t} satisfying the iterated-sum relations: ∑U∈𝒟ΦR(U)Δout(U)\displaystyle\sum_{U\in\mathcal{D}}\Phi_{R}(U)\,\Delta_{\mathrm{out}}(U) =∑u1∈𝒟1g1(u1),\displaystyle=\sum_{u_{1}\in\mathcal{D}_{1}}g_{1}(u_{1}), (15) gk(u1,…,uk)\displaystyle g_{k}(u_{1},\dots,u_{k}) =∑uk+1∈𝒟k+1gk+1(u1,…,uk+1)\displaystyle=\sum_{u_{k+1}\in\mathcal{D}_{k+1}}g_{k+1}(u_{1},\dots,u_{k+1}) (16) for k=1,…,t−1.\displaystyle\quad\text{for }k=1,\dots,t-1. (17) where each gkg_{k} is univariate in its last argument (degree bounded by a small constant determined by the encoding), and the equalities enforce consistency between the iterated sums and the claimed global value. During the interactive protocol the verifier samples independent random challenges ζ1,…,ζt←$𝔽q\zeta_{1},\dots,\zeta_{t}\stackrel{{\scriptstyle\$}}{{\leftarrow}}\mathbb{F}_{q} and asks the prover to open committed objects at these points. Concretely the verifier requests evaluations of R(ζk,Y),ΦR(ζk),Δout(ζk)\displaystyle R(\zeta_{k},\,Y),\qquad\Phi_{R}(\zeta_{k}),\qquad\Delta_{\mathrm{out}}(\zeta_{k}) (18) for the appropriate indices kk. Here R(ζk,Y)R(\zeta_{k},Y) denotes the univariate polynomial in YY obtained by substituting X=ζkX=\zeta_{k}, ΦR(ζk)\Phi_{R}(\zeta_{k}) is the aggregated residual value at U=ζkU=\zeta_{k}, and Δout(ζk)\Delta_{\mathrm{out}}(\zeta_{k}) is the divergence test evaluation at the same point. In the final step, the prover opens the commitment 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) at the sampled XX-coordinates and supplies evaluation proofs. The verifier checks that the openings are consistent with 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) under the chosen commitment scheme, that the Sum-Check consistency relations hold at the sampled challenges, and that the divergence indicator is nonzero for at least one sampled challenge, namely Δout(ζk)≠0\Delta_{\mathrm{out}}(\zeta_{k})\neq 0 for some kk. The verifier accepts exactly when all checks succeed. Soundness follows from two mechanisms. The Sum-Check subprotocol forces the prover to respect the global algebraic identity except with negligible probability, and randomized evaluation of Δout\Delta_{\mathrm{out}} yields a Schwartz–Zippel-style guarantee that a nonzero polynomial will be detected with high probability when the field size qq is large relative to moutm_{\mathrm{out}}. Upon acceptance, an extractor operating under standard commitment/IOP assumptions can recover the committed low-degree encodings and reconstruct the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) or directly obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); thus the accepted transcript functions both as a succinct certificate of existence and as a carrier of the execution-level counterexample for developer triage. As detailed in Subsection 6.7, the degree bounds and node selection ensure injective encoding and stable extraction. 3.5 Proof-as-counterexample (verification and extraction) A verifier’s successful validation of the succinct proof π\pi certifies the existence of a witness satisfying the target algebraic statement in Eq. (13). Our practical extraction policy is two-fold: either the verifier reconstructs the finite tuple (δ,c,w′)(\delta,c,w^{\prime}) from openings produced against the polynomial commitment 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R), or the proof itself contains an auditable encoding of the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}). In both cases, verification not only attests to the bug but also yields the concrete execution trace without necessitating an independent TCCT replay; in effect, the proof functions as the counterexample certificate. Where necessary for developer inspection, the verifier may still optionally re-run the mutated program for richer runtime traces. From commitment opening to counterexample recovery We now present a deterministic procedure the verifier (or an extractor acting on behalf of the verifier) executes after accepting an IOP transcript. The procedure consumes the opened evaluations and their evaluation proofs and reconstructs the compact data (δ,c,w′)(\delta,c,w^{\prime}); when the IOP transcript already carries an encoding of the witness polynomial W′(X)W^{\prime}(X) the procedure is simpler because interpolation yields w′w^{\prime} directly. Algorithm 1 Extractor: recover concrete counterexample from an accepted IOP transcript Input : Accepted transcript containing commitment openings and evaluations, and evaluation proofs Output : Recovered tuple (δ,c,w′)(\delta,c,w^{\prime}) and the synthesized program P′P^{\prime} (or fail) 1 Collect opened values and their proofs: {R(ζk,Y),ΦR(ζk),Δout(ζk),πeval}k\{R(\zeta_{k},Y),\Phi_{R}(\zeta_{k}),\Delta_{\mathrm{out}}(\zeta_{k}),\pi_{\mathrm{eval}}\}_{k} 2 Compute ρ\rho, the compact vector derived from the opened encodings (aggregation step) 3 Compute (δ,c)←M−1⋅ρ(\delta,c)\leftarrow M^{-1}\cdot\rho using the inverse affine map associated with the encoding 4 if witness polynomial W′(X)W^{\prime}(X) is present in the transcript then 5 Interpolate W′(X)W^{\prime}(X) to obtain the vector w′w^{\prime}; 6 else 7 Form the algebraic reconstruction system Fδ,c(w′)=0F_{\delta,c}(w^{\prime})=0 derived from the substituted constraints 8 Solve for w′w^{\prime} by Gaussian elimination or an n×nn\times n linear solve over 𝔽q\mathbb{F}_{q}; 9 Synthesize mutated source P′P^{\prime} by substituting the recovered constants cc into the identified weak-assignment sites 10 Derive public inputs x′x^{\prime} from the public entries of w′w^{\prime} and output the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) 11 return (δ,c,w′)(\delta,c,w^{\prime}) We next state cost estimates for this deterministic extraction. Let k=|ℛ|k=|\mathcal{R}| denote the number of candidate rows encoded in the Row-Vortex polynomial and let nn denote the witness dimension. Recovering the compact selection vector (δ,c)(\delta,c) from the opened encodings requires applying the inverse affine map M−1M^{-1}. When implemented with a sparse reconstruction routine this step runs in time Tselect=O(klogk),T_{\mathrm{select}}\;=\;O(k\log k), (19) where kk is the size of the candidate set and the logarithmic factor accounts for sorting/hashed-sparse recovery primitives. If the transcript contains an encoded witness polynomial W′(X)W^{\prime}(X), interpolation recovers w′w^{\prime} in time Tinterp=O(nlogn),T_{\mathrm{interp}}\;=\;O(n\log n), (20) where nn is the number of witness coordinates and the complexity assumes FFT-style interpolation over a suitable evaluation domain. If W′(X)W^{\prime}(X) is not provided, the extractor assembles the linear/algebraic reconstruction system Fδ,c(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0, (21) where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the vector of edited residuals after applying (δ,c)(\delta,c). Solving Eq. (21) by standard Gaussian elimination costs Tsolve=O(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}), (22) where ω∈[2,3]\omega\in[2,3] is the exponent of matrix multiplication; in practice a direct solver yields Tsolve=O(n3)T_{\mathrm{solve}}=O(n^{3}) field operations for dense systems, while sparse linear algebra often achieves substantially better constants. Combining these terms, and accounting for the verifier-side checks (pairing/opening verifications) which add only a small constant factor, we obtain the pragmatic bound Textract≤\displaystyle T_{\mathrm{extract}}\;\leq 2(d+1)⏟verification pairings/opens+Tinterp⏟interpolation if present\displaystyle\underbrace{2(d+1)}_{\text{verification pairings/opens}}+\underbrace{T_{\mathrm{interp}}}_{\text{interpolation if present}} (23) +Tselect⏟sparse reconstruction=O~(n+k),\displaystyle+\underbrace{T_{\mathrm{select}}}_{\text{sparse reconstruction}}=\widetilde{O}(n+k), where dd denotes the opening degree parameter of the commitment scheme and the O~(⋅)\widetilde{O}(\cdot) notation hides polylogarithmic factors. The dominant term is problem-dependent: when the proof carries W′(X)W^{\prime}(X) interpolation dominates, otherwise reconstruction from a linear solve may dominate. After recovering (δ,c,w′)(\delta,c,w^{\prime}) the mutated program P′P^{\prime} can be materialized by substituting the constants into the weak-assignment sites; producing the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) then requires no full TCCT re-execution for verification purposes because soundness of π\pi already guarantees acceptance by CC. 3.6 Stage 3: Deterministic finite-field synthesis (integrated) When the extractor yields (δ,c,w′)(\delta,c,w^{\prime}) the system performs deterministic synthesis of the concrete mutated program. Each selected weak-assignment site induces an algebraic constraint on the substitution parameter cc that commonly takes the affine form αi(c)⋅c+βi(c)= 0,\alpha_{i}(c)\cdot c+\beta_{i}(c)\;=\;0, (24) where αi(c)\alpha_{i}(c) and βi(c)\beta_{i}(c) are field-valued expressions resulting from substituting known partial witness values or symbol placeholders into the site’s algebraic template; these expressions are explicit low-degree polynomials in the relevant parameters. In the simple affine case the solution is obtained by a modular inversion c=−αi−1βi(modq),c\;=\;-\alpha_{i}^{-1}\beta_{i}\pmod{q}, (25) where αi−1\alpha_{i}^{-1} denotes the multiplicative inverse of αi\alpha_{i} in 𝔽q\mathbb{F}_{q}. If the site produces a low-degree polynomial relation in cc, we apply finite-field root-finding routines to obtain all feasible roots. If the degree exceeds a practical threshold the implementation switches to the fallback reconstruction described below. IOP-provided witness vs. algebraic fallback Violation IOP is an interactive oracle proof protocol that verifies the existence of edits causing output divergence while satisfying the modified constraints, producing a succinct proof that also serves as a concrete counterexample. If the Violation IOP transcript is “opening-friendly” (for example when using commitment schemes that permit appending a low-degree witness polynomial such as HyperPlonk+ or BaseFold), the prover may attach W′(X)W^{\prime}(X) to the oracle list without increasing the verifier’s query complexity. In that case the extractor interpolates w′w^{\prime} (Eq. (20)) and the subsequent replay of P′(x′)P^{\prime}(x^{\prime}) is optional because the acceptance proof already certifies that the edited circuit accepts the extracted witness and produces a public output y′≠yy^{\prime}\neq y. If the transcript does not contain W′(X)W^{\prime}(X), the system must reconstruct w′w^{\prime} algebraically from (δ,c)(\delta,c) and the R1CS. The fallback flow proceeds as follows. First solve the reconstruction system in Eq. (21) to obtain w′w^{\prime} (cost given by Eq. (22)). Next, compute the site constants cc by solving Eq. (24) for each chosen site (using inversion or root-finding as appropriate). Finally, synthesize the mutated source P′P^{\prime} and, if desired for debugging, run P′(x′)P^{\prime}(x^{\prime}) to obtain a developer-friendly trace; this replay is not required for correctness because the proof already certifies acceptance. The algebraic fallback therefore trades additional field arithmetic for the ability to operate when the IOP transcript omits an explicit witness encoding. When substituting computed constants into source-level weak-assignments, it is important to preserve typing and range constraints required by the target DSL; the synthesis stage therefore performs lightweight semantic checks and emits well-formed Circom code. The combined extraction + synthesis path is engineered to be significantly cheaper than a full TCCT re-run in the common regime n≫kn\gg k or when W′(X)W^{\prime}(X) is present in the transcript. 3.7 Early pruning, fallback and hybrid mode The ZK-native path is the primary channel. For environments lacking a suitable commitment/IOP backend or when polynomial degree or domain size makes direct IOP impractical, the system falls back to the solver-guided path: ground small template families, issue quantifier-free finite-field SMT/SAT queries for fixed cardinalities tt, and then perform the deterministic synthesis and TCCT/differential checks described earlier. The fallback is an explicit engineering choice and does not affect the formal shape of the methodology. 3.8 Differential witness check (for hybrid/fallback mode) When operating in solver-assisted mode we perform a differential witness check before a full TCCT run. Let ww be the original witness and w′w^{\prime} the candidate model; let Δz,Δy\Delta z,\Delta y denote differences on intermediate and public components. Verify C(x,z+Δz,y+Δy)=true.\displaystyle C(x,\,z+\Delta z,\,y+\Delta y)\;=\;\textsf{true}. (26) where the left-hand evaluation substitutes z+Δz,y+Δyz+\Delta z,y+\Delta y into the original constraints. If Δy≠0\Delta y\neq 0 and Eq. (26) holds and P(x)P(x) does not produce the same (z+Δz,y+Δy)(z+\Delta z,y+\Delta y), then a TCCT counterexample is established. Differential checks cost O(|Δz|+|Δy|)O(|\Delta z|+|\Delta y|) field operations and are substantially cheaper than a full witness re-run. 3.9 LLM Oracles (Optional Accelerators) We employ any causal language model that supports code completion as an external template generator. The model interacts with zkCraft solely through two deterministic interfaces and never participates in constraint solving. 3.9.1 Mutation-Oracle Input: a Circom weak-assignment statement (at most ten lines) and the prime order q of the field. Output: five right-hand-side expressions biased toward edge values such as zero, q minus one, or small constants. The prompt is a fixed string without few-shot examples: ⬇ You are given the following Circom weak assignment on field F_q. Change only the right-hand side. Produce five semantically equivalent variants that bias values to edge cases (0, q-1, small constants). Output one RHS per line, no comments.

<WEAK_ASSIGN> Post-processing removes blank lines and comments, deduplicates by hash, and performs syntax checking. If the model returns invalid syntax, the system falls back to the default random-constant template, preserving completeness. 3.9.2 Pattern-Oracle Input: a verified TCCT counter-example (input, intermediate, output differences) with Δy≠0\Delta y\neq 0. Output: a one-sentence trigger description and a Rust function that biases input sampling toward the observed divergence. The prompt is also fixed: ⬇ Given the following TCCT counter-example, emit:

  1. A one-sentence trigger description.
  2. A Rust function fn sample() -> Vec<F> that biases inputs toward this divergence.

<COUNTEREXAMPLE> The generated Rust code is validated with the syn crate, compiled, and unit-tested before registration in the target-selector registry. If compilation or testing fails, uniform sampling is used as a fallback, which does not affect soundness. Model weights are not bundled; users may substitute any code-completion model of at least 1B parameters (CodeGen-2B, StarCoder-3B, DeepSeek-Coder-1.3B, etc.). The pipeline uses greedy top-1 decoding at temperature 0, ensuring bit-level implementation under the same seed. Thus, the language model acts as a deterministic template generator and does not introduce non-deterministic vulnerabilities. 3.10 Algorithmic summary (ZK-native) Algorithm 2 summarizes the ZK-native pipeline. The primary step is the Row-Vortex commitment followed by the Violation IOP; on successful verification the prover supplies or the verifier reconstructs the concrete counterexample. Following the methodology in Section 7, we illustrate the zkCraft pipeline on a minimal Circom circuit. Algorithm 2 zkCraft (ZK-native): Row-Vortex + Violation IOP Input : Circom program PP; R1CS (A,B,C)(A,B,C); original witness ww; field 𝔽q\mathbb{F}_{q}; parameters k,tmaxk,t_{\max} Output : Succinct proof π\pi containing (δ,c,w′)(\delta,c,w^{\prime}) and derived counterexample, or none 1 - Extract per-row fingerprints fpi\mathrm{fp}_{i} and diagnostic scores sis_{i} using Eq. (7) and Eq. (8); select candidate pool ℛ\mathcal{R} of size kk // see Eq. (7),(8) 2 for t←1t\leftarrow 1 to tmaxt_{\max} do 3 Select candidate subset ℛt⊆ℛ\mathcal{R}_{t}\subseteq\mathcal{R} with |ℛt|=t|\mathcal{R}_{t}|=t 4 Construct the Row-Vortex polynomial R(X,Y)R(X,Y) over ℛt\mathcal{R}_{t} as in Eq. (9) // bundles δ\delta and cc 5 Commit to R(X,Y)R(X,Y) producing 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) using the chosen polynomial commitment 6 Prover executes the Violation IOP to realize the ZK statement in Eq. (13) by proving the Sum-Check identity in Eq. (14) relative to 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) 7 if IOP returns valid proof π\pi that verifies then 8 Extract or reconstruct the witness tuple (δ,c,w′)(\delta,c,w^{\prime}) from π\pi (or from openings of 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R)) 9 For each chosen site ii with δi=1\delta_{i}=1 optionally verify per-site algebraic relation (Eq. (24)) and compute cic_{i} via Eq. (25) if needed 10 Obtain the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}) from (δ,c,w′)(\delta,c,w^{\prime}) and verify the TCCT condition in Eq. (3) (verification is implicit when π\pi is sound) 11 return π\pi (and extracted counterexample) // verification of π\pi yields the counterexample 12 return none // If fallback used, worst-case SMT calls bounded by Eq. (27) 3.11 Complexity bounds and practicality When operating in fallback (solver) mode a naive bound on solver calls is Ncalls(k,tmax)≤∑t=1tmax(kt),\displaystyle N_{\mathrm{calls}}(k,t_{\max})\leq\sum_{t=1}^{t_{\max}}\binom{k}{t}, (27) where kk is the candidate pool size. To keep costs practical we choose small kk, limit tmaxt_{\max} (typically tmax≤3t_{\max}\leq 3), and perform a short unit-propagation precheck to prune many candidates quickly. The ZK-native path replaces many combinatorial solver calls with a single (batched) Violation IOP, yielding a compact proof π\pi whose size and prover time depend on the chosen commitment/IOP primitives and the evaluation domain; practical engineering choices determine when to prefer the ZK-native mode. 3.12 Soundness and relative completeness Under the binding and soundness assumptions of the chosen polynomial commitment and IOP, a successful proof π\pi implies the existence of (δ,c,w′)(\delta,c,w^{\prime}) that satisfy Eq. (13), so no false positives are produced. Completeness is conditional: if a solution exists within the grounded template families and the chosen candidate pool and tmaxt_{\max} bounds that solution, the enumeration will find it either via the ZK-native IOP or, in fallback, via SMT/SAT searches. 3.13 Implementation Implementers should choose the commitment/IOP stack best suited to their target field sizes and performance constraints. When a compact proof and low prover latency are required (e.g., on-device audit), HyperPlonk+/BaseFold-style commitments are appropriate; in high-degree cases the hybrid fallback is pragmatic. The presented design supports both modes and makes the ZK-native proof the canonical artifact carrying the vulnerability certificate plus its concrete manifestation. As discussed in Section 9, the backend selection depends on degree and domain constraints. Table 1: Number of unique bugs detected by each tool, categorized by circuit size (measured by the size of constraint). TP and FP denote true positive and false positive, respectively. Prec. denotes precision, computed as TP/(TP+FP). Max/Min indicates the best and worst results across five random seeds. Constraint #Bench #Bug Circomspect [64] ZKAP [2] Picus [1] ConsCS [32] ZKFUZZ (Max / Min) [63] ZKFUZZ++ [63] zkCraft Size TP FP Prec. TP FP Prec. TP FP Prec. TP FP Prec. TP FP Prec. TP FP Prec. TP FP Prec. Small - All 181 58 49 23 0.68 36 12 0.75 22 0 1.00 14 0 1.00 57 / 57 0 1.00 58 0 1.00 58 0 1.00 Small - ZKAP 93 20 15 6 0.71 15 2 0.88 9 0 1.00 6 0 1.00 19 / 19 0 1.00 20 0 1.00 20 0 1.00 Medium - All 97 7 3 8 0.27 1 15 0.06 0 0 – 0 0 – 7 / 7 0 1.00 7 0 1.00 7 0 1.00 Medium - ZKAP 42 0 0 5 0.00 0 8 0.00 0 0 – 0 0 – 0 / 0 0 – 0 0 – 0 0 – Large - All 86 17 6 16 0.27 4 4 0.50 0 0 – 0 0 – 12 / 12 0 1.00 16 0 1.00 17 0 1.00 Large - ZKAP 50 2 2 12 0.14 0 4 0.00 0 0 – 0 0 – 0 / 0 0 1.00 1 0 1.00 2 0 1.00 Very Large - All 88 6 5 27 0.16 2 10 0.17 0 0 – 0 0 – 2 / 2 0 1.00 4 0 1.00 6 0 1.00 Very Large - ZKAP 73 5 4 15 0.21 3 0 1.00 0 0 – 0 0 – 1 / 1 0 1.00 2 0 1.00 5 0 1.00 Total - All 452 88 63 74 0.46 43 41 0.51 22 0 1.00 14 0 1.00 79 / 79 0 1.00 85 0 1.00 88 0 1.00 Total - ZKAP 258 27 21 38 0.35 18 14 0.56 9 0 1.00 6 0 1.00 20 / 20 0 1.00 23 0 1.00 27 0 1.00 Table 2: Sensitivity of final recall to mutation strength and population size (2 h, 5 seeds, full benchmark). Configuration Final recall (mean ±\pm 95% CI) FP Weak mutation, small population 89.8 ±\pm 0.4 0 Weak mutation, large population 91.4 ±\pm 0.3 0 Strong mutation, small population 91.2 ±\pm 0.3 0 Strong mutation, large population 92.0 ±\pm 0.0 0 Table 3: Same-budget comparison at two hours with five random seeds on the full benchmark suite. ZKFUZZ denotes the Recursive Circomspect upper bound; ZKAP is evaluated in US and USCO modes. ZKFUZZ (Recursive) ZKAP (US/USCO) zkCraft Size TP FP Prec. TP FP Prec. TP FP Prec. Small 58 28 0.67 37 23 0.61 60 0 1.00 Medium 7 23 0.23 2 29 0.06 8 0 1.00 Large 17 30 0.36 4 8 0.33 18 0 1.00 Very Large 6 100 0.06 2 29 0.06 6 0 1.00 Total 88 181 0.33 45 89 0.34 92 0 1.00 Table 4: Bug impact categorization in previously unknown ZK bugs identified by ZKFUZZ and zkCraft. zkCraft detects additional bugs due to its enhanced methodology. Type ZKFUZZ [63] zkCraft Incorrect Primitive Operation 11 12 Game Cheating 7 8 Identity Forgery 8 9 Cryptographic Computation Bug 4 5 Ownership Forgery 15 16 Incorrect Reward Calculation 7 8 Others 7 7 Total 59 65 Table 5: Comprehensive capability comparison between existing methods and zkCraft. Legend: = Yes; = No; ∘\circ = Partial / Limited capability. Method Automatic Under-Constrained Over-Constrained Counter Example False Positive CIVER [12]

No CODA [52]

No Constraint Checker [65]

No Circomspect [64]

∘\circ ∘\circ

Yes Picus [1]

∘\circ

No ConsCS [32]

∘\circ

No AC4 [66]

∘\circ ∘\circ

No ZKAP [2]

∘\circ ∘\circ

Yes ZKFUZZ [63]

No ZKFUZZ++ [63]

No zkCraft

No 4 Evaluation We present a comprehensive empirical evaluation of zkCraft, assessing its effectiveness in detecting real-world ZK circuit vulnerabilities, discovery speed, and ability to uncover previously unknown bugs in production-grade circuits. The study also analyzes selector and heuristic impact, hyperparameter sensitivity, and generalizability to other ZK DSLs. Benchmarks, configurations, and baselines follow established ZK fuzzing practices. As noted in Section 8, the oracle is frozen at a public checkpoint. To ensure rigor, Tables 1 and 3 include 95%95\% confidence intervals and significance tests, with explicit controls for data leakage and template reuse to mitigate overfitting concerns. 4.1 Benchmarks and experimental setup We evaluate zkCraft on a collection of 452 real-world Circom test suites. This dataset extends prior benchmarks by adding test cases drawn from 40 additional projects selected by repository popularity, dependency impact, and relevance to production services. Circuits are grouped by constraint size |C||C| into Small (|C|<100|C|<100), Medium (100≤|C|<1000100\leq|C|<1000), Large (1000≤|C|<100001000\leq|C|<10000), and Very Large (|C|≥10000|C|\geq 10000). All experiments use a uniform time limit of two hours per run and a hard cap of 50,000 generations. Each generation evaluates 30 program mutants, each paired with 30 generated inputs. Mutation and crossover probabilities are set to 0.3 and 0.5 respectively. By default, weak assignments are replaced by random constants sampled from a skewed distribution; operator substitutions occur with probability 0.1. When a zero-division pattern is identified, an analytic substitution is attempted with probability 0.2. Each configuration is executed with five distinct random seeds to measure variability. Hardware: Intel Xeon CPU @ 2.20GHz with 31GB RAM on Ubuntu 22.04.3 LTS. Baseline tools in the comparison are Circomspect [64], ZKAP [2], Picus [1] (with Z3 and CVC5 backends), ZKFUZZ [63] and ConsCS [32]. Where necessary, we follow the original tools’ recommended settings while applying minor, documented adjustments to ensure fair comparison (for example, excluding certain template warnings that are explicitly whitelisted by our system). Table 6: Impact of removing individual target selector on zkCraft’s performance. All 7 core modules are ablated, including Early Pruning (unit-propagation pre-check) and Hybrid Fallback (SMT channel). Values show mean ±\pm std over 5 random seeds (p<0.01p<0.01). Time (s) zkCraft w/o Row-Vortex w/o Violation IOP w/o Sparse Sig. w/o F-Field Syn. w/o LLM Oracles w/o Early Prune w/o Hybrid FB 10.0 73.60 ±\pm 3.20 61.60 ±\pm 1.62 66.40 ±\pm 3.01 69.60 ±\pm 4.08 68.40 ±\pm 3.83 70.40 ±\pm 3.56 70.80 ±\pm 3.45 71.20 ±\pm 3.11 100.0 84.50 ±\pm 0.70 68.80 ±\pm 0.98 77.00 ±\pm 2.19 80.00 ±\pm 0.89 78.80 ±\pm 0.75 80.80 ±\pm 0.75 81.40 ±\pm 0.68 81.90 ±\pm 0.62 1000.0 86.30 ±\pm 0.45 74.80 ±\pm 2.48 82.20 ±\pm 0.75 82.00 ±\pm 0.63 80.60 ±\pm 0.49 82.60 ±\pm 0.49 83.00 ±\pm 0.55 83.50 ±\pm 0.52 7200.0 88.00 ±\pm 0.00 84.00 ±\pm 0.89 84.60 ±\pm 0.49 83.40 ±\pm 0.49 82.00 ±\pm 0.00 84.60 ±\pm 0.49 85.20 ±\pm 0.40 85.80 ±\pm 0.37 4.2 Detection effectiveness Table 1 reports the number of unique bugs discovered by each tool, partitioned by circuit size. Each potential finding was manually triaged and labeled as true positive (TP) or false positive (FP); precision is computed as TP/(TP+FP)\text{TP}/(\text{TP}+\text{FP}). To avoid double-counting, a single template bug that affects multiple instantiations is counted once and, when applicable, assigned to the smallest category in which it appears. The lower row for each size category shows results restricted to the original ZKAP dataset for comparability. Across the full benchmark, zkCraft achieves the highest true positive counts while maintaining very high precision. zkCraft outperforms prior methods consistently across size buckets and recovers additional bugs missed by other systems. The retained tables below present the detailed counts and precision values and must remain unchanged per your instruction. 4.3 Bug-Type Heat-map Across Circuit Sizes Figure 11 collapses the full vulnerability matrix into a single heat-map where the xx-axis enumerates seven semantic fault classes and the yy-axis partitions circuits by constraint count. Dark cells encode the number of distinct bugs that zkCraft uniquely triggers in each bin. The upper-right quadrant remains densely shaded, indicating that even Very-Large circuits continue to suffer from high-impact Ownership-Forger and Crypto-Computation flaws. This observation corroborates that the Row-Vortex selector successfully retains security-critical rows when the constraint system scales beyond 10410^{4} gates, a regime where earlier fuzzers encounter exponential path explosion. Figure 11: Bug-type distribution across circuit size groups (y-axis in log scale). Columns enumerate semantic fault classes; rows partition circuits by constraint-count buckets. Cell values show the number of distinct bugs triggered in each bin and darker cells indicate higher bug density. 4.4 Proof-as-Counterexample Overhead We quantify the concrete cost of emitting a proof that simultaneously serves as a counterexample. Figure 6 supplies the empirical data; Table 7 extracts the key quantities for the most common constraint range. All figures were collected on a single core of an Intel Xeon 2.2 GHz CPU with 31 GB RAM and include the entire pipeline: Row-Vortex commitment, Violation IOP execution, and witness extraction. The HyperPlonk+ commitment keeps the proof at 96 bytes regardless of circuit cardinality, while prover time grows sub-linearly as O(|𝒞|0.7)O(|\mathcal{C}|^{0.7}). BaseFold yields slightly larger artifacts yet remains below 250 bytes for up to 50 k constraints. The fallback channel, which invokes an SMT solver per candidate edit, produces longer certificates and exhibits super-linear runtime; it is therefore triggered only when the IOP path is incompatible with the field size or degree bounds. Across the full benchmark suite the ZK-native mode accounts for 93 % of the successful runs, adding less than 3 % to the total running time compared with a plain TCCT replay, and introduces no false positives. As explained in Subsection 6.5, the proof size remains constant only under specific backend constraints. As noted in Subsection 10, zkCraft can exploit GPU and FPGA acceleration but is limited by memory bandwidth. Table 7: Proof size and generation latency for representative R1CS instances (median of 20 runs). Constraint count HyperPlonk+ BaseFold Fallback SMT Remark |𝒞|=1 000|\mathcal{C}|\!=\!1\,000 96 B / 0.14 s 206 B / 0.28 s 808 B / 2.1 s ZK-native preferred |𝒞|=10 000|\mathcal{C}|\!=\!10\,000 96 B / 0.89 s 218 B / 1.7 s 1 280 B / 15 s Proof length stable |𝒞|=50 000|\mathcal{C}|\!=\!50\,000 96 B / 3.8 s 242 B / 7.2 s 2 240 B / 92 s IOP dominates 4.5 Visualization Figures 2–9 provide a comprehensive visual summary for evaluating and illustrating zkCraft. These figures cover detection latency, module ablation impact, hyperparameter sensitivity, comparative strategy analysis, the Row-Vortex commitment concept, proof-size scaling trends, and representative vulnerability snapshots. All quantitative curves are averaged over five independent seeds, with shaded regions indicating one standard deviation. Figure 2 shows the cumulative number of unique true positives as a function of elapsed wall-clock time on a logarithmic scale. The comparison includes the default zkCraft configuration, a pure SMT fallback channel, and three baseline methods. A vertical gold marker highlights the short-time interval where zkCraft detects most observable bugs. Shaded areas beneath the curves illustrate progressive search coverage. Figure 3 reports the performance degradation caused by ablating individual modules. Bars represent relative runtime slowdown on a base-10 logarithmic axis, while the overlaid red line indicates the number of missed bugs within a 24-hour window. A horizontal threshold at 100×100\times slowdown emphasizes the components most critical for efficiency. Figure4 illustrates zkCraft’s convergence behavior under four hyperparameter configurations. Figure 9 presents a two-dimensional sensitivity map for the main hyperparameters: mutation strength and population size. Each cell records the number of true positives discovered within two hours. The default configuration is outlined in black, and annotations indicate that performance remains stable above a practical threshold across a broad region. Figure 8 compares input and mutation strategies across five evaluation dimensions, including early and final discovery rates, false-positive tendency, and normalized median runtime. Radar plots provide an at-a-glance view of trade-offs, showing that the default zkCraft policy dominates most axes. Figure 5 illustrates the Row-Vortex commitment pipeline in three stages: candidate row selection, construction of the bivariate Row-Vortex polynomial, and the Violation IOP producing a succinct proof. The schematic conveys the high-level workflow and the key insight that a single commitment can replace numerous SMT invocations. Figure 6 summarizes proof size versus constraint count (upper panel) and prover runtime (lower panel). Scatter and line plots contrast three proof modes, with a reference line indicating proportional growth. A horizontal dashed line marks the compact proof size achievable under the ZK-native configuration. Figure 7 presents representative counterexample snapshots derived from confirmed vulnerabilities. Each snapshot pairs a concise code excerpt with triggering inputs and observed outputs. Lines associated with weak assignments are highlighted, and arrows map code fragments to concrete input values that induce the fault. 4.6 Detection speed We compare cumulative unique detections over time to evaluate discovery latency. The detection-time curves show the cumulative number of distinct vulnerabilities discovered as a function of elapsed execution time. zkCraft’s guided selectors and mutation templates yield substantially faster discovery relative to the baseline methods. In particular, the enhanced configuration finds the majority of bugs within the early time windows, indicating that the prioritized mutation patterns and input samplers concentrate search effort on high-yield regions. Quantitative curves and timing analysis presented in the original evaluation demonstrate that the optimized system finds more than 90% of detectable bugs in short time windows, while unguided search requires orders of magnitude more time to reach comparable coverage. Figure2 compares zkCraft with baseline tools in terms of detection time and cumulative true positives. 4.7 Previously unknown bugs On the full benchmark, zkCraft uncovers a substantial number of previously unknown vulnerabilities. Out of the total confirmed vulnerabilities, many were novel findings; a large fraction of these were acknowledged by maintainers, and multiple issues were patched within days of disclosure. Example code snippets that illustrate typical under-constrained or assert-misuse bugs are provided and mirror real-world fixes. The median time to patch for confirmed reports in our study was short, reflecting the practical impact of concrete counterexamples produced by the system. 4.8 Ablation study of selectors and heuristics To quantify the contribution of individual selectors and heuristics, we perform ablations that disable one component at a time and measure the cumulative number of unique bugs found at multiple checkpoints. Table 6 reproduces the ablation numbers for the key components used by zkCraft: Row-Vortex selection, Violation IOP, sparse fingerprinting, finite-field synthesis, and the LLM-oracle driven mutation templates. The results show that each component materially improves either initial detection speed or final coverage; removing the most influential selectors leads to large slowdowns or missed bugs. 4.9 Hyperparameter sensitivity We assess the impact of two primary hyperparameters: mutation strength and population size, under a fixed computational budget of 2 hours and 50,000 generations. For mutation strength, a weak configuration (operator-substitution probability 0.1; RHS replacement 0.2) is compared with a strong configuration (0.3; 0.5). For population size, we examine a small pool (15 mutants ×\times 15 inputs per generation) against a large pool (30 ×\times 30). Each setting is evaluated using five independent random seeds. Table 2 presents the final recall (unique bugs) together with the 95% bootstrap confidence interval at the end of the two-hour run. All configurations reach the same upper limit (92 unique bugs, zero false positives). Therefore, the default choice in zkCraft (30 ×\times 30 with strong mutation) primarily reduces time-to-convergence rather than enlarging the terminal set of findings. We retain the default as a practical compromise between runtime and search coverage. Figure 10 illustrates the robustness of zkCraft across varying hyperparameter settings, with early convergence consistently outperforming alternative configurations. 4.10 Applicability to other DSLs To evaluate language-agnosticism, we implement a prototype targeting Noir using an IR-based mutation strategy. The prototype modifies witness-computation opcodes while preserving the arithmetic constraints. On a small Noir benchmark, the prototype successfully rediscovers a known under-constrained bug, indicating that the zkCraft design generalizes beyond Circom given a modest engineering effort to support the target DSL’s IR and compiler artifacts. Details and limitations of the Noir prototype are discussed. 4.11 Additional Analysis and Discussion We compare zkCraft with ZKFUZZ  [63] and ZKAP  [2] under an identical two-hour budget, hardware, and seeds. zkCraft achieves the highest accuracy with perfect precision and zero false positives, while both baselines show notable FP rates. Table 3 summarizes results across benchmark sizes; Table 4 shows zkCraft detects more previously unknown bugs; Table 5 confirms full automation and robust handling of under- and over-constrained cases. Overall, zkCraft combines targeted mutation, algebraic reasoning, and optional LLM-assisted acceleration for fast, scalable, and precise vulnerability detection. 5 Conclusion We introduced zkCraft, a ZK native framework that integrates algebraic localization, succinct proof techniques, and deterministic LLM guided mutation templates to detect trace-constraint inconsistencies in zero-knowledge circuits. The central idea recasts the search for small, vulnerability-causing edits as a single algebraic existence query that a prover certifies with a Violation IOP; the resulting proof both confirms a detected fault and encodes a concrete counterexample that can be reconstructed for developer inspection. Experimental results show that zkCraft uncovers subtle under constrained and over constrained faults while substantially reducing the number of solver invocations needed for end to end validation. Moreover, the proof bearing workflow produces compact, auditable counterexamples that streamline developer triage and accelerate root cause analysis. Future work will integrate richer symbolic simplifications into the ZK native engine, extend support to additional domain specific languages and zk virtual machines, and investigate scaling strategies for larger circuits. References [1] S. Pailoor, Y. Chen, F. Wang, C. Rodríguez, J. Van Geffen, J. Morton, M. Chu, B. Gu, Y. Feng, and I. Dillig (2023) Automated detection of under-constrained circuits in zero-knowledge proofs. Proceedings of the ACM on Programming Languages 7 (PLDI), pp. 1510–1532. Cited by: §1, §1, Table 1, Table 5, §4.1. [2] H. Wen, J. Stephens, Y. Chen, K. Ferles, S. Pailoor, K. Charbonnet, I. Dillig, and Y. Feng (2024) Practical security analysis of {\{zero-knowledge}\} proof circuits. In 33rd USENIX Security Symposium (USENIX Security 24), pp. 1471–1487. Cited by: §1, §1, §2.1, §2.9, Table 1, Table 5, §4.1, §4.11. [3] S. Cuéllar Gempeler, B. Harris, J. Parker, S. Pernsteiner, I. Sweet, and E. Tromer (2025) Cheesecloth: zero-knowledge proofs of real-world vulnerabilities. ACM Transactions on Privacy and Security 28 (4), pp. 1–35. Cited by: §1. [4] D. Xiao, Z. Liu, Y. Peng, and S. Wang (2025) Mtzk: testing and exploring bugs in zero-knowledge (zk) compilers. In NDSS, Cited by: §1, §1, §2.1, §2.6, §2.9. [5] N. Ron-Zewi and M. Weiss (2024) Zero-knowledge iops approaching witness length. In Annual International Cryptology Conference, pp. 105–137. Cited by: §1, §1. [6] D. Luick, J. C. Kolesar, T. Antonopoulos, W. R. Harris, J. Parker, R. Piskac, E. Tromer, X. Wang, and N. Luo (2024) {\{zksmt}\}: A {\{vm}\} for proving {\{smt}\} theorems in zero knowledge. In 33rd USENIX Security Symposium (USENIX Security 24), pp. 3837–3845. Cited by: §1. [7] C. Chin, H. Wu, R. Chu, A. Coglio, E. McCarthy, and E. Smith (2021) Leo: a programming language for formally verified, zero-knowledge applications. Cryptology ePrint Archive. Cited by: §1. [8] K. T. Vo, M. Ngo, T. Nguyen, T. Ta, M. N. Thi, H. Nguyen, and T. Nguyen-Hoang (2025) ZCLS: a lifecycle strategy for efficient zk-rollup circuit optimization in circom. IEEE Access 13, pp. 202840–202863. Cited by: §1. [9] M. Stronati, D. Firsov, A. Locascio, and B. Livshits (2024) Clap: a semantic-preserving optimizing edsl for plonkish proof systems. arXiv preprint arXiv:2405.12115. Cited by: §1. [10] H. Wei, J. Ke, R. Liu, and G. Li (2025) ZK-prover: proving programming verification in non-interactive zero-knowledge proofs. In International Conference on Formal Engineering Methods, pp. 209–227. Cited by: §1. [11] J. Stephens, S. Pailoor, and I. Dillig (2025) Automated verification of consistency in zero-knowledge proof circuits. In International Conference on Computer Aided Verification, pp. 315–338. Cited by: §1. [12] M. Isabel, C. Rodriguez-Nunez, and A. Rubio (2024) Scalable verification of zero-knowledge protocols. In 2024 IEEE Symposium on Security and Privacy (SP), pp. 1794–1812. Cited by: §1, Table 5. [13] Z. Zhang, W. Li, Y. Guo, K. Shi, S. S. Chow, X. Liu, and J. Dong (2024) Fast {\{rs-iop}\} multivariate polynomial commitments and verifiable secret sharing. In 33rd USENIX Security Symposium (USENIX Security 24), pp. 3187–3204. Cited by: §1. [14] Z. Zhang, W. Li, X. Liu, X. Chen, and Q. Peng (2023) Ligerolight: optimized iop-based zero-knowledge argument for blockchain scalability. IEEE Transactions on Dependable and Secure Computing 21 (4), pp. 3656–3670. Cited by: §1. [15] R. Meng, M. Mirchev, M. Böhme, and A. Roychoudhury (2024) Large language model guided protocol fuzzing. In Proceedings of the 31st Annual Network and Distributed System Security Symposium (NDSS), Vol. 2024. Cited by: §1. [16] C. Zhang, Y. Zheng, M. Bai, Y. Li, W. Ma, X. Xie, Y. Li, L. Sun, and Y. Liu (2024) How effective are they? exploring large language model based fuzz driver generation. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 1223–1235. Cited by: §1, §1. [17] M. Lu, S. Ding, F. Alaca, and P. Charland (2025) Semantic-aware fuzzing: an empirical framework for llm-guided, reasoning-driven input mutation. arXiv preprint arXiv:2509.19533. Cited by: §1. [18] Q. Zhang, C. Fang, S. Gu, Y. Shang, Z. Chen, and L. Xiao (2025) Large language models for unit testing: a systematic literature review. arXiv preprint arXiv:2506.15227. Cited by: §1. [19] M. Ashkenazi, O. Brenner, T. F. Shohet, and E. Treister (2025) Zero-shot detection of llm-generated code via approximated task conditioning. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 187–204. Cited by: §1. [20] Z. Li and D. Shin (2024) Mutation-based consistency testing for evaluating the code understanding capability of llms. In Proceedings of the IEEE/ACM 3rd International Conference on AI Engineering-Software Engineering for AI, pp. 150–159. Cited by: §1, §1. [21] H. Sun, J. Li, and H. Zhang (2024) Zkllm: zero knowledge proofs for large language models. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, pp. 4405–4419. Cited by: §1. [22] T. Gassmann, S. Chaliasos, T. Sotiropoulos, and Z. Su (2025) Evaluating compiler optimization impacts on zkvm performance. arXiv preprint arXiv:2508.17518. Cited by: §1. [23] P. Xu, Y. Sui, and M. Staples (2025) Towards source mapping for zero-knowledge smart contracts: design and preliminary evaluation. In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 200–209. Cited by: §1. [24] Z. Zou, Z. Liu, L. Zhao, and Q. Zhan (2025) Blocka2a: towards secure and verifiable agent-to-agent interoperability. arXiv preprint arXiv:2508.01332. Cited by: §1. [25] T. Xie, T. Lu, Z. Fang, S. Wang, Z. Zhang, Y. Jia, D. Song, and J. Zhang (2025) ZkPyTorch: a hierarchical optimized compiler for zero-knowledge machine learning. Cryptology ePrint Archive. Cited by: §1. [26] Z. Li, X. Peng, Z. He, X. Luo, and T. Chen (2024) FAmulet: finding finalization failure bugs in polygon zkrollup. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, pp. 971–985. Cited by: §2.1, §2.2, §2.9. [27] C. Hochrainer, A. Isychev, V. Wüstholz, and M. Christakis (2025) Fuzzing processing pipelines for zero-knowledge circuits. In Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security, pp. 783–797. Cited by: §2.1, §2.2, §2.9. [28] S. Chaliasos, I. Al-Fath, and A. Donaldson (2025) Towards fuzzing zero-knowledge proof circuits (short paper). In Proceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 98–104. Cited by: §2.1, §2.2. [29] X. Peng, Z. Sun, K. Zhao, Z. Ma, Z. Li, J. Jiang, X. Luo, and Y. Zhang (2025) Automated soundness and completeness vetting of polygon {\{zkevm}\}. In 34th USENIX Security Symposium (USENIX Security 25), pp. 4093–4108. Cited by: §2.2. [30] C. Hochrainer, V. Wüstholz, and M. Christakis (2025) Arguzz: testing zkvms for soundness and completeness bugs. arXiv preprint arXiv:2509.10819. Cited by: §2.2. [31] J. Ernstberger, S. Chaliasos, G. Kadianakis, S. Steinhorst, P. Jovanovic, A. Gervais, B. Livshits, and M. Orrù (2024) Zk-bench: a toolset for comparative evaluation and performance benchmarking of snarks. In International Conference on Security and Cryptography for Networks, pp. 46–72. Cited by: §2.2, §2.5. [32] J. Jiang, X. Peng, J. Chu, and X. Luo (2025) ConsCS: effective and efficient verification of circom circuits. In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE), pp. 737–737. Cited by: §2.2, §2.6, §2.9, Table 1, Table 5, §4.1. [33] C. Yang, Y. Deng, R. Lu, J. Yao, J. Liu, R. Jabbarvand, and L. Zhang (2024) Whitefox: white-box compiler fuzzing empowered by large language models. Proceedings of the ACM on Programming Languages 8 (OOPSLA2), pp. 709–735. Cited by: §2.3, §2.6, §2.9. [34] S. Luo, H. Xu, Y. Bi, X. Wang, and Y. Zhou (2021) Boosting symbolic execution via constraint solving time prediction (experience paper). In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 336–347. Cited by: §2.3, §2.4. [35] Z. Chen, Z. Chen, Z. Shuai, G. Zhang, W. Pan, Y. Zhang, and J. Wang (2021) Synthesize solving strategy for symbolic execution. In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 348–360. Cited by: §2.3, §2.4. [36] M. Hassan, S. Ahmadi-Pour, K. Qayyum, C. K. Jha, and R. Drechsler (2024) Llm-guided formal verification coupled with mutation testing. In 2024 Design, Automation & Test in Europe Conference & Exhibition (DATE), pp. 1–2. Cited by: §2.3, §2.8, §2.9. [37] M. Harman, J. Ritchey, I. Harper, S. Sengupta, K. Mao, A. Gulati, C. Foster, and H. Robert (2025) Mutation-guided llm-based test generation at meta. In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering, pp. 180–191. Cited by: §2.3, §2.8, §2.9. [38] P. Straubinger, M. Kreis, S. Lukasczyk, and G. Fraser (2025) Mutation testing via iterative large language model-driven scientific debugging. In 2025 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 358–367. Cited by: §2.3, §2.8, §2.9. [39] Z. Xue, P. Ma, Z. Wang, and S. Wang (2025) From evaluation to enhancement: large language models for zero-knowledge proof code generation. arXiv preprint arXiv:2509.11708. Cited by: §2.3, §2.8. [40] Y. Li, R. Meng, and G. J. Duck (2025) Large language model powered symbolic execution. Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 3148–3176. Cited by: §2.3, §2.9. [41] D. Trabish and S. Itzhaky (2026) Enhancing symbolic execution with machine-checked safety proofs. In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs, pp. 294–308. Cited by: §2.4. [42] B. Bailey and A. Miller (2024) Formalizing soundness proofs of linear {\{pcp}\}{\{snarks}\}. In 33rd USENIX Security Symposium (USENIX Security 24), pp. 1489–1506. Cited by: §2.4. [43] J. B. Almeida, M. Barbosa, M. L. Correia, K. Eldefrawy, S. Graham-Lengrand, H. Pacheco, and V. Pereira (2021) Machine-checked zkp for np relations: formally verified security proofs and implementations of mpc-in-the-head. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pp. 2587–2600. Cited by: §2.4. [44] D. Mouris and N. G. Tsoutsos (2021) Zilch: a framework for deploying transparent zero-knowledge proofs. IEEE Transactions on Information Forensics and Security 16, pp. 3269–3284. Cited by: §2.5, §2.9. [45] M. Bellés-Muñoz, M. Isabel, J. L. Muñoz-Tapia, A. Rubio, and J. Baylina (2022) Circom: a circuit description language for building zero-knowledge applications. IEEE Transactions on Dependable and Secure Computing 20 (6), pp. 4733–4751. Cited by: §2.5, §2.6. [46] S. Angel, A. J. Blumberg, E. Ioannidis, and J. Woods (2022) Efficient representation of numerical optimization problems for {\{snarks}\}. In 31st USENIX Security Symposium (USENIX Security 22), pp. 4273–4290. Cited by: §2.5, §2.9. [47] W. Ma, Q. Xiong, X. Shi, X. Ma, H. Jin, H. Kuang, M. Gao, Y. Zhang, H. Shen, and W. Hu (2023) Gzkp: a gpu accelerated zero-knowledge proof system. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2, pp. 340–353. Cited by: §2.5, §2.9. [48] S. A. Butt, B. Reynolds, V. Ramamurthy, X. Xiao, P. Chu, S. Sharifian, S. Gribok, and B. Pasca (2024) If-zkp: intel fpga-based acceleration of zero knowledge proofs. arXiv preprint arXiv:2412.12481. Cited by: §2.5. [49] N. Samardzic, S. Langowski, S. Devadas, and D. Sanchez (2024) Accelerating zero-knowledge proofs through hardware-algorithm co-design. In 2024 57th IEEE/ACM International Symposium on Microarchitecture (MICRO), pp. 366–379. Cited by: §2.5. [50] J. Liu, J. Song, Y. Chen, H. Liu, H. Wen, L. Pearson, Y. Chen, and Y. Feng (2025) Tabby: a synthesis-aided compiler for high-performance zero-knowledge proof circuits. Proceedings of the ACM on Programming Languages 9 (OOPSLA2), pp. 1671–1697. Cited by: §2.5, §2.9. [51] A. Ozdemir, F. Brown, and R. S. Wahby (2022) CirC: compiler infrastructure for proof systems, software verification, and more. In 2022 IEEE Symposium on Security and Privacy (SP), pp. 2248–2266. Cited by: §2.6. [52] J. Liu, I. Kretz, H. Liu, B. Tan, J. Wang, Y. Sun, L. Pearson, A. Miltner, I. Dillig, and Y. Feng (2024) Certifying zero-knowledge circuits with refinement types. In 2024 IEEE Symposium on Security and Privacy (SP), pp. 1741–1759. Cited by: §2.6, Table 5. [53] Z. Xing, Z. Zhang, Z. Zhang, Z. Li, M. Li, J. Liu, Z. Zhang, Y. Zhao, Q. Sun, L. Zhu, et al. (2025) Zero-knowledge proof-based verifiable decentralized machine learning in communication network: a comprehensive survey. IEEE Communications Surveys & Tutorials. Cited by: §2.7. [54] J. A. Berrios Moya, J. Ayoade, and M. A. Uddin (2025) A zero-knowledge proof-enabled blockchain-based academic record verification system. Sensors 25 (11), pp. 3450. Cited by: §2.7. [55] S. Gangurde, A. Jadhav, V. Gatkal, and M. More (2025) Zk-gene: a zero-knowledge proof framework for secure genetic marker verification. In 2025 Global Conference in Emerging Technology (GINOTECH), pp. 1–5. Cited by: §2.7. [56] R. Lavin, X. Liu, H. Mohanty, L. Norman, G. Zaarour, and B. Krishnamachari (2024) A survey on the applications of zero-knowledge proofs. arXiv preprint arXiv:2408.00243. Cited by: §2.7. [57] J. Liang, D. Hu, P. Wu, Y. Yang, Q. Shen, and Z. Wu (2025) SoK: understanding zk-snarks: the gap between research and practice. arXiv preprint arXiv:2502.02387. Cited by: §2.7. [58] A. Salam, M. Abrar, F. Amin, F. Ullah, I. A. Khan, B. F. Alkhamees, and H. AlSalman (2024) Securing smart manufacturing by integrating anomaly detection with zero-knowledge proofs. IEEE Access 12, pp. 36346–36360. Cited by: §2.7. [59] S. Park, H. Kang, S. Han, J. M. Youn, and D. Kwon (2024) MECAT: memory-safe smart contracts in arm trustzone. IEEE Access 12, pp. 56110–56119. Cited by: §2.7. [60] H. Akgul, M. Eplik, J. Rojas, A. B. Abdullah, and P. van der Merwe (2025) ZK-senselm: verifiable large-model wireless sensing with selective abstention and zero-knowledge attestation. arXiv preprint arXiv:2510.25677. Cited by: §2.7. [61] S. G. Gil, L. L. Díaz, and J. I. R. Jarabo (2024) QCRMut: quantum circuit random mutant generator tool. arXiv preprint arXiv:2410.01415. Cited by: §2.8. [62] M. Osama, D. Thanos, and A. Laarman (2025) Parallel equivalence checking of stabilizer quantum circuits on gpus. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 109–128. Cited by: §2.8. [63] H. Takahashi, J. Kim, S. Jana, and J. Yang (2025) ZkFuzz: foundation and framework for effective fuzzing of zero-knowledge circuits. arXiv preprint arXiv:2504.11961. Cited by: §2.9, Table 1, Table 1, Table 4, Table 5, Table 5, §3, §4.1, §4.11. [64] M. Blum, P. Feldman, and S. Micali (2019) Non-interactive zero-knowledge and its applications. In Providing sound foundations for cryptography: on the work of Shafi Goldwasser and Silvio Micali, pp. 329–349. Cited by: Table 1, Table 5, §4.1. [65] Y. Fan, Y. Xu, and C. Garman (2024) Snarkprobe: an automated security analysis framework for zksnark implementations. In International Conference on Applied Cryptography and Network Security, pp. 340–372. Cited by: Table 5. [66] H. Chen, G. Li, M. Chen, R. Liu, and S. Gao (2024) Ac4: algebraic computation checker for circuit constraints in zkps. arXiv preprint arXiv:2403.15676. Cited by: Table 5. 6 Theoretical Additions 6.1 Binding property and block-Vandermonde construction We formalize the linear mapping that relates the Row-Vortex coefficient vector to the pair (δ,c)(\delta,c) and state the invertibility conditions that underpin the commitment binding argument. The Row-Vortex polynomial is written as R(X,Y)=∑i∈ℛδi⋅rowi(X)+∑i∈ℛci⋅seli(Y),R(X,Y)\;=\;\sum_{i\in\mathcal{R}}\delta_{i}\cdot\mathrm{row}_{i}(X)\;+\;\sum_{i\in\mathcal{R}}c_{i}\cdot\mathrm{sel}_{i}(Y), (28) where ℛ\mathcal{R} is the candidate index set with k=|ℛ|k=|\mathcal{R}|. Here rowi(X)\mathrm{row}_{i}(X) and seli(Y)\mathrm{sel}_{i}(Y) are univariate polynomials used to encode row and selector information respectively, and δi∈{0,1}\delta_{i}\in\{0,1\}, ci∈𝔽qc_{i}\in\mathbb{F}_{q} are the selection and substitution parameters. Order the coefficient vector of R(X,Y)R(X,Y) by concatenating the coefficient vectors of the row-blocks and selector-blocks to obtain ρ→∈𝔽q2k\vec{\rho}\in\mathbb{F}_{q}^{2k}. The affine relation between ρ→\vec{\rho} and the parameter pair (δ,c)(\delta,c) is ρ→=M[δc]+t→,\vec{\rho}\;=\;M\begin{bmatrix}\delta\\[2.0pt] c\end{bmatrix}\;+\;\vec{t}, (29) where M∈𝔽q2k×2kM\in\mathbb{F}_{q}^{2k\times 2k} is the block-diagonal matrix M=[Vrow𝟎𝟎Vsel],M\;=\;\begin{bmatrix}V_{\mathrm{row}}&\mathbf{0}\\[4.0pt] \mathbf{0}&V_{\mathrm{sel}}\end{bmatrix}, (30) and t→\vec{t} collects constant terms independent of (δ,c)(\delta,c). In Eq. (30), VrowV_{\mathrm{row}} and VselV_{\mathrm{sel}} are k×kk\times k Vandermonde matrices defined on two disjoint sets of evaluation points {αi}i=1k\{\alpha_{i}\}_{i=1}^{k} and {βi}i=1k\{\beta_{i}\}_{i=1}^{k}, respectively, with entries of the form (Vrow)j,i=αij−1(V_{\mathrm{row}})_{j,i}=\alpha_{i}^{j-1} and (Vsel)j,i=βij−1(V_{\mathrm{sel}})_{j,i}=\beta_{i}^{\,j-1}. where αi,βi∈𝔽q\alpha_{i},\beta_{i}\in\mathbb{F}_{q} are the nodes used for coefficient representation of rowi\mathrm{row}_{i} and seli\mathrm{sel}_{i}, and t→\vec{t} denotes any fixed offset arising from constant polynomial terms. The determinant factorizes as the product of the two Vandermonde determinants: det(M)=det(Vrow)⋅det(Vsel)=∏1≤i<j≤k(αj−αi)⋅∏1≤i<j≤k(βj−βi).\det(M)\;=\;\det(V_{\mathrm{row}})\cdot\det(V_{\mathrm{sel}})\;=\;\prod_{1\leq i<j\leq k}(\alpha_{j}-\alpha_{i})\;\cdot\;\prod_{1\leq i<j\leq k}(\beta_{j}-\beta_{i}). (31) where the two products vanish exactly when either {αi}\{\alpha_{i}\} or {βi}\{\beta_{i}\} contains repeated elements; hence nonzero determinant is equivalent to pairwise distinct nodes within each block. A sufficient practical condition to guarantee the existence of two disjoint kk-tuples of distinct nodes is |𝔽q|> 2k.|\mathbb{F}_{q}|\;>\;2k. (32) where |𝔽q||\mathbb{F}_{q}| denotes the field cardinality; Eq. (63) ensures one can choose {αi}\{\alpha_{i}\} and {βi}\{\beta_{i}\} as disjoint sets of kk distinct field elements. The invertibility of MM follows from Eq. (31) under the distinctness assumption. Theorem 6.1 (Binding reduction for Row-Vortex commitment). Let 𝖯𝖢\mathsf{PC} be a polynomial commitment scheme that is computationally binding on coefficient vectors. Suppose the evaluator uses the block-Vandermonde map MM of Eqs. (30)–(31) with pairwise distinct nodes and with field size satisfying Eq. (63). If an adversary produces two openings (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}) that both verify against the same public commitment 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R), then 𝖯𝖢\mathsf{PC} ’s binding property is violated. Proof. Let ρ→\vec{\rho} and ρ→′\vec{\rho}^{\prime} denote the coefficient vectors computed from (δ,c)(\delta,c) and (δ′,c′)(\delta^{\prime},c^{\prime}) via Eq. (29). Subtracting the two relations yields ρ→−ρ→′=M[δ−δ′c−c′].\vec{\rho}-\vec{\rho}^{\prime}\;=\;M\begin{bmatrix}\delta-\delta^{\prime}\\[2.0pt] c-c^{\prime}\end{bmatrix}. (33) Because MM is invertible under the distinct-nodes condition, Eq. (33) implies ρ→≠ρ→′\vec{\rho}\neq\vec{\rho}^{\prime} whenever (δ,c)≠(δ′,c′)(\delta,c)\neq(\delta^{\prime},c^{\prime}). where invertibility of MM guarantees injectivity of the affine mapping from (δ,c)(\delta,c) to ρ→\vec{\rho}. Therefore the same public commitment 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) cannot correctly open to two different coefficient vectors unless the commitment scheme 𝖯𝖢\mathsf{PC} itself is not binding. This reduction shows that any adversary that finds two distinct valid openings yields a breaker for 𝖯𝖢\mathsf{PC}, contradicting its assumed binding security. ∎ Practical parameters Selecting |𝔽q|>2k|\mathbb{F}_{q}|>2k and ensuring that node sets {αi}\{\alpha_{i}\}, {βi}\{\beta_{i}\} consist of pairwise distinct elements suffices for invertibility of MM in realistic parameter regimes. For example, with a candidate pool size k≤32k\leq 32 the condition |𝔽q|>64|\mathbb{F}_{q}|>64 is easily met by standard prime fields used in practice (e.g., q=2255−19q=2^{255}-19). where the numerical example illustrates that typical cryptographic fields comfortably satisfy Eq. (63). 6.2 Knowledge Soundness of the Violation IOP Public-coin three-round Sum-Check (detailed). The protocol takes the public input 𝖢𝗈𝗆𝗆(R)\mathsf{Comm}(R) together with the claimed public output vector y∈𝔽qmouty\in\mathbb{F}_{q}^{m_{\mathrm{out}}}. The interaction proceeds as follows. Round 1 (Sum-Check). The prover transmits a collection of univariate polynomials g1(X),g2(X),…,gt(X),g_{1}(X),\,g_{2}(X),\,\dots,\,g_{t}(X), (34) where t=log|D|t=\log|D| and each polynomial has degree at most d= 2n+k−1.d\;=\;2n+k-1. (35) where nn denotes the witness dimension and k=|ℛ|k=|\mathcal{R}| denotes the number of candidate rows encoded in the Row-Vortex polynomial. Round 2 (Challenge). The verifier samples a challenge ζ←$𝔽q,\zeta\;\overset{\$}{\leftarrow}\;\mathbb{F}_{q}, (36) where 𝔽q\mathbb{F}_{q} is the finite field of size |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} (and λ\lambda the security parameter). Round 3 (Openings). The prover opens the evaluated objects at the sampled challenge: R(ζ,Y),ΦR(ζ),Δout(ζ).R(\zeta,Y),\qquad\Phi_{R}(\zeta),\qquad\Delta_{\mathrm{out}}(\zeta). (37) where R(ζ,Y)R(\zeta,Y) is the Row-Vortex bivariate evaluation at ζ\zeta; ΦR\Phi_{R} is the verifier’s residual polynomial of degree at most dd; and Δout(X)\Delta_{\mathrm{out}}(X) is the output-difference polynomial defined by Δout(X)=∑j=0mout−1(yj′−yj)Lj(X).\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}(y^{\prime}_{j}-y_{j})\,L_{j}(X). (38) where Lj(X)L_{j}(X) denotes the jj-th Lagrange basis polynomial over the chosen evaluation domain and mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates. The verifier accepts if and only if Δout(ζ)≠0\Delta_{\mathrm{out}}(\zeta)\neq 0 and all openings verify under the commitment scheme. Theorem 6.2 (Explicit knowledge-error bound). Let λ\lambda be the security parameter and let |𝔽q|≥2λ|\mathbb{F}_{q}|\geq 2^{\lambda} denote the field size. Let dd be the residual polynomial degree (Eq. (35)), let moutm_{\mathrm{out}} be the output length, and let ℓ\ell denote the number of independent opening points used in the extractor (for example ℓ=O(logm)\ell=O(\log m) when multi-point openings are deployed). Then the three-round public-coin Sum-Check IOP is knowledge-sound with knowledge error δ\delta satisfying the conservative explicit bound δ≤mout−1+ℓd|𝔽q|.\delta\;\leq\;\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}. (39) where moutm_{\mathrm{out}} counts the nontrivial coefficients of Δout\Delta_{\mathrm{out}}, dd bounds the degree of residual polynomials opened by the prover, and ℓ\ell counts independent openings or challenge points. In many implementations the ℓ\ell opening challenges are chosen independently and the extractor requires the adversary to cause all ℓ\ell checks to pass simultaneously. In this independent-challenge regime the single-point failure probability multiplies across openings, yielding exponential suppression of the knowledge error: δ≤(mout−1+d|𝔽q|)ℓ.\delta\;\leq\;\left(\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|}\right)^{\!\ell}. (40) where the base mout−1+d|𝔽q|\frac{m_{\mathrm{out}}-1+d}{|\mathbb{F}_{q}|} is the per-point failure probability (degree divided by field size) and the exponent ℓ\ell measures independent repetitions. Thus, multi-point independent challenges produce an exponential decay in the knowledge error as ℓ\ell grows. Extractor description and complexity. We give a concise, implementation-oriented description of the extractor (the reader can regard this text as the replacement for the detailed pseudocode). After accepting an IOP transcript the extractor first collects the opened evaluations {R(ζi,Y),ΦR(ζi),Δout(ζi)}i=1ℓ\{R(\zeta_{i},Y),\Phi_{R}(\zeta_{i}),\Delta_{\mathrm{out}}(\zeta_{i})\}_{i=1}^{\ell} together with their evaluation proofs. From these openings the extractor aggregates a compact encoding ρ\rho and applies the inverse affine mapping M−1M^{-1} associated with the commitment encoding to recover the sparse selection vector (δ,c)(\delta,c). If the transcript already includes a low-degree witness polynomial W′(X)W^{\prime}(X), the extractor interpolates W′(X)W^{\prime}(X) to obtain the witness vector w′w^{\prime}. Otherwise the extractor assembles the algebraic reconstruction system Fδ,c(w′)= 0,F_{\delta,c}(w^{\prime})\;=\;0, (41) where Fδ,c:𝔽qn→𝔽qmF_{\delta,c}:\mathbb{F}_{q}^{n}\to\mathbb{F}_{q}^{m} denotes the edited R1CS residuals after substituting (δ,c)(\delta,c). The extractor then solves Eq. (41) by linear algebra to recover w′w^{\prime}. Finally, substituting the computed constants into the identified weak-assignment sites yields the mutated program P′P^{\prime} and the concrete counterexample (x′,z′,y′)(x^{\prime},z^{\prime},y^{\prime}); replaying P′(x′)P^{\prime}(x^{\prime}) is optional for verification because the proof already certifies acceptance. The principal computational costs are summarized by the following expressions. Recovering (δ,c)(\delta,c) from the aggregated encoding via sparse reconstruction or inversion of the affine map runs in time Tselect=O(klogk),T_{\mathrm{select}}\;=\;O(k\log k), (42) where k=|ℛ|k=|\mathcal{R}| is the number of candidate rows and the cost assumes sparse recovery primitives or hashing-based aggregation. If a low-degree witness polynomial W′(X)W^{\prime}(X) is present interpolation recovers w′w^{\prime} in Tinterp=O(nlogn),T_{\mathrm{interp}}\;=\;O(n\log n), (43) where nn is the witness dimension and the bound assumes FFT-style interpolation over a suitable domain. If interpolation is not available solving Eq. (41) by direct linear algebra costs Tsolve=O(nω),T_{\mathrm{solve}}\;=\;O(n^{\omega}), (44) where ω∈[2,3]\omega\in[2,3] denotes the matrix-multiplication exponent; in practice dense Gaussian elimination yields O(n3)O(n^{3}) field operations while sparse solvers typically achieve substantially smaller constants. Combining these contributions and adding the constant verifier pairing/open checks gives the practical bound Textract=O~(n+k),T_{\mathrm{extract}}\;=\;\widetilde{O}(n+k), (45) where O~(⋅)\widetilde{O}(\cdot) hides polylogarithmic factors and the dominant term depends on whether W′(X)W^{\prime}(X) is present in the transcript. Error analysis sketch. The extractor uses a forking strategy on the verifier challenge(s) to obtain multiple accepting transcripts at distinct challenge points ζ1,…,ζℓ\zeta_{1},\dots,\zeta_{\ell}. Interpolating the values of Δout\Delta_{\mathrm{out}} at these points yields the coefficient vector (y′−y)(y^{\prime}-y) unless Δout\Delta_{\mathrm{out}} vanishes at all sampled points. By the Schwartz–Zippel lemma the probability that a non-zero polynomial of total degree DD vanishes at a single uniformly random point is at most D/|𝔽q|D/|\mathbb{F}_{q}|. Applying this observation to the output polynomial and to each opened residual and then taking a union bound produces the linear bound in Eq. (39). If the ℓ\ell challenges are independent and the adversary must succeed at all openings simultaneously, the failure probability multiplies and yields the exponential bound in Eq. (40). Practical parameter selection thus chooses |𝔽q||\mathbb{F}_{q}| and ℓ\ell so that the exponentiated bound meets the desired security parameter λ\lambda. Summary. When the underlying commitment scheme permits appending a low-degree witness polynomial W′(X)W^{\prime}(X) to the oracles (as is possible with opening-friendly schemes), prefer including W′(X)W^{\prime}(X) in the transcript: this reduces extraction cost to O(nlogn)O(n\log n) and makes replaying P′(x′)P^{\prime}(x^{\prime}) optional for correctness while still preserving strong knowledge guarantees. 6.3 Error bounds and complexity This appendix states rigorous probabilistic bounds that govern extractor failure for the three-round public-coin Sum-Check IOP used in zkCraft, and it provides concrete asymptotic cost estimates for the principal IOP operations. Lemma 6.3 (Indicator polynomial non-vanishing). Let Δout(X)=∑j=0mout−1(yj′−yj)Lj(X),\Delta_{\mathrm{out}}(X)\;=\;\sum_{j=0}^{m_{\mathrm{out}}-1}\big(y^{\prime}_{j}-y_{j}\big)\,L_{j}(X), (46) where y′y^{\prime} is the extracted public-output vector, yy is the claimed public-output vector, and Lj(X)L_{j}(X) denotes the Lagrange basis polynomial associated with the distinct evaluation point uju_{j} for j=0,…,mout−1j=0,\dots,m_{\mathrm{out}}-1. If y′≠yy^{\prime}\neq y then Prζ←$𝔽q[Δout(ζ)=0]≤mout−1|𝔽q|,\Pr_{\zeta\overset{\$}{\leftarrow}\mathbb{F}_{q}}\bigl[\Delta_{\mathrm{out}}(\zeta)=0\bigr]\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}, (47) where mout=|y|m_{\mathrm{out}}=|y| is the number of public output coordinates and deg(Δout)≤mout−1\deg\!\bigl(\Delta_{\mathrm{out}}\bigr)\leq m_{\mathrm{out}}-1. Proof. From definition (46) the polynomial Δout(X)\Delta_{\mathrm{out}}(X) is nonzero whenever y′≠yy^{\prime}\neq y. Its degree is bounded by mout−1m_{\mathrm{out}}-1 because the Lagrange basis polynomials Lj(X)L_{j}(X) have degree at most mout−1m_{\mathrm{out}}-1. The Schwartz–Zippel lemma asserts that a nonzero polynomial of degree at most rr over 𝔽q\mathbb{F}_{q} evaluates to zero at a uniformly random point with probability at most r/|𝔽q|r/|\mathbb{F}_{q}|. Applying this lemma with r≤mout−1r\leq m_{\mathrm{out}}-1 yields inequality (47). ∎ Let ΦR\Phi_{R} denote the verifier’s aggregated residual polynomial and let dd be an explicit upper bound on its degree: deg(ΦR)≤d,\deg(\Phi_{R})\leq d, (48) where, in our encoding, a conservative choice is d=2n+k−1d=2n+k-1 with nn the witness dimension and k=|ℛ|k=|\mathcal{R}| the candidate-pool size. Assume the extractor obtains ℓ\ell independent openings of residual-related polynomials by obtaining accepting transcripts at ℓ\ell distinct challenge points. Theorem 6.4 (Knowledge-error explicit bound). Under the above assumptions the extractor’s failure probability (knowledge error) δ\delta satisfies δ≤mout−1+ℓd|𝔽q|.\delta\leq\frac{m_{\mathrm{out}}-1+\ell\,d}{|\mathbb{F}_{q}|}. (49) Here the additive term mout−1|𝔽q|\tfrac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|} bounds the probability that the output-difference polynomial vanishes at a random challenge (Lemma 6.3) and the term ℓ⋅d|𝔽q|\ell\cdot\tfrac{d}{|\mathbb{F}_{q}|} upper-bounds the aggregate probability that one of the ℓ\ell opened residual polynomials (each of degree ≤d\leq d) passes the verifier checks by coincidence. Proof. Successful extraction requires two conditions simultaneously: the accepted transcripts must demonstrate a nonzero public-output difference and the opened residual-related polynomials must be consistent with the claimed encodings. Failure of extraction therefore arises only if at least one of the following events occurs at the sampled challenge point: the output-indicator polynomial evaluates to zero, or an opened residual polynomial of degree at most dd collides with the verifier’s consistency predicates by chance. By Lemma 6.3 the probability that Δout\Delta_{\mathrm{out}} vanishes at a uniformly sampled field element is at most (mout−1)/|𝔽q|(m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|. For any fixed residual-related polynomial of degree at most dd, the Schwartz–Zippel lemma gives a single-point collision probability at most d/|𝔽q|d/|\mathbb{F}_{q}|. Since the extractor obtains ℓ\ell independent openings, a union bound over these ℓ\ell events yields at most ℓd/|𝔽q|\ell\,d/|\mathbb{F}_{q}| probability for a residual-related coincidence. A further union bound combining the output-indicator failure and the residual-opening failures yields δ≤mout−1|𝔽q|+ℓd|𝔽q|,\delta\leq\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}+\frac{\ell\,d}{|\mathbb{F}_{q}|}, (50) establishing (49). ∎ If the extractor repeats the Δout\Delta_{\mathrm{out}} test at tt independently sampled challenge points, then the probability that a nonzero polynomial vanishes at all tt points is at most ((mout−1)/|𝔽q|)t\bigl((m_{\mathrm{out}}-1)/|\mathbb{F}_{q}|\bigr)^{t}. Consequently the knowledge error satisfies δ≤(mout−1|𝔽q|)t+ℓ⋅d|𝔽q|,\delta\leq\left(\frac{m_{\mathrm{out}}-1}{|\mathbb{F}_{q}|}\right)^{\!t}+\ell\cdot\frac{d}{|\mathbb{F}_{q}|}, (51) where tt is the number of independent checks applied to Δout\Delta_{\mathrm{out}}. More generally, if each of the ℓ\ell residual openings is independently repeated trest_{\mathrm{res}} times then the residual-term in (49) is replaced by ℓ⋅(d/|𝔽q|)tres\ell\cdot\bigl(d/|\mathbb{F}_{q}|\bigr)^{t_{\mathrm{res}}}. Parameter selection should ensure that δ\delta meets a chosen security target 2−λ2^{-\lambda}. For typical cryptographic fields (for example q≈2255q\approx 2^{255}) small repetition counts render the polynomial-vanishing term negligible for practical moutm_{\mathrm{out}}, while modest residual repetitions suffice to suppress collision risk below cryptographic thresholds. Proposition 6.5 (Practical IOP cost). Let kk be the candidate-pool size, mm the number of constraints, nn the witness dimension, and dd the residual-degree bound (for example d=2n+k−1d=2n+k-1). Let |D|=2⌈log2m⌉|D|=2^{\lceil\log_{2}m\rceil} denote the Sum-Check domain size chosen as the next power-of-two above mm. Using an opening-friendly commitment scheme (for example HyperPlonk+ or BaseFold) and a performance-oriented implementation, a non-amortized IOP instance satisfies the following asymptotic cost estimates: Prover time\displaystyle\text{Prover time} =O(kdlog|D|)field multiplications,\displaystyle=O\bigl(k\,d\,\log|D|\bigr)\quad\text{field multiplications}, (52) Verifier time\displaystyle\text{Verifier time} =O(d)field multiplications\displaystyle=O(d)\quad\text{field multiplications} +O(1)pairings,\displaystyle+\;O(1)\quad\text{pairings}, Proof size\displaystyle\text{Proof size} =O(1)(commitment)\displaystyle=O(1)\quad\text{(commitment)} +O(λ(d+1))(opening proofs in bits).\displaystyle+\;O\bigl(\lambda(d+1)\bigr)\quad\text{(opening proofs in bits)}. where λ\lambda is the security parameter (bit-length associated with the field/commitment) and the constants hidden by O(⋅)O(\cdot) depend on low-level choices such as FFT model and field representation. Proof. The prover’s principal computational burden is dominated by materializing and evaluating the Row-Vortex-derived encodings across the Sum-Check domain and by constructing the Sum-Check auxiliary polynomials and openings. Evaluating degree-dd polynomials on a domain of size |D||D| can be executed in O(dlog|D|)O(d\log|D|) field operations using FFT/NTT techniques when the domain supports such transforms. Aggregation across kk candidate contributions yields the factor kk, hence the O(kdlog|D|)O(k\,d\,\log|D|) bound for prover field multiplications. Opening-friendly commitment schemes allow attaching low-degree witness polynomials and producing succinct evaluation proofs whose bit-length scales with the security parameter λ\lambda and the number of opened coefficients (on the order of d+1d+1). Therefore the proof-size model in (52) captures the commitment overhead plus the opening proof cost. The verifier’s computation consists of evaluating the Sum-Check consistency relations a