đ¤ AI Summary
Existing zkSNARK toolchains treat input transformations and predicate definitions as disjoint components, leading to logical redundancy and security mismatchesâthereby increasing development complexity and risk. This paper introduces zkStruDul, the first domain-specific language for zero-knowledge proofs that unifies input transformation and predicate definition. Its core innovation is the âstructural dualityâ abstraction, which integrates both aspects into a single, projectable program representation processed coherently at compile time. Leveraging source-level semantic design and a formally verified projection semantics consistency proof, zkStruDul guarantees compilation correctness. The language natively supports advanced features such as recursive proof composition. Experimental evaluation demonstrates that zkStruDul substantially reduces development effort while enhancing the security, maintainability, and verifiability of ZKP-based applications.
đ Abstract
Non-Interactive Zero Knowledge (NIZK) proofs, such as zkSNARKS, let one prove knowledge of private data without revealing it or interacting with a verifier. While existing tooling focuses on specifying the predicate to be proven, real-world applications optimize predicate definitions to minimize proof generation overhead, but must correspondingly transform predicate inputs. Implementing these two steps separately duplicates logic that must precisely match to avoid catastrophic security flaws. We address this shortcoming with zkStruDul, a language that unifies input transformations and predicate definitions into a single combined abstraction from which a compiler can project both procedures, eliminating duplicate code and problematic mismatches. zkStruDul provides a high-level abstraction to layer on top of existing NIZK technology and supports important features like recursive proofs. We provide a source-level semantics and prove its behavior is identical to the projected semantics, allowing straightforward standard reasoning.