If you and I each have a secret number, is there a way we can find out whose is larger without either of us revealing our secret number?
Clearly a trusted third party could do the job, but I was wondering if there's some mathematical or cryptographic trick that could be used.
For practical examples, consider two people who want to compare salary, or age, or number of speeding tickets, etc.


Aye, this is Yao's Millionaires Problem!