# A card game (for mental poker or any other card game)

I thought of a way to produce trustless card game in a flexible way. One feature that I want is it should be flexible (It should work for any type of card game, though I indeed started it as a solution for mental poker) and scalable (the number of players should not be limited by anything other than the rules of the particular card game). One feature of this scheme is that it uses no private channel for messages between players, everything to be communicated is to be published on a public ledger (e.g. a block chain). I want some confidence about this part.

Do ECDH and the DH on groups of quadratic modulo a safe prime $$p = 2q + 1$$ with prime $$q$$ support the property such that given: $$a,b,A=a^x,B=b^x$$, with $$a,b$$ generated pseudo-randomly (replace with scalar multiplication in case of ECDH groups), and $$A$$ and $$B$$ coming in any order, no polynomial time algorithm should be able tell whether the order is changed or not with probability greater that of a random guess (1/2) by a non negligible amount. This is an absolute key to my design.

• @ModalNest It works with in person play but playing online like this, sudden network problems or power cuts can be issue. And simply counting such as quit may work in poker but I am trying to make something that works for many if not all card games. I had once read a paper where these scenarios were considered, about designing some lottery in block chain. How to design malicious quitting without penalizing innocent ones can be an interesting problem. Anyway, my main question is still about the indistinguishability in permutation which obviously relates to cryptography. Dec 26 '20 at 10:39
• You need to edit this so it reads like a question. I presume it could be edited down to almost "Do ECDH and the DH on groups of quadratic modulo a safe prime support the property such that given a,b,A=ax,B=bx, with A and B coming in any order, no polynomial time algorithm should be able tell whether the order is changed or not with probability greater that of a random guess (1/2) by a non negligible amount." The rest of your question is mostly just a list of stuff entirely irrelevant to your question. Dec 28 '20 at 9:14
• @ModalNest Thank you for the suggestion Dec 28 '20 at 11:07