What a SHA-256 hash actually proves
A SHA-256 hash is a 64-character fingerprint computed from the exact bytes of a file. It is the most useful integrity check available to you — and the most commonly misunderstood one. This guide separates what a matching hash confirms from what it cannot tell you.
What a hash function is, in one paragraph
A hash function takes any input — a file, a password, a single word — and produces a fixed-length output called a hash. Two properties matter here. First, the same input always produces the same output. Second, a single changed byte produces a completely different output — not a slightly different one, but a string that shares almost nothing with the original. SHA-256 is one specific hash function in the SHA-2 family, standardised by NIST and widely used for file verification. Its output is 256 bits, conventionally written as 64 hexadecimal characters.
What the published hash is actually saying
When a publisher lists a SHA-256 value alongside a file, they are making a narrow, checkable claim: the file we verified produces exactly this string when you hash it. Nothing more, nothing less.
If your copy hashes to the same value, your file is byte-for-byte identical to the one the publisher held. If even one byte differs — a modified executable, a dropped-in script, a truncated transfer — the hash will not match. There is no partial match. There is no "close enough". A single character difference is a complete failure of the check.
What the match confirms
- Integrity. The file arrived intact. Nothing was corrupted in transit.
- Identity. Your file is the exact build the publisher hashed, not a variant of it.
- Tamper evidence. Any modification — intentional or accidental — is detectable with a single comparison.
What the match does not confirm
- Safety. A matching hash means the file is identical to the verified build. It says nothing about whether that build is free of malware. If the publisher shipped malware and hashed it, your file will match, and it will still be malware.
- Intent. A matching hash does not prove the file does what it claims on the tin. It only proves that the file you have is the file that was hashed.
- Legality. A matching hash does not mean the distribution is authorised. It only means the file is the same file.
This is why the Safety Center keeps repeating the same sentence: a matching SHA-256 confirms integrity, not safety. The two are different claims and only one of them can be checked by the hash.
How the hash is computed
Hashing is deterministic and boring, which is the point. The algorithm reads the file in fixed-size blocks, mixes each block with the running state through a fixed set of mathematical operations, and produces the final 64-character string. Any correct implementation of SHA-256 — PowerShell's Get-FileHash, certutil, a Linux shell, an online tool you trust — will produce the same output for the same file. If two tools disagree, one of them is broken, or the files are different. There is no third possibility.
Why SHA-256, and not SHA-1 or MD5
- MD5 is broken. Collisions — two different files producing the same hash — can be generated in seconds on ordinary hardware. Never use MD5 to verify a download.
- SHA-1 is deprecated. Practical collision attacks exist and have been demonstrated publicly. Do not rely on SHA-1 either.
- SHA-256 has no known practical attacks. For file verification, it is the standard choice.
How to run the check yourself
The procedure is short: open PowerShell, run Get-FileHash "path\to\file" -Algorithm SHA256, and compare the output against the published hash. The full version, including the certutil alternative and the exact comparison rule, is in the verification guide.
Where the check goes wrong
- Comparing only the first and last few characters. The full 64-character string has to match, end to end.
- Downloading from a mirror and assuming the hash will still match. If the mirror served a different file, it will not — and that is exactly the signal you are supposed to act on.
- Trusting a hash published on the same site that served the file. If the site is compromised, both the file and the hash can be replaced together. The hash is only useful when the two come from independent places.
- Assuming SHA-256 is case-sensitive. It is not.
a3f5andA3F5are the same value. Case is a presentation detail, not part of the check. - Assuming that a matching hash means the file is "verified safe". It does not. It means the file is verified identical.