Two Plus Two Publishing LLC
Two Plus Two Publishing LLC

Go Back   Two Plus Two Poker Forums > >


Programming Discussions about computer programming

Thread Tools Display Modes
Old 12-20-2017, 11:56 PM   #1
old hand
Join Date: Jul 2006
Location: lovelovelove
Posts: 1,343
mental poker?

Are there any implementations of mental poker that allow p2p hands to be played?

Been looking, see some papers but nothing anywhere close to being usable out of the box.
eof is offline   Reply With Quote
Old 12-21-2017, 01:21 AM   #2
Join Date: Mar 2017
Posts: 77
Re: mental poker?

This has been around for a couple years but its play money so no one seems to care.

I remember someone on 2p2 saying the big problem with mental poker was players dropping out in multiway pots, so the only good implementations are only heads up. You then have to handle escrow of funds if you want real money poker which requires a 3rd party or maybe a blockchain with some script.

The concept doesn't seem that hard but theres probably subtleties I haven't thought of and statistical crypto attacks and such. Basic idea is you encrypt each card with a single key you keep track of and then pass the encrypted card data along with the keyID to villian. Villian shuffles and then encrypts the cards with his own key.

You now have a shuffled deck and to reveal a card both players need to reveal the private key for that card.

An encrypted card would be something like:
  encryptedByPlayer1: k11,
  encryptedCard: player1KeyRing[k11]({
    encryptedByPlayer2: k34,
    encryptedCard: player2KeyRing[k34](Ah)
then to reveal this cards identity, play1er see's he has to reveal k11, he decrypts and also sends the key to player 2. player 2 decrypts with that key and sees the inner section was encrypted with his k34. He decrypts, revealing the identity and sends k34 to player1 who also can decrypt and reveal the card.

I guess you probably also want nonces in there somewhere. Also I guess there is some asymmetry in player 1 knowing the value before player 2... hmm.. now that I've written all that out I'm much less confident this isn't fundamentally a broken design. If anyone knows details of how to do this, I'd love to hear. This has been on my mind anyway because I've been thinking of trying to make a similar card game using some mental poker type scheme, but the game wouldn't be poker related.
lostmypw is offline   Reply With Quote
Old 12-21-2017, 12:15 PM   #3
old hand
Join Date: Jul 2006
Location: lovelovelove
Posts: 1,343
Re: mental poker?

Thanks -- yeah I am aware of the concept; but I hadn't come across that implementation.

There are others doing similar; nothing with dropout protection outside of academic papers that I've seen.

The closest thing to being usable i saw was this:

But it's a library with (imo) extremely poor documentation. I did play with it a bit but it wasn't clear to me how to initialize a game with respecrt to other users 'points'.

It seems that with crypto currency finally getting some real traction that even p2p mental poker that can be settled 'manually' (so you would probably on play other people you trust to pay their debts and/or only play with trusted escrow witness); there is some huge opportunities to shirk the major poker rooms.
eof is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 12:38 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
Poker Players - Streaming Live Online