I've now three or four times run into the situation where I want to securely and privately find the intersection of a list I have, with a list someone else has – but without either of us seeing one another's full list.
For example, I want to find discover customers with a prospective partner. But they don't want to send us their complete customer list, and we don't want to send ours to them.
There is CS research into the topic of "Private Set Intersection Protocols", but I haven't found a working implementation. And I could pay an accounting or legal firm to do this manually, but that will cost more money and time than it's usually worth.
Have you ever heard of somebody doing an escrow service for this, where party A and party B each send their lists to the service, the esrvice verify the size of each list (so we're not just spamming the service), and then they send back the matches to both parties? Or a tool simple enough to send to someone else to run locally?
"What if he sends back my list of hashes, although he has no common customer?"
I would do as follows:
1. Both pick a hashing function (f and g).
2. Both share their hashing function.
3. Both hash their list with two functions.
4. Both send the list of hashes computed with the other's function.
5. Common hashes <=> common customer.
For example, my list: Amanda, Patrick
His list: Patrick, Stanley
I choose f, he chooses g.
My list |> f = 12, 54 (mine)
My list |> g = 36, 2 (public)
His list |> f = 54, 7 (public)
His list |> g = 2, 68 (his)
I compare both lists with f, and he does the same with g. I conclude the only common customer is Patrick. He would not be able to send 54 without knowing Patrick or reverse-engineering the function (or being pretty lucky).