Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Guides

How to Review ZK Threat Models

A structured, technical guide for developers and auditors to systematically evaluate the security assumptions, attack vectors, and implementation risks in Zero-Knowledge proof systems.
Chainscore © 2026
introduction
SECURITY GUIDE

Introduction to ZK Threat Modeling

A systematic approach to identifying and mitigating risks in zero-knowledge proof systems, from circuit design to final verification.

Zero-knowledge (ZK) threat modeling is a structured process for analyzing the security of cryptographic proof systems like zk-SNARKs and zk-STARKs. Unlike traditional software, ZK systems introduce unique attack vectors across multiple layers: the trusted setup ceremony, the arithmetic circuit implementation, the prover and verifier code, and the underlying cryptographic primitives. A comprehensive threat model maps these components, identifies trust assumptions, and prioritizes risks based on their potential impact on soundness (a false proof being accepted) and privacy (information leakage). This guide outlines a practical framework for developers and auditors to review ZK threat models effectively.

The foundation of any ZK threat model is a clear data flow diagram. This visual map should detail every step from private witness input generation to on-chain verification. Key components to isolate include: the circuit compiler (e.g., Circom, Noir), the proving backend (e.g., Gnark, Halo2), the prover runtime, and the verifier contract. For each component, document the trust boundaries. For instance, who controls the prover? Is the verifier contract upgradeable? Are there oracles or external calls? This exercise reveals critical junctures where malicious inputs, faulty computations, or manipulated state can compromise the system's guarantees.

Next, systematically enumerate threats using established frameworks like STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) adapted for ZK contexts. Focus on high-impact categories: Soundness Failures: Can an attacker generate a valid proof for a false statement? This could stem from circuit bugs, constraint underspecification, or elliptic curve implementation flaws. Privacy Leaks: Does the proof, public inputs, or transaction metadata reveal information about the private witness? Availability Attacks: Can the cost of proving or verification be manipulated to deny service? Setup Compromise: For trusted-setup systems, what are the consequences of a compromised toxic waste?

For each identified threat, assess the risk by estimating likelihood and impact. A soundness breach in a bridge's validity proof is catastrophic (high impact), while a complex attack requiring control of multiple setup participants may be less likely. Prioritize mitigation strategies accordingly. Common mitigations include: multi-party trusted setups with a large number of participants, circuit audits and formal verification tools like Picus, implementing fraud proofs or validity windows for optimistic verification, and using battle-tested libraries (e.g., the BN254 curve in Ethereum) instead of novel cryptography. Always document the residual risk after mitigations are applied.

Finally, integrate the threat model into the development lifecycle. It should be a living document, updated with every major circuit change or dependency update. Use it to guide audit scope, inform test case generation (e.g., fuzzing witness inputs), and design monitoring and incident response plans. For example, a verifier contract should include event logs for proof submissions and a pause mechanism in case a vulnerability is discovered. A robust ZK threat model is not a one-time checklist but a core component of a security-first development culture, essential for deploying trustworthy applications in DeFi, identity, and scaling solutions.

prerequisites
SECURITY FUNDAMENTALS

Prerequisites for Reviewing ZK Threat Models

A systematic approach to threat modeling for zero-knowledge proof systems requires foundational knowledge across cryptography, distributed systems, and smart contract security.

Effective review begins with a solid understanding of the cryptographic primitives in use. You must be comfortable with the core components of a ZK system: the arithmetization process (e.g., R1CS, Plonkish), the underlying cryptographic assumptions (e.g., discrete log, pairing-based), and the specific proof system (e.g., Groth16, Plonk, STARKs). Each choice has distinct security implications. For instance, a trusted setup ceremony is a critical threat vector for SNARKs like Groth16, while STARKs avoid this but introduce different complexity and performance trade-offs. Knowing these details allows you to pinpoint where trust is placed and where failures could occur.

Beyond the math, you must analyze the system's integration and implementation. This involves reviewing the circuit logic for soundness errors, the prover/verifier code for side-channel vulnerabilities, and the oracle inputs for manipulation risks. A common pitfall is a circuit that correctly proves a statement but whose underlying computation is logically flawed or depends on insecure external data. Tools like circom or Noir have their own compiler bugs and potential for constraint system misuse. Familiarity with common vulnerabilities, such as under-constrained circuits or non-deterministic witness generation, is essential for a thorough audit.

Finally, contextualize the ZK component within the larger application. A bulletproof verifier is useless if the smart contract calling it has a reentrancy bug or misinterprets the proof's public inputs. Review the system architecture: how proofs are generated, transmitted, and verified on-chain. Examine the economic and incentive models—could a malicious actor profit by submitting a fraudulent proof, and is the slashing mechanism robust? A holistic threat model considers the entire stack, from the prover's secure environment to the final on-chain state transition, identifying every point where trust assumptions could be broken.

review-framework
ZK SECURITY

A Systematic Review Framework

A structured methodology for evaluating the security assumptions and threat models of zero-knowledge proof systems.

A systematic review of a zero-knowledge (ZK) proof system's threat model is a critical audit step that moves beyond code review. It involves deconstructing the protocol's formal security guarantees to identify implicit assumptions and potential attack vectors. The goal is to answer: what must an attacker control or break to compromise the system's integrity or privacy? This process examines the trusted setup ceremony, cryptographic primitives (like elliptic curves or hash functions), and the interaction between the prover, verifier, and any external oracles. A well-defined threat model explicitly lists adversarial capabilities, such as the ability to corrupt a certain number of participants or manipulate specific data feeds.

The review begins by mapping the system architecture and data flow. Identify all components: the prover, verifier, smart contracts, relayers, and any bridging mechanisms. For each, document the inputs, outputs, and trust assumptions. For instance, a zkRollup's verifier contract on Ethereum assumes the underlying EVM executes correctly, while the prover's computational integrity relies on the soundness of the zk-SNARK. Scrutinize the trusted setup (e.g., a Powers of Tau ceremony for Groth16). Was it performed correctly? Are the toxic wastes securely discarded? The compromise of these parameters can allow forgery of proofs. Tools like ZKP Threat Model Template provide a structured starting point for this documentation.

Next, analyze the cryptographic assumptions underpinning the proof system. Common assumptions include the Knowledge-of-Exponent (KEA), Discrete Log Problem (DLP) hardness, or collision resistance of a specific hash function (like Poseidon or SHA-256). Evaluate their suitability for the application's lifetime; a 128-bit security level may be insufficient for a trillion-dollar system. Review the circuit implementation for constraints that could leak information or allow prover cheating. A mismatch between the high-level logic and the compiled R1CS constraints is a frequent source of critical bugs. Use formal verification tools or manual review to ensure the circuit correctly encodes the intended statement.

Finally, assess operational and economic security. For systems with slashing mechanisms or fraud proofs, model the cost of attack versus the economic penalty. A prover might be economically incentivized to submit a false proof if the potential reward outweighs the slashing risk. Evaluate external dependencies: does the system rely on a price oracle? If so, a manipulated price feed could force the generation of a valid proof for an invalid state transition. Document all findings in a threat matrix, categorizing risks by likelihood and impact. This framework transforms a nebulous security review into a reproducible, evidence-based process, providing clear actionable insights for developers and auditors.

review-areas
SECURITY REVIEW

Key Areas of Focus in a ZK Threat Model

A systematic review of a zero-knowledge proof system must assess these critical components to identify vulnerabilities and ensure protocol integrity.

03

Proof System Soundness & Zero-Knowledge

Verify the proof system provides computational soundness (a false statement cannot be proven except with negligible probability) and zero-knowledge (the proof reveals nothing beyond the statement's truth). This involves reviewing the underlying cryptographic protocols (e.g., PLONK, Groth16, Halo2) for known attacks, ensuring proper randomness in proof generation, and checking that the simulation extractability property holds to prevent proof malleability.

05

Integration & Adversarial Environment

The ZK component exists within a larger system (e.g., a blockchain, voting application). Threats emerge at integration points.

  • Input Validation: Who provides the public inputs? Can they be manipulated?
  • Proof Batching: Are aggregated proofs verified correctly?
  • Oracle Data: If the circuit uses external data (price feeds), the oracle's security is now part of the threat model.
  • Front-running: In blockchain contexts, can a submitted proof be stolen or replaced?
06

Parameter Selection & Performance

Incorrect parameters can weaken security or cause runtime failure.

  • Curve Security: Using a pairing-friendly curve (BN254, BLS12-381) with sufficient bit-strength (≥100 bits of security).
  • Field Size: Must be large enough to prevent collision attacks.
  • Proof Size & Verification Gas: In L2 rollups like zkSync or StarkNet, verification cost directly impacts scalability. A trade-off between proof size (STARKs ~45KB, SNARKs ~1KB) and trust assumptions must be evaluated.
~1 KB
SNARK Proof Size
~45 KB
STARK Proof Size
THREAT MATRIX

ZK Threat Categories and Attack Vectors

A classification of common vulnerabilities and adversarial strategies in zero-knowledge proof systems.

Threat CategoryCryptographic LayerImplementation LayerProtocol/Infrastructure Layer

Trusted Setup Subversion

Proving Key Poisoning

Soundness Error Exploit

Arithmetic Circuit Bugs

Memory/IO Side-Channel Leaks

Proof Verification DoS

Data Availability Failure

Sequencer Censorship

cryptographic-assumptions
ZK SECURITY

Step 1: Audit Cryptographic Assumptions

The foundation of any zero-knowledge proof system is its cryptographic assumptions. This step involves methodically reviewing the threat model to identify and validate the core security promises.

A zero-knowledge proof system's security rests on specific cryptographic assumptions, such as the hardness of discrete logarithms or the security of elliptic curve pairings. The first audit task is to explicitly document every assumption the protocol relies upon. Common examples include the Knowledge-of-Exponent Assumption (KEA), the Discrete Logarithm Problem (DLP) in chosen groups, and the Random Oracle Model (ROM) for hash functions. Misunderstanding or misapplying these assumptions is a primary source of vulnerabilities in ZK circuits and verifier contracts.

Next, analyze the threat model: who is the prover, who is the verifier, and what powers does an adversary have? Determine if the system is designed for non-interactive proofs (NIZKs) in a public verifier setting or interactive proofs with a specific verifier. Assess assumptions about computational bounds, trusted setups, and the potential for malicious provers to submit false proofs or for malicious verifiers to extract secret witness data. This model dictates which cryptographic primitives are appropriate and where trust is placed.

Scrutinize the implementation of these assumptions in code. For a zk-SNARK using the Groth16 proving scheme, verify that the trusted setup ceremony was performed correctly and that the final Structured Reference String (SRS) is used securely in the verifier smart contract. Check that all elliptic curve operations use the intended groups (e.g., BN254, BLS12-381) and that pairing functions are implemented without side-channel leaks. A mismatch between the theoretical assumption and the practical implementation, like using a curve with a weakened security parameter, can break the entire system.

Finally, evaluate assumption freshness and cryptographic agility. Some assumptions, like those related to specific elliptic curves, may weaken over time due to algorithmic advances. The protocol should have a documented path for upgrading or rotating cryptographic parameters. Review how the system handles the potential need to migrate from a broken curve (e.g., from BN254 to BLS12-381) and whether the design allows for this without a complete overhaul. This forward-looking analysis is critical for long-term security.

protocol-design-review
HOW TO REVIEW ZK THREAT MODELS

Review Protocol Design and Trusted Setup

This step involves a systematic analysis of a zero-knowledge proof system's cryptographic foundations and the security of its initial parameters.

A zero-knowledge proof system's security depends on its underlying cryptographic assumptions and the integrity of its trusted setup. The first task is to identify the core proof system, such as Groth16, PLONK, or STARKs, and understand its specific security model. Key questions include: Does it rely on a trusted setup (a.k.a. Common Reference String or CRS)? Is it post-quantum secure? What are the precise computational hardness assumptions (e.g., Discrete Log, Knowledge-of-Exponent)? Review the protocol's whitepaper and academic citations to verify these foundations.

For protocols requiring a trusted setup, you must scrutinize the setup ceremony. This is a multi-party computation (MPC) ritual where participants contribute randomness to generate the system's public parameters. The security goal is trust minimization: if at least one participant was honest and destroyed their secret, the final parameters are secure. Examine the ceremony's design: How many participants were involved? Were they credible, independent entities? Was the process transparent and verifiable, with published transcripts and audits? A well-executed ceremony, like Zcash's original Powers of Tau, significantly reduces systemic risk.

The threat model must account for who can compromise the system. A malicious prover is the primary adversary, attempting to create a valid proof for a false statement. Analyze the protocol's soundness error—the probability this can happen—which should be cryptographically negligible (e.g., 2^-128). Also consider trusted setup toxicity: if the secret parameters used in the ceremony are leaked, an attacker could generate false proofs. Protocols like STARKs and Bulletproofs are attractive because they have no trusted setup, eliminating this entire risk vector.

Finally, map the protocol's components to real-world implementation risks. The arithmetization process (converting a program into polynomial constraints) and the polynomial commitment scheme (like KZG in PLONK) are frequent sources of bugs. Review the formal verification efforts, if any, applied to the circuit compiler (e.g., Circom, Noir) and the proving backend. A comprehensive review documents all assumptions, evaluates the ceremony's robustness, and identifies the exact conditions under which the proof system's security guarantees hold.

circuit-implementation-audit
THREAT MODEL REVIEW

Step 3: Audit Circuit Implementation and Constraints

This step focuses on analyzing the zero-knowledge circuit's logic and mathematical constraints for vulnerabilities that could compromise the proof's soundness or completeness.

A ZK circuit's security is defined by its constraints. These are mathematical equations that must hold true for any valid witness. The primary audit goal is to ensure these constraints correctly and completely encode the intended computation. A critical failure occurs if an attacker can generate a valid proof for a false statement, known as a soundness error. This often stems from under-constrained circuits, where the constraints do not fully enforce all necessary conditions, allowing malicious provers to submit incorrect witness values that still satisfy the proving system.

Systematically review the constraint system. For R1CS-based systems (like Groth16), check each constraint for correctness. For Plonkish or custom gates, verify the polynomial identities. Common pitfalls include: missing range checks for critical variables, incorrect arithmetic operations (e.g., using addition where multiplication is required), and failure to enforce boolean constraints on binary signals. Use the framework's testing utilities to generate negative tests, attempting to construct witnesses that should be invalid but might pass the constraint system.

Pay special attention to public and private input boundaries. The circuit must enforce that the prover cannot manipulate public inputs (the instance). Verify that any value declared as public is properly constrained by the circuit logic and cannot be overridden by a maliciously crafted witness. A related threat is input mixing, where a private input value incorrectly influences a public output in an unconstrained way, potentially leaking information or allowing fraud.

Analyze custom cryptographic primitives and look-up arguments. If the circuit uses a Poseidon hash, ECDSA signature verification, or a custom lookup table, audit these components with heightened scrutiny. For look-ups, ensure the table is complete and correctly constrained, and that the argument correctly enforces that a queried value exists within it. Errors here can create backdoors or logical shortcuts. Reference established implementations from libraries like circomlib or halo2 for comparison.

Finally, evaluate the circuit's resilience to knowledge soundness attacks in the context of its trusted setup. For universal setups (e.g., Perpetual Powers of Tau), the threat is lower. For circuit-specific setups, ensure the toxic waste was properly discarded. The audit must confirm that the circuit design does not introduce vulnerabilities that could be exploited by a malicious party who participated in the ceremony, such as the ability to forge proofs without a valid witness.

tooling-operational-risks
OPERATIONAL SECURITY

How to Review ZK Threat Models

A zero-knowledge proof system's security depends on more than just its cryptographic assumptions. This guide explains how to audit the operational and tooling risks that can compromise a ZK application.

A zero-knowledge proof (ZKP) system's threat model extends beyond its core cryptographic soundness. You must also assess the operational security of the proving stack, from the trusted setup ceremony to the final on-chain verification. Critical risks often reside in the tooling layer: the prover software, the circuit compiler, and the infrastructure that generates and submits proofs. A flaw in any component can lead to the generation of a valid-looking but fraudulent proof, undermining the entire system's guarantees.

Start your review by mapping the proving pipeline. Identify each component: the high-level language (e.g., Circom, Noir), the compiler that generates constraint systems, the backend prover (e.g., snarkjs, plonk), and the final verifier contract. For each, ask: Who maintains it? Is it audited? What are its dependencies? A common risk is a malicious or buggy compiler that outputs an incorrect circuit, allowing a prover to generate proofs for false statements. Always verify the hash of the final circuit used in production matches the hash of the audited source.

Next, scrutinize the trusted setup ceremony (if applicable, as in Groth16). For Perpetual Powers of Tau ceremonies, verify the participant list and the integrity of the final transcript. For application-specific setups, review the procedure for generating and discarding toxic waste. The operational security during this phase is paramount; a single leaked secret can allow infinite forgery. Tools like snarkjs' powersoftau provide commands to verify contribution integrity, which should be part of your checklist.

Finally, evaluate the runtime environment. Is the prover run on secure, isolated hardware? Are there side-channel risks? For blockchain applications, check the verifier smart contract. Ensure it matches the exact verification key and proof format expected by the backend. A mismatch here is a critical vulnerability. Use differential testing: run the same proof through independent implementations (e.g., a different prover library) to check for consistency. Operational security is about ensuring the theoretical math is correctly and securely implemented in practice.

FOR DEVELOPERS

Frequently Asked Questions on ZK Threat Models

Common questions and technical clarifications for developers and security researchers analyzing zero-knowledge proof systems.

A trusted setup is a one-time ceremony where a set of secret parameters (often called the Common Reference String or CRS) are generated for a specific zk-SNARK circuit. The security of all subsequent proofs depends on these parameters being destroyed after creation. If any participant in the ceremony is malicious and retains a copy of the 'toxic waste,' they can forge proofs, breaking the system's soundness.

Key risks include:

  • Single-point failure: Compromise of one participant can compromise the entire system.
  • Ceremony complexity: Multi-party ceremonies (MPCs) reduce but do not eliminate trust, requiring careful implementation.
  • Long-term risk: The threat persists for the lifetime of the application using those parameters.

Protocols like Groth16 require a per-circuit trusted setup. Alternatives like PLONK use a universal setup (one ceremony for many circuits), while STARKs and Bulletproofs are transparent and require no trusted setup at all.

conclusion-next-steps
SECURITY REVIEW

Conclusion and Next Steps

A systematic approach to reviewing Zero-Knowledge threat models is essential for securing protocols that handle billions in value. This guide outlines the core principles and actionable steps for your next audit.

A thorough ZK threat model review is not a one-time checklist but an ongoing practice. The core principles—understanding the trusted setup, verifying circuit constraints, analyzing cryptographic assumptions, and scrutinizing implementation details—form a robust foundation. Internalizing these concepts allows you to systematically deconstruct a protocol's security posture, moving from high-level architecture to the specific vulnerabilities that could lead to fund loss or data leakage. Consistent application of this framework is key to identifying risks before they are exploited.

To apply this knowledge, your next steps should involve hands-on practice. Start by examining the documentation and code for a well-audited project like Tornado Cash or zkSync Era. Trace how their circuits map to business logic and review their published audit reports. Then, set up a local development environment for a framework like Circom or Halo2. Write a simple circuit (e.g., a Merkle tree membership proof), generate a proof, and attempt to intentionally introduce a logical bug or constraint error to see how the proving system fails. This practical exercise solidifies theoretical understanding.

For deeper learning, engage with the primary sources. Study the original papers for cryptographic primitives like Groth16, PLONK, or STARKs. Follow security researchers and auditing firms like Trail of Bits, OpenZeppelin, and Zellic on platforms like Twitter and GitHub, where they often publish cutting-edge findings and tooling. Participating in Capture The Flag (CTF) competitions focused on ZK cryptography, such as those hosted by Ethereum Foundation or Paradigm, provides invaluable experience in finding and exploiting subtle vulnerabilities under time pressure.

Finally, contribute to the ecosystem's security. If you identify a potential issue in an open-source project, responsibly disclose it via their security channel. Consider writing detailed post-mortems or technical threads on your review process. As ZK technology evolves with new proving systems, virtual machines like zkVM, and recursive proofs, the threat landscape will continuously shift. Staying engaged with the community and committed to rigorous analysis is how we collectively build a more secure and trustworthy foundation for the decentralized future.