This article is particularly interesting in light of the various lotteries and other gambling devices which are available on the Ethereum Blockchain. They approach a similar problem from a slightly different direction, not always successfully.
> Dan McNeill: What if I use a different key for each card?
> MrBawn: In the physical version, you could absolutely identify each card by which of your keys unlocked your lock without unlocking your opponent's lock. In the crypto version, you can't tell which of your keys works on an encrypted card because your opponent's lock has turned it into gibberish. So an incorrect key would be indistinguishable from a correct key.
Anyone interested in the subject should also look into https://zkga.me. It's an incomplete information p2p game (just as mental poker). They utilize zksnarks, among other crypto tools.
If you want to play mental poker with an arbitrary number of friends/enemies, I built a prototype with a really basic UI that extends the SRA81 protocol to support more than two players and that also removes the need to reveal the hands at the end of the game. https://secret.cards/
Just sharing, there's a live real money poker room that implements mental poker with an actual gaming license implemented on Ethereum. https://virtue.poker
We at Cartesi (https://cartesi.io) are also building out a fully decentralized poker game called Texas HODL'em on Ethereum which implements mental poker using our technology.
I wrote a library for this in Go: https://github.com/cretz/go-mental-poker. The algorithm has general purpose value amongst untrusted peers reaching conclusion while mutating a common blinded subject.
16 comments
[ 263 ms ] story [ 844 ms ] threadI even try to build a prototype my self for p2p poker. I don't have anymore the code to share.
Anyway I will also recommend this video about it: https://www.youtube.com/watch?v=mthPiiCS24A
I found the answer in the youtube comments:
> Dan McNeill: What if I use a different key for each card?
> MrBawn: In the physical version, you could absolutely identify each card by which of your keys unlocked your lock without unlocking your opponent's lock. In the crypto version, you can't tell which of your keys works on an encrypted card because your opponent's lock has turned it into gibberish. So an incorrect key would be indistinguishable from a correct key.
> This paper provides the following answers:
> 1. No. (Rigorous mathematical proof supplied.)
> 2. Yes. (Correct and complete protocol given.)
We've just released the tech article here: https://medium.com/cartesi/how-cartesi-is-changing-the-game-...
That's the Floyd from Floyd-Warshall Algorithm and Rabin from the Rabin-Karp string search Algorithm.