encryption - Cryptography for P2P card game -
i'm considering writing computer adaptation of semi-popular card game. i'd make function without central server, , i'm trying come scheme make cheating impossible without having trust client.
the basic problem see each player has several piles of cards (draw deck, current hand , discard deck). must impossible either player alter composition of these piles except when allowed game rules (ie drawing or discarding cards), nor should players able know in or oppponent's piles.
i feel there should way use public-key cryptography accomplish this, keep finding holes in schemes. can suggest protocol or point me resources on topic?
[edit] ok, i've been thinking bit more, , here's idea i've come with. if can poke holes in please let me know.
at shuffle time, player has stack of cards value known them. take these values, concatenate random salt each, hash them. record salts, , pass hashes opponent.
the opponent concatenates salt of own, hashes again, shuffles hashes , passes deck original player.
i believe @ point, deck has been randomized , neither player can have knowledge of values. however, when card drawn, opponent can reveal salt, allowing first player determine original value is, , when card played player reveals own salt, allowing opponent verify card value.
your problem famous mental poker problem in cryptography (this 1 of favorite parts of crypto-class in college). is possible, , has been solved (in part, things crypto, ron rivest), long don't mind huge performance hit.
check wiki page more details.
Comments
Post a Comment