My brother shared this puzzle with me this morning. He heard it on the radio but no solution was offered. Neither of us know what the answer is so I'm looking forward to one of you posting the answer in the comments. Here's the puzzle:

Bob and Alice are both millionaires. They're both curious to know who is richer but they don't want to tell the other one how much money they have. Without engaging a trusted third party, how can they both know who is richer?

I wonder if the solution has something to do with public and private keys and/or authentication.

So, what's the answer?