Take the 2-minute tour ×  Suppose both I and my friend have a
set of integer numbers. We want to know the number of common
elements in our two sets but without knowing elements of the
sets of each other. So I don't want my friend to know any
element of my set and he don't want me to know his. But we want
to know how many elements are in the intersection of our two
sets (without also knowing which elements these are).  Are there
any algorithm to achieve this goal? One that will calculate the
number of common elements using data from which it is very
difficult to compute elements of our sets? Or its just
impossible?  All elements of our sets are integers so we can use
algorithms of computational number theory.  share|improve this
question  3 Answers 3  up vote 5 down vote accepted  Answer.
Yes! It is possible to do this, using the magic of secure multi-
party computation. The security property we get is basically the
best one could possibly hope for: namely, your friend learns
nothing more about your set of numb