Documentation

Everything you need to know about zkRune and zero-knowledge proofs.

Introduction

zkRune is the first browser-based zero-knowledge proof builder. Generate and verify real Groth16 zk-SNARKs entirely in your browser - no server calls, complete privacy.

Key Features:

  • Client-side ZK proof generation (browser-based, 100% private)
  • 13 Real Groth16 zk-SNARK circuits (compiled Circom)
  • Visual circuit builder (drag-drop, no code)
  • Cryptographic verification in browser
  • Zero server dependency - your data never leaves your device
  • 100% open source

How It Works

zkRune generates real zero-knowledge proofs entirely in your browser using snarkjs and compiled Circom circuits.

1. Choose Template or Build Custom

Select from 13 pre-built templates or use the Visual Circuit Builder to design your own ZK circuit.

2. Browser Downloads Circuit Files

Your browser automatically loads the compiled WASM circuit (~35KB) and proving key (~4-40KB). These files are cached for future use.

3. Generate Proof (Client-Side)

snarkjs runs in your browser to generate a real Groth16 zk-SNARK proof. Your input data never leaves your device.

First time: 15-30 seconds • Cached: 2-5 seconds

4. Verify Independently (Client-Side)

Cryptographic verification also runs in browser. Anyone can verify your proof using our tool or external snarkjs verifiers.

Quick Start

1. Choose a Template

Visit /templates and select one of 13 zero-knowledge proof types.

2. Generate Proof

Fill in the simple form with your data. Click "Generate ZK Proof" and wait ~1 second.

3. Export & Use

Download your proof as JSON or code. Verify independently. Use in your apps.

Templates

Age Verification

Prove you're 18+ without revealing your exact age.

Circuit:

age = currentYear - birthYear; isValid = (age ≥ 18)

Balance Proof

Prove minimum balance without showing actual amount.

Circuit:

hasMinimum = (balance ≥ minimumBalance)

Membership Proof

Prove group membership without revealing identity.

Try it →

Range Proof

Prove value is within range without exact number.

Try it →

Private Voting

Vote anonymously with cryptographic proof.

Circuit:

isValid = (voterId ∈ eligibleVoters) ∧ (choice ∈ validOptions)

Hash Preimage

Prove you know the preimage of a hash without revealing it.

Circuit:

hash(secret) === publicHash

Credential Proof

Prove you have valid credentials without revealing details.

Circuit:

verify(credential, issuerPublicKey) ∧ (expiryDate ≥ currentDate)

Token Swap

Prove fair token exchange without revealing amounts.

Circuit:

(amountA × rateA) === (amountB × rateB)

Signature Verification

Prove you have a valid signature without revealing the signer.

Circuit:

verify(signature, message, publicKey) === true

Patience Proof

Prove computation completion without revealing intermediate steps.

Circuit:

result = iterate(input, steps) ∧ (steps ≥ threshold)

Quadratic Voting

Vote with quadratic cost without revealing vote weight.

Circuit:

cost = votes² ∧ (cost ≤ credits)

NFT Ownership

Prove NFT ownership without revealing wallet address.

Circuit:

hash(ownerAddress, tokenId) === merkleRoot

Anonymous Reputation

Prove reputation score without revealing identity.

Circuit:

(reputationScore ≥ threshold) ∧ verify(credential)

Compiling Circuits

Learn how to compile Circom circuits locally for advanced use.

For detailed compilation instructions, see the README on GitHub.

View Compile Guide on GitHub

ZK Circuit Architecture

zkRune uses Circom language to define zero-knowledge circuits. All circuits are compiled to WASM for browser execution and use Groth16 proving system.

Circuit Files:

  • .wasm - Circuit compiled for browser (~35KB each)
  • .zkey - Proving key (~4-40KB each)
  • _vkey.json - Verification key (~3KB each)

Performance:

All circuits optimized for speed. Average proof generation: 0.44 seconds (CLI tested).

API Reference

POST /api/generate-proof

DEPRECATED

Note: This API endpoint has been removed.

Migration: Use client-side proof generation with generateClientProof() for better privacy.

Generate a zero-knowledge proof.

Request:

{
  "templateId": "age-verification",
  "inputs": {
    "birthYear": "1995",
    "currentYear": "2024",
    "minimumAge": "18"
  }
}

Response:

{
  "success": true,
  "proof": {
    "groth16Proof": {...},
    "publicSignals": [...],
    "verificationKey": {...}
  },
  "metadata": {
    "realProof": true,
    "method": "snarkjs-cli"
  }
}

Open Source

zkRune is fully open source. You can view the code, contribute, or fork the project on GitHub.