[英]How can I compare two lists of strings from two people without sharing the actual strings between people?
For example, how can the owner of list A compare identify how many of their strings exist in List B without ever seeing List B? 例如,列表A的所有者如何比较,以识别列表B中存在多少个字符串,而没有看到列表B?
List A List B
abcdef abcdef
ghijkl mnopqr
stuvwx stuvwx
yz0123
The result should be two. 结果应该是两个。 As in, List A has 2 strings found in List B. This is easy enough if lists are shared in open text. 与清单A一样,在清单B中有2个字符串。如果清单是在开放文本中共享的,这很容易。 But how can this answer be found without the owner of List A seeing List B? 但是,如果列表A的所有者没有看到列表B,如何找到此答案?
您可以哈希两个列表中的字符串,然后比较哈希值。
If users A and B are peers with no real "system" to handle the transactions between them, then: 如果用户A和B是没有实际“系统”来处理它们之间的事务的对等方,则:
However, if there is a real system (server) between the two users, it is able to see everyone's list entries and communicate matches back to the users. 但是,如果有两个用户之间是一个真正的系统(服务器),它是能够看到每个人的列表条目和交流比赛回给用户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.