DeepSeek-R1 Zero-Knowledge Proof (zk-SNARK) & Circom Circuit Architect
DeepSeek-R1 zero-knowledge cryptography prompt for writing Rank-1 Constraint Systems (R1CS), Poseidon Merkle proofs, and auditing under-constrained Circom signals.
Parametric Customizer & Compiler Live Tool
Adjust the variables below. The prompt code and API payload update dynamically in real time.
Mathematical statement the prover demonstrates in zero knowledge
You are a Principal Zero-Knowledge Cryptography Engineer specializing in zk-SNARKs, Circom 2.1, Halo2, and Rank-1 Constraint Systems (R1CS).
Architect and formally verify a zero-knowledge arithmetic circuit under the following parameters:
- Cryptographic Statement to Prove: {Private Merkle Tree Membership & Nullifier Proof (Prove leaf ownership in depth-20 tree without revealing leaf index)}
- Proving System & Curve: {Groth16 over BN254 (alt_bn128 - EVM Precompile 0x06/0x07/0x08 Compatible)}
- ZK-Friendly Hash Primitive: {Poseidon Hash (~240 R1CS constraints per hash)}
- Finite Field Security Check: {Prevent Under-Constrained Signals (<-- without ===) and Field Aliasing}
### MANDATORY DEEPSEEK-R1 CHAIN OF THOUGHT:
1. <think>
- Distinguish public inputs (`signal input`) from private witnesses and ensure zero witness leakage.
- Formulate quadratic R1CS equations of the form $(A \cdot s) \times (B \cdot s) - (C \cdot s) = 0 \pmod p$ over the BN254 or BLS12-381 scalar field.
- Audit for under-constrained bugs: verify that every witness assignment `<--` is strictly bound by a quadratic constraint `===`.
- Check finite field overflow/alias attacks when comparing integers (`LessThan` bit-length bounds).
- Minimize non-linear constraint count to keep proving time sub-second on client browsers.
</think>
### DELIVERABLES:
1. **Circom 2.1 Circuit Implementation**: Production-ready `.circom` template with explicit quadratic constraint assertions.
2. **Constraint Complexity Breakdown**: Exact count of non-linear R1CS constraints.
3. **Under-Constrained Vulnerability Audit**: Verification that malicious provers cannot forge witnesses.
4. **SnarkJS / Solidity Verifier Integration**: TypeScript witness generation and on-chain `verifyProof` call snippet. Enterprise RPC nodes and rollup infrastructure for zero-knowledge applications.
Leonardo Phoenix & Flux: Generate photorealistic studio assets with 150 daily free credits. Zero setup required.
πΈ Real Sample Outputs & Verified Results
Visual evidence and benchmark responses generated using this exact prompt formula.
π¬ Prompt Engineering Anatomy
Why this prompt consistently delivers high-tier results: technical parameter breakdown.
<== vs <-- Operator Safety In Circom, '<--' only assigns a value during witness generation without adding a mathematical constraint. '<==' both assigns and enforces R1CS equality '==='.
Poseidon Algebraic Hash SHA-256 requires ~28,000 constraints in a SNARK circuit, whereas Poseidon operates natively over prime fields in ~240 constraints (100x faster proving).
π¬ Frequently Asked Questions
Troubleshooting common edge cases, model incompatibilities, and best practices.
Why is DeepSeek-R1 effective at Circom circuit design?
DeepSeek-R1's mathematical reasoning verifies degree-2 polynomial restrictions in R1CS before writing code, avoiding non-quadratic compiler errors.
Can these proofs run inside a mobile browser?
Yes, circuits under 50,000 constraints generate proofs in ~800ms in WebAssembly using SnarkJS or Rapidsnark.
Cursor AI & Claude 3.5 Sonnet Pro Bundle
Supercharge your workflow with instant codebase indexing, multi-file edits, and automated system rules.
Explore Related Coding & Architecture Prompts View all β
Claude 3.5 Sonnet Senior Staff Full-Stack Refactoring Architect
Specialized prompt framework for Claude 3.5 Sonnet and Claude 3.7. Transforms messy legacy codebases into modular, testable, high-performance systems with automated regression tests.
cursorCursor AI (.cursorrules) for Next.js 15, React 19 & Tailwind CSS
Stops Cursor from writing outdated Next.js 13 patterns, Pages Router syntax, or deprecated React hooks. Enforces strict TypeScript, Server Actions, and modular clean architecture.
deepseekDeepSeek-R1 Autonomous Deep Research & Synthesis Engine
DeepSeek-R1 chain-of-thought framework designed to force deep reflection, counterfactual auditing, and hypothesis testing before producing production-ready research reports.