Hello I am a novice with ethereum and encryption...

If i would implement a cardgame in ethereum, i jave to deal cards to users. I think this can be done by encrypting the cards by the players' public key.

But once the user reveals its card at the end of the game, how can the server know it's not a fake revealing?

I was also thinking keeping the card dealing off chain, but that implies a trust needed on the dealing system.

I am looking for any advice/strategies in how (if) this can be done.


This is a difficult problem. You have to shuffle a deck of cards in a manner that's provably fair, and deal cards to people without revealing what the cards are, but allowing them to reveal a proof at the end of the hand.

The set of protocols people have devised for this are very well described in the Wikipedia article on Mental Poker.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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