- PeteBloggs2
- HarryFituright2
- RichardJones1
- Asgard
- Vanaheim
- Muspelheim
They agree that they will, between them, select one of the six
outcomes.
Asteroid C
- Step 1
- Harry, Pete and Richard all generate their inputs (now one of
six numbers: 0,1,2,3,4 or 5) and write
them down: I(harry), I(pete), I(richard)
- Step 2
- Harry, Pete and Richard then all calculate the digest of their
own input: D(harry), D(pete), D(richard)
- Step 3
- Harry, who as the middleman who knows the email addresses of
both Pete and Richard, has agreed to be the host, and he sends
an email to the others saying he is ready for them to send him
their digests.
- Step 4
- P --> H : D(pete)
- R --> H : D(richard)
- Step 5
- H --> P : D(harry)
- H --> P : D(richard)
- H --> R : D(harry)
- H --> R : D(pete)
- Step 6
- Now that everyone has everyone else's digests, they can all
reveal their actual inputs:
- P --> H : I(pete)
- R --> H : I(richard)
- Step 7
- H --> P : I(harry)
- H --> P : I(richard)
- H --> R : I(harry)
- H --> R : I(pete)
- Step 8
- Now all three of them have all the inputs, they can each work
out the outcome:
outcome = ( I(harry) + I(pete) + I(richard) ) modulo 6
Things proceed, and it turns out that:
- 0 == I(Harry)
- 4 == I(Pete)
- 3 == I(Richard)
0 + 4 + 3 = 7
7 modulo 6 = 1
thus the new asteroid was named *** HarryFituright2 ***.
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:
- plaintext = input
to: