|This article is a rewrite of the existing article dining cryptographers protocol. Since this page is bound to be incomplete, unedited, or otherwise messy, please do not merge changes from here into the main article just yet.|
A group of cryptographers is enjoying dinner at a local restaurant. Upon requesting their bill, the cryptographers are surprised to learn from their host that payment for the dinner has already been anonymously arranged and that the group owes nothing. They speculate that the payer might be one of the cryptographers in the party, but then they realize that the dinner may have been paid for by the National Security Agency, their employer. Though everybody at the table respects each other's right to make an anonymous payment, they still wish to know whether their meal was in fact funded by the NSA.
Problem: If it turns out that one of the cryptographers at the table is the payer, how can he anonymously signal this fact to his peers?
Solution: Each cryptographer flips a coin privately with any other member to his left and right. Then they all stand up and announce true if the two coins he can see were different (head and tails) or false if the two coins were the same (head and head). If one of the cyptographers is the payer, he states the opposite. If there is an odd number of trues and the number of cryptographers are odd or there is an even number of trues and the number of cryptographers are even, then the NSA paid. Elsewhere, the check was paid by a member of the group. Who actually paid is not revealed.
Alice and Bob are attending a prestigious awards ceremony. At this event, it is custom for attendees to sit next to the Master of Ceremonies in order of age. In such a manner the MC wishes to have the oldest and most seasoned recipients sitting closest to him; the youngest members sit at the far end of the table. Alice and Bob wish to determine which of the two is older and thus should be seated closer to the head of the table. However, having never met before, they do not know each other's age. Neither wants to seem rude at a formal function, so they quickly discount the idea of asking each other for his or her age.
Problem: How can Alice and Bob determine which is older without telling each other their ages?
The CEO of a company that produces cryptographic software is retiring, so the company's board of directors chooses two candidates to replace him. The board convenes, and during this meeting they discuss the merits of each candidate and the likely benefits that each would bring to the company. Since this is a fair and respected organization, company policy states that at the end of the meeting a secret ballot will be used to elect a new CEO. The election process is a democratic one: each board member may cast one vote, and all votes are given equal weight. The candidate who received the greatest number of votes is promoted to CEO.
Problem: Given the requirements of the voting process, how can the board members elect a new CEO?
The dining cryptographers protocol allows for any member of a group to multicast data to every other member of the group. Though the broadcast is public, the protocol guarantees that its sender remains anonymous. This protocol allows only for one member of the group to transmit data during any given round.
Consider that there are cryptographers sitting around a circular table, so for convenience they shall be numbered , , , , . The cryptographers are arranged such that has as his neighbors and . ( sits between and ; sits between and .) Additionally, there are pairs of adjacent cryptographers. Each pair is written as , where and are the cryptographers in the pair. It is obvious then that each cryptographer is a member of exactly two pairs and . (Note that and are not necessarily distinct.)
Each pair secretly chooses one bit at random; this bit is known only to and . In this manner a total of random bits are chosen among all adjacent pairs of cryptographers. Then each cryptographer should know exactly two bits of information: and .
Each cryptographer now computes a value , where the values are the secret bits known by and is the signal that he wishes to send anonymously. This value is made public to all persons sitting at the table. When all values have been made public, the existence of a signal can be detected by calculating the bitwise XOR of every . This XOR operation yields the following:
Assuming that at most one person is attempting to send a signal over the channel, at most one value on the right-hand side of the last equation should be 1, yielding . If nobody tried sending a signal over the channel, then it is evident that this equation yields . Hence all cryptographers can detect the existence of a signal if one is sent.
This is trivially anonymous as determining the sender requires knowing the secrets. As , and saying node was the sender, without knowing all secrets except for the sender () any of the nodes could have transmitted the message, and each therefore appears equally likely to any attacker as long as the number of attackers is less than .
The ageing cryptographers protocol allows for every member of a group to contribute inputs to a function that can be calculated by all members of the group. The protocol guarantees both that an input to the function cannot be traced back to any particular participant and that each participant calculates the same result. (In other words, a correct implementation of the protocol guarantees that the participant calculates the correct result.) All members of the group may transmit data simultaneously during any given round.
The voting cryptographers protocol is similar to the ageing cryptographers protocol. It guarantees both that any particular input cannot be traced back to its source and that all participants correctly implementing the protocol agree on the final result. Additionally, this protocol is immune to attack from a participant trying to change another's vote or otherwise causing disruption. All members of the group may transmit data simultaneously during any given round.