You are playing a hand of poker online. The server dealt you pocket aces. It also knows your opponent has seven-deuce off suit. The server knows the flop, the turn, and the river before anyone acts. You trust that it will not use this information. But what if it did not need to know at all? What if no single party ever saw the full deck, yet everyone could still prove the game was fair? That is the promise of zero-knowledge proofs applied to card games. It sounds impossible. It is not.

What Is a Zero-Knowledge Proof? (The Poker Player Version)

Forget the academic definitions for a moment. Here is the version that matters if you play cards.

A zero-knowledge proof is a way to convince someone that a statement is true without revealing why it is true. You prove you know something without showing the thing you know.

The classic analogy uses a cave with two paths that meet at a locked door in the middle. Alice wants to prove to Bob that she knows the secret code to open the door, but she does not want to tell Bob the code. So Bob stands at the cave entrance. Alice walks in and randomly picks a path. Then Bob shouts which path he wants her to come out of. If Alice knows the code, she can always come out the correct side -- she just opens the door and walks through if needed. If she does not know the code, she has a 50/50 chance of being on the wrong side.

Repeat this 100 times. If Alice comes out the correct path every single time, the probability that she is faking it is 1 in 2100 -- roughly 1 in a nonillion. Bob is now convinced Alice knows the code, and he learned absolutely nothing about what the code actually is.

The poker translation: A zero-knowledge proof lets you prove "I shuffled this deck fairly" without revealing the deck order. Or prove "my hand beats yours" without showing your cards. Or prove "this card was part of the original 52-card deck" without revealing which card it is. The verifier learns the statement is true, and nothing else.

Three properties define a zero-knowledge proof. Completeness: if the statement is true, an honest prover can always convince the verifier. Soundness: if the statement is false, no cheating prover can convince the verifier (except with negligible probability). Zero-knowledge: the verifier learns nothing beyond the fact that the statement is true. These are not aspirational properties. They are mathematically proven guarantees.

The Trust Problem in Online Poker

Every online poker hand you have ever played follows the same model. A central server generates a random seed, shuffles the deck, and deals cards to players. The server sees everything. Your hole cards, your opponent's hole cards, the board, the entire remaining deck. It is the most information-privileged entity in the game, and you are trusting it not to abuse that privilege.

The standard defence is a commitment scheme: the server hashes the shuffle seed before dealing, publishes the hash, then reveals the seed after the hand so you can verify the shuffle was not changed mid-hand. That is genuinely useful. It prevents the server from altering the runout based on player actions. But it does not solve the deeper problem.

The deeper problem is that the server knows the entire deck order at all times. Even with a commitment scheme, the server could theoretically:

A commitment scheme proves the shuffle was not changed. It does not prove the shuffle was fair in the first place, and it does not prevent the server from knowing information it should not know. For that, you need a fundamentally different architecture.

Mental Poker: Playing Cards Without a Trusted Dealer

In 1979, Adi Shamir, Ron Rivest, and Leonard Adleman -- the inventors of RSA encryption -- published a paper asking a deceptively simple question: can two people play a fair game of poker over the phone, without a trusted third party to deal the cards?

The answer is yes, and the family of protocols that solve this problem is called mental poker. The core insight is elegant: instead of trusting a dealer, the players collectively shuffle and deal the deck themselves, using layered encryption so that no single player ever sees any card they are not supposed to see.

How the Protocol Works

Imagine three players -- Alice, Bob, and Carol -- want to play a hand of poker with no server involved. Here is the simplified protocol:

  1. Each player generates a key pair. These are standard asymmetric encryption keys. Each player keeps their private key secret and shares their public key with the group.
  2. The deck is represented as 52 distinct tokens. Before any encryption, everyone agrees on a standard mapping: token 1 is the Ace of Spades, token 2 is the Two of Spades, and so on through all 52 cards.
  3. Alice encrypts every card with her key and shuffles. She takes the 52 tokens, encrypts each one individually with her private key, shuffles the encrypted deck into a random order, and passes it to Bob. At this point, nobody -- not even Alice -- can identify which encrypted token corresponds to which card, because Alice shuffled after encrypting.
  4. Bob encrypts every card with his key and shuffles again. Now every card has two layers of encryption (Alice's and Bob's), and the order has been randomised twice. He passes the deck to Carol.
  5. Carol does the same. Three layers of encryption, three shuffles. The deck is now thoroughly randomised and triple-encrypted.
  6. To deal a card to Alice, Bob and Carol remove their encryption from that card. They each apply their decryption key to the specific card being dealt. Alice then decrypts with her own key and sees the plaintext card. Bob and Carol cannot see it because they do not have Alice's key.

