Sign up ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Suppose Alice knows a secret number $a$, and Bob knows a secret number $b$.

Is there a simple way for Alice and Bob to know who has the lowest number, without Alice & Bob exchanging their numbers ?

share|improve this question
This is Yao's Millionaires' Problem:'s_Millionaires'_Problem –  Seth Jul 21 '14 at 21:27
@Seth : $\;\;\;$ It's at least approximately that problem. $\:$ If ties are supposed to be broken at random, $\hspace{.41 in}$ then this question's problem may be more difficult. $\;\;\;\;\;\;\;$ –  Ricky Demer Jul 21 '14 at 22:00
@RickyDemer In that case a tie could be broken with Blum's "coin-flipping by telephone". –  fkraiem Jul 22 '14 at 9:46
@fkraiem remember though, you would have to always run the coin-flip (whether there was a tie or not), otherwise you leak whether or not there was a tie. My point is, things can get complicated. –  mikeazo Jul 22 '14 at 12:56
@fkraiem : $\;\;\;$ How would that work? $\:$ Any use of that paper that I can think of would leak $\hspace{.83 in}$ which side a tie would have been broken in favor of. $\;\;\;\;\;\;\;$ –  Ricky Demer Jul 22 '14 at 17:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.