Example 3: A Non-interactive, zero knowledge Proof

The following is an example of a non-interactive zero-knowledge proof, which doesn’t require the former challenge-response dynamic between Alice and Bob. In this case, Alice can generate all the challenges at once, and then Bob can respond at a later time. Such non-interactive proofs let many parties verify Alice’s claims, not just Bob.

The conundrum

Alice wants to prove to Bob and his snooty Sudoku club that she has solved a Sudoku puzzle they have not been able to solve.

Each cell must contain a number (1–9) that is unique to the row, column, and 3x3 grid

To do so, Alice builds a tamper-proof machine that executes the proof to Bob and friends. Alice’s machine follows a specific, publicly verifiable protocol with the following logic.

First, Alice reproduces the original, unsolved puzzle in the machine. For each cell with an existing value, it automatically lays three face-up cards with the corresponding number, e.g. cell C3 has 3 number 9 cards.

2. Next, Alice encodes her solution by having the machine lay her answers face down on the grid. Of course, the machine prevents Bob from simply flipping over the cards in their cells.

3. Bob can now interact with the machine. Starting with each row, Bob randomly chooses one card in each cell, from the top, the middle, or the bottom.

Bob assembles cards for row 1

The machine takes the chosen cards and makes a face down, 9-card-packet for each row.

This action is repeated for each column as well. Finally, the remaining cards are sorted into one packet for each 3x3 grid. In total, the machine makes 27 packets.

4. Then the machine randomly shuffles the cards in each packet, before giving the packets back to Bob.

5. Bob flips the cards over and verifies that each packet contains the numbers 1 through 9 without any numbers missing or duplicated.

The cards are shuffled and no longer have the original order

A few verification rounds later, Bob and friends are convinced that Alice has solved this puzzle.

In this example, the proof is non-interactive. Any one can use the machine (or in reality, code) to verify Alice’s claim. Alice doesn’t have to be present to be challenged.

There you have it! For a more comprehensive overview checkout the ZeroKnowledgeFM podcast.