comparison Data & storage
File checksums: corruption detection versus authenticity
A checksum can show that a file’s digest agrees with a reference value. It cannot identify the supplier: trust in the reference must come from separate evidence, such as a signature verified with a trusted publisher key.
What it means
A matching checksum supports an integrity check against a reference. It does not tell you who supplied the file or why you should trust the reference. A download site could offer a different file and list the correct checksum for that file. Your comparison would succeed without telling you whether the publisher intended you to receive it.
A hash function maps file bytes to a value called a digest. Collision resistance means that finding different inputs with the same digest is computationally difficult, not that each digest belongs to exactly one possible file. NIST: Hash Functions
Try it
Use synthetic values only. The simulation compares two supplied digest strings. It does not read or hash a file, verify a signature, or check where either string came from.
File checksums: corruption detection versus authenticity
Compare a supplied file digest against trusted, untrusted or absent reference evidence; separate byte equality from provenance without generating collisions.
Synthetic inputs only. This is not a measurement of your hardware or service.
Hex strings are compared using the declared algorithm. Reference trust is a separate supplied premise, not something equality creates.
Digest agreement does not create provenance
- Supplied digest strings agree
- Yes
- Reference-based conclusion
- not-established
Evaluated evidence
- Declared digest algorithm
- sha256
- Supplied observed digest
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- Supplied reference digest
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- Reference provenance evidence
- untrusted
Only supplied digest strings are inspected. No file is read or hashed, no signer or provenance is authenticated, and a digest match is not a mathematical proof of byte equality.
About this model
Every input is local synthetic evidence. Numbers stay as raw text until this model validates them. The shown evaluated values come from the same result as the explanation.
Presets replace the entire scenario. Reset restores all starting fields, scenario selection and model state; it does not change the open or closed state of this help or article FAQ.
No external request, device command, stored-input history or measurement is performed.
- Start with Declared digest algorithm set to
sha256. Supplied observed digest and Supplied reference digest each contain 64 lowercaseacharacters. Both are valid SHA-256 hex strings, and they agree digit for digit. Supplied digest strings agree is thereforetrue. With Reference provenance evidence set tountrusted, the separate Reference-based conclusion isnot-established. - Choose Supply trusted reference evidence. Neither string changes, so agreement is still
true. The reference-based conclusion becomesmatches-trusted-reference. What changed is the premise about the reference, not the comparison. Selectingtrustedsupplies that premise; it does not authenticate the reference. - Choose Inspect the evidence boundary. The preset leaves the observed digest intact but removes the reference and marks it
absent. The result isunknown, notfalse: there is no second value to compare. For a genuine mismatch, return to the default example and change just one observedatob. Both strings are still valid, but agreement is nowfalse.
The lab takes one algorithm declaration for both values: sha256 requires 64 hexadecimal digits and sha512 requires 128. Uppercase and lowercase hex letters represent the same value. A wrong length or a non-hex character in a digest being compared makes the input invalid, not a mismatch. If the two digests came from different algorithms, there is no like-for-like comparison. If you cannot name a common algorithm, choose unknown rather than guessing; the lab gives no agreement verdict. Reset restores all four default inputs and the default scenario, returns the step and virtual time to zero, and clears errors, history, and the comparison.
In practice
For a release download, first identify the reference entry for the file you meant to get. Compare it with the digest computed from the copy you received, using the same named algorithm. If they differ, stop short of accepting the file as a match; the difference alone cannot tell you whether the download changed or you picked the wrong reference entry.
If they match and you need evidence of origin, ask what ties the reference to the publisher. For example, a verified signature on a checksum list can connect the list to a signing key. To attribute the list to the publisher, you also need an independent reason to trust that the public key is theirs. That signature check is separate from comparing the file digest with the entry on the list. GnuPG Privacy Handbook: Digital signatures
| Evidence | Supported inference | Not established |
|---|---|---|
| Digest mismatch | The supplied digests differ | Which component or actor caused the difference |
| Match with untrusted reference | The supplied strings match | Authentic origin |
| Match with trusted reference | Consistency with that reference | That only one file could have that digest, or who delivered this copy |
Report the two findings separately: what the file digest matched, and what evidence authenticates the reference. If the only answer to the second question is “the digests matched,” origin is still unproved.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Does a matching checksum identify the sender?
Not by itself. If the file and its reference digest both come from an untrusted party, matching strings do not establish the sender. A signature check with trusted key provenance answers a different question.
What makes the reference trustworthy?
Trust requires an independently justified source for the reference, appropriate to your threat model. The lab accepts that as an explicit premise; it cannot create trust by labeling the reference trusted.
Can different algorithms be compared?
Not as though they were the same digest. This example checks the declared algorithm and representation length before comparison; an unknown algorithm returns unknown instead of guessing compatibility.
Does this example prove absence of all corruption?
No. It compares supplied digest strings, not actual file bytes, and does not prove that every possible error would be detected. Even a match against a trusted reference is a scoped integrity observation, not a universal guarantee.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- GnuPG Privacy Handbook: Digital signatures
Digital signatures. Verification of a signature is distinct from comparing an unauthenticated file digest; authentic public-key provenance still matters.
Checked .
- NIST CSRC: Hash Functions
Approved Algorithms; Security Strengths of Approved Hash Functions. A hash maps a message to a digest; collision resistance is a computational security property, not mathematical uniqueness or sender identity.
Checked .