In the classic interactive zero-knowledge proof (like the Ali-Baba-cave example), why is it repeated over many rounds instead of done once — and when is that not needed?
Because each single round leaves a fixed chance a cheater just guesses right; repetition drives that probability toward zero. But this is a property of proofs with a large per-round soundness error and a small challenge set — not a universal rule for all ZKPs.
Why the toy protocol repeats. If a dishonest prover has, say, a 50% chance of bluffing past a single challenge, then after n independent rounds their chance of fooling the verifier the whole way is only $(1/2)^n$ — after 20 rounds that's less than one in a million. This is the soundness pillar in action:
- One success → could be luck.
- Twenty successes in a row → astronomically unlikely unless the prover genuinely knows the secret.
When you don't need many rounds (so the card's premise is example-specific, not a law):
- Large challenge space — if a single challenge is drawn from, say, $2^{128}$ possibilities instead of 2, the cheat probability is already negligible in one round.
- Non-interactive proofs (Fiat–Shamir, zk-SNARKs / zk-STARKs) — these collapse the whole interaction into a single message and don't repeat rounds at all; soundness comes from the size of the challenge/field, not from many trials.
Tip: Repetition is one way to buy soundness (many cheap probabilistic challenges); a big challenge space is another (one expensive challenge). The interactive toy protocol uses the first, modern succinct proofs use the second.