The critical property that makes this work is commutative encryption. The encryption scheme must satisfy the property that Encrypt_A(Encrypt_B(card)) can be decrypted by applying the keys in any order. If Bob decrypts first, then Alice decrypts, the result is the same as Alice decrypting first, then Bob. This is what allows selective decryption -- revealing specific cards to specific players without exposing anything else.

Mental Poker Dealing Protocol

52 Cards Plaintext tokens
Player A Encrypt + Shuffle
Player B Encrypt + Shuffle
Player C Encrypt + Shuffle
Deal Selective decrypt

Where ZKPs Enter the Picture

The mental poker protocol gets you most of the way there, but it has a gap. When Alice encrypts the deck and shuffles it, how do Bob and Carol know she actually performed a valid shuffle? What if Alice duplicated a card, removed one, or rearranged the deck in a way that benefits her?

This is exactly where zero-knowledge proofs come in. After Alice shuffles the encrypted deck, she generates a ZKP that proves:

And she proves all of this without revealing the permutation. Bob and Carol can verify the proof and be mathematically certain the shuffle was valid, without learning anything about the card order. This is the zero-knowledge property in action.

Commitment Schemes and ZKPs: Working Together

If you have read our article on provably fair shuffling, you already understand commitment schemes: hash the seed before the hand, reveal it after, let players verify. ZKPs do not replace commitment schemes. They extend them into territory that commitments alone cannot reach.

What Commitments Give You

A commitment scheme proves the deck was not changed after the initial shuffle. This is post-hoc verification: the hand plays out, the seed is revealed, and you confirm everything matches. It works well and it is computationally cheap.

What ZKPs Add

ZKPs allow verification during the hand, without revealing hidden information. The crucial difference is what stays secret. With a commitment scheme, you eventually learn the entire deck order (after the hand). With ZKPs, you never learn more than you are supposed to know.

Commitment Scheme vs. ZKP: A Comparison

  • Commitment scheme: Server proves "I did not change the deck after committing." Reveals the full deck after the hand. Requires a trusted server during play.
  • ZKP: Any party proves "I shuffled correctly / I have a valid hand / this card is from the original deck" without revealing anything beyond that statement. No trusted server required.

In practice, the most robust systems use both. Commitments for the overall hand integrity. ZKPs for the specific operations that must happen without information leakage.

Practical ZKP Applications in Poker

So far this has been somewhat abstract. Here are the concrete things ZKPs enable in a card game, with pseudocode to make them tangible.

1. Proving a Fair Shuffle Without Revealing the Deck

A player (or server) takes an input deck, shuffles it, and produces an output deck. The ZKP proves the output is a valid permutation of the input without revealing which permutation was applied.

// Shuffle proof (simplified)
// Prover has: input_deck, output_deck, permutation
// Verifier has: input_deck, output_deck

function proveShuffle(input_deck, permutation, randomness):
    output_deck = applyPermutation(input_deck, permutation)

    // Generate ZK proof that:
    //   output_deck = permutation(input_deck)
    //   permutation is a valid permutation of [0..51]
    // Without revealing: permutation itself

    proof = zkProve(
        public:  { input_deck, output_deck },
        private: { permutation, randomness }
    )
    return { output_deck, proof }

function verifyShuffle(input_deck, output_deck, proof):
    return zkVerify(proof, { input_deck, output_deck })
    // Returns true/false. Verifier learns nothing about
    // the permutation -- only that one exists and is valid.

2. Proving You Hold a Valid Hand Without Showing Cards

At showdown, a player might need to prove their hand qualifies for a specific claim (for example, "I have a flush") without revealing the exact cards. In most poker variants you show your hand at showdown anyway, but this has applications in side-pot resolution, tournament verification, and games where partial information is strategically important.

// Hand validity proof
// Prover has: card1, card2 (hole cards), board[5]
// Verifier has: encrypted_card1, encrypted_card2, board[5]

function proveHandBeats(my_cards, board, opponent_hand_rank):
    my_best = evaluateBestHand(my_cards, board)

    proof = zkProve(
        public:  { encrypted_cards, board, opponent_hand_rank },
        private: { my_cards, encryption_key }
    )
    // Proves: decrypt(encrypted_cards) = my_cards
    //   AND bestHand(my_cards, board) > opponent_hand_rank
    // Reveals: nothing about the actual cards

    return proof

3. Proving a Card Belongs to the Deck

When a community card is revealed, players need assurance that it actually came from the original shuffled deck and was not substituted. A ZKP can prove that a specific plaintext card corresponds to a specific encrypted card in the committed deck, without revealing any other card in the deck.

Think of it like this: In a live game, you can see the dealer pull the top card off the deck. Online, a ZKP is the cryptographic equivalent of watching the card come off the top. You cannot see the rest of the deck, but you can verify that this card was the next one in the sequence.

Why Most Platforms Do Not Bother

