Re: Pseudo random shuffle.
From: Vilhelm Sjöberg (vilhelm.sjoberg_at_gmail.com)
Date: 01/18/05
- Next message: Dave Fossett: "Re: New Japanese slang?"
- Previous message: necoandjeff: "Re: New Japanese slang?"
- In reply to: necoandjeff: "Re: Pseudo random shuffle."
- Next in thread: necoandjeff: "Re: Pseudo random shuffle."
- Reply: necoandjeff: "Re: Pseudo random shuffle."
- Messages sorted by: [ date ] [ thread ]
Date: 18 Jan 2005 01:11:58 -0800
necoandjeff wrote:
> Bottom line, find any pseudo-random generating function, be sure
> that you and your buddy feed it the same seed number to start with,
> and you will both be assured of the same random sequence of cards.
This is not quite enough, because while you will end up agreeing on the
shuffle, this also means that both players are aware of the state of
the shuffled deck. Which is less than ideal if you're going to play
poker, for instance. :)
Nevertheless there are crypto protocols that let you keep things
appropriately concealed until the end of the game. A simple variant
uses as its basic building block a commutative cypher, that is a cypher
such that a message that was encrypted first with key K1 and then with
key K2 can be decrypted either by first decrypting it with key K2 and
then decrypting the result with K1, or in the other order. For instance
RSA has this property.
Using this we can create the shuffle as follows. Alice creates 52 cards
and encrypts them all seperately using Ka. She sends them in random
order to Bob, who encrypts them all using Kb and publishes the result
in random order. Now we have a permutation of cards each of which is
encoded with both keys, but were neither player knows what order they
are in. In order for say Bob to privately look at a card, he would ask
Alice to decrypt it using Ka, and then he can himself undo key Kb and
look at it in plaintext. At the end of the game, both keys are made
public and each player can look back at the record of the game and
verify that nothing untoward happened.
It strikes me that this still doesn't quite do everything you want,
because in poker it is usual for folding players to discard their cards
face-down, never letting anyone know if they were bluffing or not. I'm
not sure if it would be possible to do something to solve that problem,
short of using a trusted third party.
Anyway, the algorithms are there. The user interface, of course, is a
Simple Matter of Programming. :) (But really, one would imagine that
someone had written software to do this already. The protocol has been
in introductionary crypto textbooks for, like, forever.)
Sorry for the off-topicness, btw.
//Vilhelm
- Next message: Dave Fossett: "Re: New Japanese slang?"
- Previous message: necoandjeff: "Re: New Japanese slang?"
- In reply to: necoandjeff: "Re: Pseudo random shuffle."
- Next in thread: necoandjeff: "Re: Pseudo random shuffle."
- Reply: necoandjeff: "Re: Pseudo random shuffle."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|