/tutorials/what-a-hash-proves
What a Checksum Hash Actually Proves
The difference between hashing and encryption, what one way and collision resistant actually mean, and where hashes show up day to day.
6 min read
Run Hash GeneratorRelated tools
Hashing is not encryption
Encryption is reversible by design. You encrypt something so that whoever holds the correct key can decrypt it and get the original back. Hashing does the opposite job entirely. A hash function takes any input, of any length, and produces a fixed length string of characters, and it is designed so that going from the output back to the original input is not feasible. A hash is not scrambled data waiting to be unscrambled. It is closer to a fingerprint of the data.
What one way and collision resistant actually mean
One way means there is no practical process to recover the original input from its hash alone. Collision resistant means it is extremely difficult to find two different inputs that happen to produce the same hash. A good hash function needs both properties. If it lacked the first, it would be reversible and therefore useless for verification. If it lacked the second, someone could construct a malicious file that produces the same hash as a legitimate one, defeating the entire point of checking it.
Why the same input always gives the same output
Hash functions contain no randomness. The exact same input, down to a single byte, will always produce the exact same output, every time, on any machine, forever. This determinism is what makes hashing useful for verification in the first place: if you and I both hash the same file and get different results, we know for certain the files are not actually identical, even if they look the same at a glance.
What a hash does not prove
A matching hash only tells you that two pieces of data are byte for byte identical. It says nothing about who created the file, whether it is safe to run, or whether it does what it claims to do. A hash published on the same compromised website as the file itself proves nothing, since an attacker controlling the download would simply publish a matching hash for their altered version too. A hash is only useful when it comes from a source you trust independently of the download itself.
Where hashes turn up day to day
- Software downloads, where a publisher lists a checksum next to the file so you can confirm it was not corrupted or tampered with in transit.
- Password storage, where a system stores a hash of your password rather than the password itself, so a database leak does not directly expose what you typed.
- Version control systems like Git, which identify every commit by a hash of its contents.
- Detecting duplicate files, since two identical files will always produce identical hashes regardless of their names.
Trying it yourself
The Hash Generator produces MD5, SHA-1 and SHA-256 hashes for any text you type, entirely in your own browser, so nothing you enter is sent anywhere. Type the same sentence twice and notice the output never changes, then change a single character and notice the entire output is completely different, not just the part near the change. That behaviour, a small change producing a completely different result, is called the avalanche effect and is a deliberate property of a well designed hash function.
Related tutorials
