Skip to content

ZK Proof Lab

Zero-Knowledge Proofs · Interactive · Fiat-Shamir · SNARK · Sum-Check

Walk interactive proofs (Ali Baba cave, graph 3-coloring, Schnorr, Okamoto, and GQ) through commit-challenge-response, then collapse them into non-interactive Fiat-Shamir and SNARK-shaped pipelines with real in-browser hashing and modular arithmetic.

Zero-knowledge proofs power private blockchain transactions, identity checks, and verifiable computation without leaking sensitive data.

This lab starts with intuitive stories, then graduates into real browser-side arithmetic and hashing so the jump from idea to implementation is visible in one sitting.

Cryptographic honesty: the modular-arithmetic checks and Web Crypto primitives in Exhibits 02, 03, 04, 05, 07 and 08 are real. Exhibit 07 runs exact BigInt arithmetic over a published 2048-bit group and a fresh WebCrypto RSA modulus; Exhibit 08 runs the sum-check interactive proof and a bounded GKR layer walk in exact prime-field arithmetic, and is neither zero-knowledge nor a SNARK; Exhibits 01 and 06 are clearly-labelled conceptual models.
EXHIBIT 01⬡ CONCEPTUAL MODEL

The Ali Baba Cave Protocol

Someone proves they know the secret word for the cave door without ever saying the word.

EXHIBIT 02⬡ REAL SHA-256 COMMITMENTS

Graph 3-Coloring ZKP

Someone shows a map is colored correctly without revealing the full color pattern — then an extractor bench lets you attack that hiding claim and measure what the attack actually recovers.

EXHIBIT 03● REAL MODULAR ARITHMETIC

Schnorr Identification Protocol

Someone proves they know a secret number by passing a math check without revealing it.

EXHIBIT 04● REAL SHA-256 · window.crypto.subtle

Hash Commit-Reveal

Someone locks in a hidden bid first, then reveals it later to prove they never changed it.

EXHIBIT 05● REAL HASH-DERIVED CHALLENGE

Fiat-Shamir (Non-Interactive)

Convert challenge-response into a single verifiable proof by deriving the challenge from a hash.

EXHIBIT 06⬡ PEDAGOGICAL SNARK MODEL

zk-SNARK Intuition

See setup, proving, and verification flow with public/private input separation in one toy pipeline.

EXHIBIT 07● REAL BIGINT ARITHMETIC · 2048-BIT

Beyond Schnorr

Rewind Okamoto and GQ proofs to extract a pair of exponents or an RSA root, then measure when a tiny challenge space lets a rootless prover pass.

EXHIBIT 08● REAL Fp ARITHMETIC · INTERACTIVE PROOF

Sum-Check and GKR

Verify a sum over 2v points with v short polynomials and one evaluation, break it with every lie the checks exist to catch, then reuse it to walk a small circuit from outputs to inputs. Not zero-knowledge, not a SNARK.