Coin Flipping in Telecommunications
Further information: Commitment schemeThere is no reliable way to use a true coin flip to settle a dispute between two parties if they cannot both see the coin—for example, over the phone. The flipping party could easily lie about the outcome of the toss. In telecommunications and cryptography, the following algorithm can be used:
- Alice and Bob each choose a random string, "ljngjkrjgnfdudiudd" and "gfdgdfjkherfsfsd" respectively.
- Alice chooses an outcome for an imaginary coin flip, such as "tail"
- Bob sends Alice his random string "gfdgdfjkherfsfsd"
- Alice immediately computes a SHA-1 hash of the string "tail ljngjkrjgnfdudiudd gfdgdfjkherfsfsd", which is 59dea408d43183a3937957e71a4bcacc616d9cbc and sends it to Bob
- Alice asks Bob: "heads or tails"?
- Bob says, for instance, "heads".
- Alice tells him he's just lost, and proves it by showing the string "tail ljngjkrjgnfdudiudd gfdgdfjkherfsfsd".
- Bob can check that Alice didn't lie by computing the SHA-1 of the string himself
- Furthermore Bob by providing his own randomly generated string guarantees that Alice wasn't able to precompute an image pair of "tail/random string" or "head/random string".
Read more about this topic: Coin Flipping, Mathematics
Famous quotes containing the word coin:
“It is not funny that a man should be killed, but it is sometimes funny that he should be killed for so little, and that his death should be the coin of what we call civilization.”
—Raymond Chandler (18881959)