Cryptology Academy · Lesson

Sigma Protocols & Schnorr Identification

Implement a Sigma protocol and trace how the Schnorr proof works.

Lesson 2 of 413 steps

Sigma Protocols & Schnorr Identification is a free Cryptology Academy lesson on CoddyKit. This is lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, and your progress syncs across the web and the CoddyKit app. The Cryptology Academy course includes 4 lessons in total.

Sigma Protocol Structure

A Sigma protocol has 3 messages: (1) Commit: prover sends a commitment to a random value. (2) Challenge: verifier sends a random challenge. (3) Response: prover sends a response computed from the challenge and the secret. Verifier accepts or rejects.

Schnorr Identification

Prover knows secret x (private key); public key = g^x mod p (or point X = x*G on an elliptic curve). Goal: prove knowledge of x without revealing it. This is a discrete-log proof of knowledge.

Schnorr Protocol Steps

(1) Prover picks random r, sends commitment R = r*G. (2) Verifier sends challenge c (random integer). (3) Prover sends response s = r + c*x. (4) Verifier checks s*G == R + c*X. If yes, accepts. Prover knows x; response s is computable only with x.

Security Analysis

Completeness: honest prover always satisfies s*G = r*G + c*x*G = R + c*X. Soundness: two transcripts with same R but different challenges c, c' yield s, s' from which x = (s-s')/(c-c') is recoverable — so a cheater cannot produce two valid responses for the same R.

Zero-Knowledge of Schnorr

Simulator (no knowledge of x): pick random s and c, set R = s*G - c*X. This (R, c, s) is a valid transcript distribution. The verifier cannot distinguish real transcripts from simulated ones — Schnorr is honest-verifier zero-knowledge.

Fiat-Shamir Transform

Make Schnorr non-interactive: replace the verifier's challenge with c = Hash(R || message). The prover computes c themselves and responds. Result: a 2-element proof (R, s) that anyone can verify. This is the Schnorr signature scheme.

Schnorr Signatures

Sign(x, m): r ← random; R = r*G; c = Hash(R||m); s = r + c*x. Signature = (R, s). Verify: s*G == R + Hash(R||m)*X. Compact (64 bytes for P-256), batch-verifiable, provably secure in ROM. Adopted in Bitcoin Taproot (BIP-340).

Pedersen Commitments

C = r*G + v*H where H is a second independent generator. Commits to value v with randomness r. Binding: can't open to different v (discrete log). Hiding: C is uniformly distributed. Used in Schnorr-based range proofs and Bulletproofs.

Composition: AND Proofs

Prove knowledge of x1 AND x2 simultaneously: run two Schnorr protocols with the same challenge (share the challenge via Fiat-Shamir). The verifier accepts only if both sub-proofs are valid. Enables proving multiple statements in one interaction.

Composition: OR Proofs

Prove knowledge of x1 OR x2 without revealing which: use the simulator for one branch to compute a fake transcript, then split the challenge between both. The verifier sees two valid-looking transcripts summing to the real challenge. Called "ring signatures".

Applications

Schnorr IDs: electronic passports (PACE protocol). Schnorr sigs: Bitcoin Taproot, Monero (RingCT uses Schnorr OR-proofs), Signal Protocol (X3DH key agreement). Pedersen commitments: Confidential Transactions, Bulletproofs, Zcash Sapling note encryption.

Quick Check

In the Schnorr identification protocol, what does the verifier check in the final step?

Recap

Sigma protocols: commit-challenge-respond. Schnorr proves knowledge of a discrete log. Fiat-Shamir makes it non-interactive (Schnorr signature). Next: zk-SNARKs for succinct non-interactive proofs.

Free to start

Learn Cryptology Academy with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
67
Lessons
261

Frequently Asked Questions

Is the “Sigma Protocols & Schnorr Identification” lesson free?

Yes — the full text of “Sigma Protocols & Schnorr Identification” is free to read here on the web. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO. The Cryptology Academy course includes 4 lessons in total.

What will I learn in “Sigma Protocols & Schnorr Identification”?

Implement a Sigma protocol and trace how the Schnorr proof works. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 4.

How long does the “Sigma Protocols & Schnorr Identification” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. ZKP Intuition: The Ali Baba Cave
  2. Sigma Protocols & Schnorr Identification
  3. zk-SNARKs: Succinct Non-Interactive Arguments
  4. ZKP Applications: ZK Rollups & Privacy Coins
← Back to Cryptology Academy