A checksum answers one narrow question
A cryptographic hash converts the file bytes into a fixed-length digest. If one byte changes, the digest should change. When your SHA-256 result exactly matches a digest obtained from a trusted source, you have strong evidence that your copy matches the bytes represented by that published digest.
A match does not independently prove that the publisher is trustworthy, that the software is safe, or that the download page itself was not compromised. The trust path to the expected digest still matters.
Use this verification sequence
Get the expected SHA-256 digest from the software vendor, project release page, administrator, or another trusted channel before comparing it with your local file.
- 1Obtain the expected digest
Copy the SHA-256 value exactly; avoid a random repost when an authoritative source exists.
- 2Hash the downloaded file
Use a browser-local hasher, PowerShell, certutil, shasum, sha256sum, or another trusted local tool.
- 3Compare all hexadecimal characters
Case does not matter, but every digit does. Do not compare only the first or last few characters.
- 4Treat mismatch as a stop signal
Re-download from the trusted source and investigate rather than forcing installation/use.
Command-line examples
For large files, command-line utilities are convenient because they stream the file instead of copying all bytes into an application window.
Windows PowerShell
Get-FileHash .\installer.exe -Algorithm SHA256
macOS
shasum -a 256 installer.dmg
Linux
sha256sum installer.isoCommon reasons a hash does not match
You may have the wrong version, architecture, mirror, or archive; the publisher may have replaced a build without updating the digest; a proxy/transfer may have corrupted the file; or the digest may have been copied incorrectly. Do not normalize, unzip, edit, or re-save the file before hashing unless the publisher explicitly tells you to hash the transformed result.
| Situation | What to hash |
|---|---|
| Vendor publishes hash for installer.exe | The installer.exe bytes exactly as downloaded |
| Vendor publishes hash for release.zip | The ZIP file, not an extracted file |
| Administrator gives hash for final.pdf | The final PDF before any edits or metadata rewrite |
Three real checksum scenarios
The strength of the comparison depends on the trust path for the expected digest. A checksum copied from the same compromised download location can still detect accidental corruption but offers less protection against coordinated replacement.
| Scenario | Expected digest should come from | What a match tells you |
|---|---|---|
| Software installer | Signed vendor release page/package metadata | Downloaded bytes match the published artifact |
| Large client handoff | Sender through a trusted/separate channel | Transferred archive matches the sender's finalized bytes |
| Evidence/data snapshot | Controlled manifest or evidence record | Working copy is byte-identical to the recorded artifact |
For many files, use a checksum manifest
A manifest records filename and digest for every final artifact. Generate it only after the files are frozen. If one file changes, update that row deliberately; do not regenerate the whole manifest and lose sight of which artifact changed.
Signed manifests or signed release metadata add publisher identity/authenticity that a bare SHA-256 line does not provide.
SHA256SUMS
5f2a…9c11 installer-x64.exe
a774…1b04 user-guide.pdf
8b1e…f552 sample-data.zipA checksum mismatch is a stop signal, not something to round away
Compare the complete digest. Hexadecimal letter case can be normalized, but a single changed character means the values are different. Do not compare only the first few characters for a security-sensitive verification and do not edit the expected value to match the file you already downloaded.
Mismatch causes include incomplete transfer, wrong version/architecture, server-side replacement, line-ending/content changes in generated files, proxy/security rewriting or malicious substitution. Return to the trusted source, confirm filename/version, download again and investigate if the mismatch persists.
Do not run/use the file as verified.
Correct version, filename and trusted source.
Same algorithm over the exact file bytes.
Use the trusted distribution path.
Publisher/source may have changed or transfer path needs review.
A checksum proves byte equality; a digital signature can add publisher identity
SHA-256 by itself has no concept of who created a file. If a trusted party publishes the expected digest through an authenticated channel, the comparison inherits trust from that channel. A digital signature or signed release manifest can go further by cryptographically binding release metadata to a signing identity/key.
For ordinary transfer-integrity work, a trusted expected SHA-256 may be enough. For software distribution, regulated evidence or high-stakes releases, document the provenance of the digest or use the established signing mechanism rather than describing a bare hash as authentication.
| Mechanism | Answers | Does not answer by itself |
|---|---|---|
| SHA-256 comparison | Are these bytes the same as the bytes represented by the expected digest? | Who published/signed the file? Is it safe to run? |
| Signed manifest/release metadata | Did the holder of the signing key approve these recorded hashes/metadata? | Whether the signed software/content is benign or correct |
| Malware/security analysis | Behavior/risk indicators | Whether the file is the exact intended release unless provenance/integrity is also checked |
Primary references and current-source checks
Requirements, policies and platform guidance can change. Recheck these sources when the decision matters.
NIST — Secure Hash Standard (FIPS 180-4) ↗