Hash function on list independant of order of items in it

后端 未结 9 834
无人共我
无人共我 2021-01-19 21:54

I want to have a dictionary that assigns a value to a set of integers.

For example key is [1 2 3] and value will have certain

9条回答
  •  余生分开走
    2021-01-19 22:51

    I think what is mentioned in this paper would definitely help:

    http://people.csail.mit.edu/devadas/pubs/mhashes.pdf

    Incremental Multiset Hash Functions and Their Application to Memory Integrity Checking

    Abstract: We introduce a new cryptographic tool: multiset hash functions. Unlike standard hash functions which take strings as input, multiset hash functions operate on multisets (or sets). They map multisets of arbitrary finite size to strings (hashes) of fixed length. They are incremental in that, when new members are added to the multiset, the hash can be updated in time proportional to the change. The functions may be multiset-collision resistant in that it is difficult to find two multisets which produce the same hash, or just set-collision resistant in that it is difficult to find a set and a multiset which produce the same hash.

提交回复
热议问题