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:
“The oft-repeated Roman story is written in still legible characters in every quarter of the Old World, and but today, perchance, a new coin is dug up whose inscription repeats and confirms their fame. Some Judæa Capta, with a woman mourning under a palm tree, with silent argument and demonstration confirms the pages of history.”
—Henry David Thoreau (18171862)