If ZKPs are so powerful, why does almost no online poker platform use them? The answer is straightforward: they are hard to implement, computationally expensive, and most players do not (yet) demand them.

Computational Cost

Generating a zero-knowledge proof is orders of magnitude more expensive than the operation being proved. A shuffle that takes microseconds to compute might take seconds or minutes to prove in zero-knowledge. For a game where players expect sub-second response times, this is a real engineering challenge.

The specific numbers depend on the proof system. A SNARK (Succinct Non-interactive Argument of Knowledge) proof for a 52-card shuffle permutation involves thousands of elliptic curve multiplications. Early implementations took 10-30 seconds to generate. Modern systems have brought this down significantly, but it is still not trivial.

Protocol Complexity

Implementing a full mental poker protocol requires every player to participate in the shuffle, which means multiple rounds of communication before each hand. In a standard server-dealt game, dealing is instant. In a mental poker game with six players, the shuffle requires six sequential rounds of encryption and six accompanying ZKPs. Each player must be online and responsive for the entire process.

The "Good Enough" Problem

Most established platforms already have regulatory licenses, RNG certifications, and millions of hands of history. Their players, for the most part, accept this level of assurance. The operators have no incentive to adopt a harder, more expensive technology when the existing model is "good enough" for their current user base.

But "good enough" is a moving target. Ten years ago, HTTPS was optional for most websites. Now it is the baseline. The question is not whether provable fairness will become the standard in online poker. It is when.

Where the Field Is Going

The gap between ZKP research and practical poker applications is closing faster than most people in the industry realise. Here are the developments that matter.

Real-Time ZKP Generation

Proof generation times are dropping dramatically. Groth16, the proof system used in Zcash, can generate proofs for moderately complex circuits in under a second on consumer hardware. Newer systems like PLONK and Halo 2 offer different tradeoffs -- slightly larger proofs but no trusted setup requirement, which matters enormously for a decentralised game.

The milestone to watch for is sub-100-millisecond shuffle proofs. Once you can generate a ZKP for a 52-card shuffle permutation in less time than a typical network round trip, the performance argument against mental poker largely disappears. Several teams are actively working toward this.

On-Chain Verification

Verifying a ZKP is already fast and cheap. A SNARK proof can be verified on Ethereum in roughly 200,000 gas -- about the cost of a simple token transfer. This means every hand of poker can be settled on-chain with cryptographic proof that the game was fair, at a cost that is commercially viable.

The architecture that is emerging looks like this: the game plays out off-chain (for speed), but the proofs are posted on-chain (for permanence). Players interact in real time, and the blockchain serves as the final arbiter. If there is ever a dispute, the on-chain proofs are authoritative and publicly verifiable.

Hybrid Architecture: Off-Chain Play, On-Chain Proof

Game Play Off-chain (fast)
Generate Proofs ZKP per hand
Post On-Chain Immutable record
Anyone Verifies Public, permanent

Recursive Proofs and Batching

One of the most exciting developments is recursive proof composition -- a ZKP that proves the validity of other ZKPs. Instead of posting one proof per hand, a platform could generate a single proof that attests to the fairness of an entire session, an entire tournament, or even an entire day of play. This compresses the on-chain footprint while maintaining the same guarantees.

Imagine a 10,000-hand online tournament where a single proof, verifiable by anyone in milliseconds, attests that every shuffle, every deal, and every pot award was correct. That is not science fiction. The cryptographic primitives exist today. The engineering is catching up.

Client-Side Proving

As WebAssembly matures and devices get faster, proof generation is moving into the browser. A player's own device generates the ZKP for their portion of the protocol, eliminating the need to trust any server at all. Each player is simultaneously a participant and a verifier. The game becomes truly peer-to-peer, with mathematics as the only authority.

What This Means for Poker Players

If you are a poker player and you have made it this far, you might be wondering: do I need to understand all of this to play?

No. Just like you do not need to understand TLS handshakes to safely use online banking, you will not need to understand elliptic curve pairings to play on a ZKP-secured poker platform. The cryptography runs under the hood. What changes is the trust model.

Today, you trust the platform. Tomorrow, you trust the math. The difference is that the math cannot be bribed, cannot collude, cannot have a conflict of interest, and cannot change the rules after the fact. It either checks out or it does not.

For the poker community specifically:

The technology is not fully deployed at scale yet. But the trajectory is clear. The same cryptographic techniques that made cryptocurrency possible are now being applied to the oldest card game in the world. The result will be online poker where "is this rigged?" is not a question of trust or reputation. It is a question with a verifiable, mathematical answer.

Interested in provably fair poker infrastructure?

We are building Block 52 with ZKP-ready architecture from the ground up. If you are working on a poker platform and want to talk about what is possible, we would like to hear from you.

Get in Touch ♦