Can I reverse any hash algorithms to find a set of the possible orginals?

141 Views Asked by At

If I map 1024 bits onto a 16 bit hash (just random numbers for conversation sake), I will have an average of 64 collisions per hash (assuming a good algorithm).

I wonder if anyone knows any hash algorithms around today in which I could take a hash and extrapolate the ~64 1024 bit original values?

I suppose that's not easy, but I don't know for sure.

My thought process is to see if I could tack an index number onto the end of the hash to enable me to extrapolate the original (perhaps at a significant cpu cost) later.

2

There are 2 best solutions below

1
On BEST ANSWER

If your hash is only 16 bits, then on average there will be $2^{1008}$ different possible preimages for any hash value. It may be that you're only using 64 of those in practice, but you can't identify those from the hash alone, without using (very strong) additional information about the distribution of the actually occurring values.

2
On

Theoretically, there is a set of values that get hashed to a particular hash value, so there is such a function taking hash values back to the unhashed $1024$ bit numbers. However, if the hash is a good one, it should be as hard as generating the hash values for all the $1024$ bit originals and recording the mapping. That is, it is possible, but should be impractical.