Re: Why unhashing is not possible?



Randell_D wrote:
I've always led the belief that if something can be created/built,
then it can be "uncreated/unbuilt". In technology this is sometimes
referred to as reverse-engineering. I understand too how hashing can
be used within programs and fast database lookups but I failed
miserably discussing the subject of hashes with someone who could not
understand when I told them that you cannot reverse the process... I
know you can crudely hack it (using John the Ripper for example) but
you cannot "uncompress it" so to speak.

So... my question here to you good people is... why can't a hash be...
well... unhashed?

Take one of the simpler types of hashes, it will make a better example.
Say you have a database key you want to map to values

A common technique is to take the ASCII value of the first character...
this is an 8-bit hash.

for example let's add the word 'Pie' to our hash table, since P has ASCII value 0x50, our hash function says "Pie" = 0x50

HashTable[0x50] = { :Pie => "blah blah " }


The key 'Apple' hashes to 0x41, so

HashTable[0x40] = { :Apple => "blah blah" }


Then we have the key "Pineapple" which also hashes to 0x50.
So we add that to our database....


HashTable[0x50] = { :Pie => "blah blah", :Pineapple => "blah blah" }



Note that We cannot examine "0x50" and know what we were looking for.


Since the database key is 24 bits, 72 bits, or even of variable length,
and our hash function has a much smaller range of outputs.


The only way we have of constructing a function to 'reverse' the hash
is to have some knowledge of what possible values might have been hashed.


This hash is clearly not suitable for cryptographic use, because there
are so few bits, and it's trivial to find something that hashes to 0x50
other than our desired input.


--
-Jimmy


.



Relevant Pages

  • Re: reveal password fix needed
    ... > If they can't reverse the hash to produce the original password, ... > reverse the hash to something which would produce that hash again. ... If you think the hash is too weak, then do 2 different hashes and either ... join or interlace the two, then an interloper would have to find a reverse ...
    (microsoft.public.vb.general.discussion)
  • Re: Decrypt
    ... You can not reverse it. ... That is a benefit of hashes. ... you just run your string into the function again and compair the ... >> MD5 is a one way hash. ...
    (microsoft.public.dotnet.security)
  • RE: [7.8.2002 44916] Notice of Copyright Infringement]
    ... Appending a single bit onto the end of the file makes a different hash. ... and you no longer match the hashes. ... The only way to prove you're breaking copyright is to download at ... |"real" warezed version of whatever movie. ...
    (Vuln-Dev)
  • Re: ACCEPT and the SCREEN SECTION.
    ... General-purpose hashes, for hash tables and similar data structures, ... In short, cryptographic hashes like MD5 are used to verify data, ... if a client asks for and receives a chunk ...
    (comp.lang.cobol)
  • Re: what is probability to create two equal hashes for md5 algorithm
    ... Other than that, if the hash is statistically good, the longer the hash, the ... few cases the hashes match. ... md5 and crc32)? ... How much does it cost to compare two hashes? ...
    (sci.crypt)