Dining Cryptographers

Today I learned about the Dining cryptographers problem. It is such a great usage of XOR!

Suppose we have three cryptographers-a,b and c- seated in a circle. They all flip a coin and see the coin of the person sitting to the right of them. The goal: anonymously signal “I paid” (bit 1) or “Nobody paid” (bit 0) by publicly announcing XORs of coin flips, without revealing who paid. One of them can relay a message by saying the opposite of what the protocol usually expects. If a b and c gather round a table here's how everyone's positioned:

   a
b     c

for a: a XOR c

for b: b XOR a

for c: c XOR b

Now you can easily see that if a, b and c toss a coin, and always say truth about the XOR of their coin's state with the state of their neighbour's coins, the result is always 0 because each element cancel itself out. That is: (a XOR c) XOR (b XOR a) XOR (c XOR b) is always zero. However if any of them want to say that a state is true (that at least one of them has paid for the dinner instead of the NSA for example) they can do so by opting to announce the NOT of their XORs instead. That way the answer would be 1, a message has been collaborated to the whole group, however the sender of the message is private. But the problem is that there can be only one sender, and one bit at each round to be sent.

Have thoughts or questions? I'd love to hear them:

Delta Chat
hossein@naghdbishi.com (pgp)

Want more articles like this one? Get notified of new posts by subscribing to the RSS feed or the email newsletter. I won't share your email or send spam, only blog posts.

Want more content now? This blog's archive has 50 ready-to-read articles. I also curate a list of cool URLs I find on the internet.

Found a mistake? This blog is open source, you can always open an issue.

Thanks for reading! ♡ All content on this blog is licensed under CC BY-SA 4.0, except where noted otherwise, or for third-party materials.