from Hacker News

Reversing an integer hash function

by flebron on 1/14/22, 6:06 PM with 16 comments

  • by rurban on 1/14/22, 7:54 PM

    I'm collecting such inverters at https://github.com/rurban/smhasher/tree/inverse/inverse

    But only 3 so far.

  • by superjan on 1/15/22, 2:08 PM

    Is there a category of hash functions that hash a 64/32 bit input to exactly 64/32 bits output, such that all inputs are uniquely preserved? This could be an interesting property for a hash table of integers, because a hash match implies a key match.
  • by blastonico on 1/15/22, 9:15 PM

    > otherwise you could simply trace backwards and generate an input that produces a specific hash

    This is when I know for sure that I'm not included in that "you".

  • by clon on 1/15/22, 1:36 PM

    Excellent tutorial for bitwise arithmetic this is. The key is the motivation you receive from the prospect of being able to do something that seems "l33t".