2

The title seems little crazy, but I think that it is possible. Just think about it. If you create text file like this:

Hello world!

You get this checksum:

0ba904eae8773b70c75333db4de2f3ac45a8ad4ddba1b242f0b3cfc199391dd8

But if you change any letter like this:

Hallo world!

You get this:

bf1adae4567d9fb6b3bfb30cbf4dfdd2503e89a831cf3472c399b39fb9c73289

That means, that if I change any letter I always get another checksum, so there must be any way to get source file back.

My question is: Is there any way to get source file back without creating all possible combinations and checking checksum?

5

This is actually one of the main attributes of Cryptographic Hash Functions. As mentioned in the wiki page, they are designed so they cannot be reversed:

It is infeasible to generate a message from its hash value except by trying all possible messages

Additionally, the property which dictates a small change in the message will result in a completely different output value is also a requirement of cryptographic hashes:

a small change to a message should change the hash value so extensively that the new hash value appears uncorrelated with the old hash value

The only ways to actually achieve that is by trying all possibilities (which is intentionally impossible with today's computing power) or finding a weakness in the hashing mechanism.

Nowadays, MD5 and SHA1 are considered broken because of such weaknesses (see here and here respectively)

There are, however, caches or common strings and their different hash values and some of the message values can be found online. https://crackstation.net/ is such a repository of many hash functions.

For example, the hash 0ba904eae8773b70c75333db4de2f3ac45a8ad4ddba1b242f0b3cfc199391dd8 you gave as an example can be found here.

0

No there isn't. The act of hashing and checksumming both lose information in the process. Thus, there can be multiple files that produce the same hash and the same checksum. The only way to know that you have recovered the original file is to compare it with the original file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.