Project Fairdice |
[Home] [Docs] [Users] [Gaming] [Crypto] [Devel] [Download] [Help] |
Harry's Input | Pete's Input | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
From : Harry <h.fituright@mit.edu> To : Pete <p.bloggs@ox.ac.uk> Subject : Asteroid A - Step 2 Date : Jan 1 Hi Pete, Ok, I've written my input down. Go ahead and send me yours. Harry.
From : Pete <p.bloggs@ox.ac.uk> To : Harry <h.fituright@mit.edu> Subject : Asteroid A - Step 3 Date : Jan 2 Hi Harry, My input is "0". Pete.
From : Harry <h.fituright@mit.edu> To : Pete <p.bloggs@ox.ac.uk> Subject : Asteroid A - Step 5 Date : Jan 1st Hi Pete, Sorry to tell you, but you lose. My input was "1". Which combined with your "0" gives us an output of "1", which we agreed meant "Heads" and a win for me. The new name of Asteroid A is now officially *** HarryFituright1 *** Harry.
Hashes have the property that if message M1 has a digest D then it is very difficult to find a different message M2 that shares the same digest D (called a collision).
The following month things get a little more complex. Harry's research assistant, Richard Jones, also gets involved in the hunt, and when a new asteroid is found, asks for a say in the naming. Emails go back and forwards, and a shortlist of 6 names is generated.
Pete however gets a little suspicious. He agreed to provide a digest of his guess, because otherwise Richard would have been in the same situation as Pete had been with Harry over the Asteroid A. But how does he know the hash is secure? He trusts that once Harry has produced his digest, Harry can't change his input. But what if Harry could work out Pete's input from Pete's digest? If he could do that, he could fix the result because Harry doesn't supply his digest (and so isn't forced to choose his input) until after he gets Pete's.
The security of a digest depends on the size of the plaintext (the message) that is fed to it. If there are only 6 possible plaintexts then there are only 6 possible digests, and you can easily create a lookup table to map from digest to plaintext.
However a balance is needed. You don't want to have to generate too many random bits each time, as it is an expensive operation. They agreed on changing from: