hashstring-hashing

Hash-like Functions


Are there any cryptographically secure hash functions that can be given a array of strings to hash, and will always calculate the same output no matter what order the array elements are in?

I realize that one could merge the array elements into one string and hash that, but I'm asking specifically about functions that are order-independent (like bloom filters) but cryptographically secure (unlike bloom filters)


Solution

  • After asking the same question on the Cryptography StackExchange, I was referred to this question which described Multiset Hash Functions, specifically the MSet-Mu-Hash and MSet-VAdd-Hash functions: https://crypto.stackexchange.com/questions/54544/how-to-to-calculate-the-hash-of-an-unordered-set