In card games like poker it is critical that players do not know the hands of the other players until they simultaneously show their cards to see who has won.

Is there a cryptographic technique to achieve a similar result on the internet that does not require trusted infrastructure and could be achieved in a distributed way?

I am especially interested in the timing aspects of this challenge.

closed as off-topic by Steffen Ullrich, S.L. Barth, Stephane, Matthew, Steve Dec 5 '16 at 15:23

  • This question does not appear to be about Information security within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.


Yes: an encrypted blockchain. The decryption key is sent at the end of the hand.

I'm not sure how much more to expand this without explaining how blockchain works (but I see you are already familiar with the concept).

  • To clarify, you mean: 1) People share their hands (encrypted with a key only they know) with each other so that all players have all encrypted hands from each other. 2) Then each player shares the decryption key for their hand with the other players so that the hands are revealed and can be compared at the same time. But why is the blockchain necessary in this case? – bmiller59 Dec 5 '16 at 3:19
  • @bmiller59 Actually, I meant that the game server sent out the decryption key for that hand at the end of the hand. I'm also allowing for a style of poker where the hand can change during the round. Each player sends updates about their hand to the blockchain, but the blockchain mechanisms ensure that the data cannot be altered once submitted. If each player controls the decryption in your example, then they can alter their hands. Blockchain distributes integrity across all nodes. – schroeder Dec 5 '16 at 7:26

Is there a cryptographic technique to achieve a similar result on the internet that does not require trusted infrastructure and could be achieved in a distributed way?

Sort of. Let's consider a poker variant in which each player receives cards from a separate deck of cards. Thus no player may hold duplicate cards, but cards may be duplicated across all hands.

We also assume everyone has an RSA keypair, and the public keys have already been shared.

Then, the protocol proceeds thusly:

  • everyone generates two random values A and B.
  • everyone signs A and B (separately), and sends/collects these separate signatures of A and B to/from everyone else.
  • everyone reveals A and collects A values from everyone else. if any signature does not match, it's a do-over.
  • everyone computes A', the sum of all A values.
  • everyone deals themselves a hand based on using A'+B as a seed.
  • (now nobody knows each other's hand because they don't know other players' B value. also, nobody has been able to manipulate their dealt hand because they did not know what the final A' value would be under after they chose B)
  • everyone does the poker business, signing their moves and any revealed public information as required by the rules of our modified poker.
  • at the end, everyone shares the B values, which allows verifiying whether someone cheated at any given step.
  • anyone who cheated automatically loses to anyone who didn't cheat before they did.

Thus we sort of allow cheating, but work it into the rules of the game in a way that prevents an isolated cheater from ever seeing an advantage to doing so. If the game became scratch in the event that cheating is detected, then players could cheat when they believe they are in a losing position.

The hard part of all this is enforcing the payments on the losing parties.

Not the answer you're looking for? Browse other questions tagged or ask your own question.