Hashes and integrity: pitfalls to avoid
Values computed too late, weak algorithms, the wrong files: the mistakes that take away the value of the hash seal.
The hash is a powerful but literal tool: it certifies exactly what it is given, at the moment it is computed. Mistakes almost always come from this.
The most frequent mistakes
- Computing the value only after opening, renaming or converting the file.
- Using only MD5 or SHA-1 for important evidence.
- Quoting the value without stating the algorithm, or with characters copied by hand and mistyped.
- Hashing a compressed archive rather than the files it contains, or vice versa, without saying so.
- Not recomputing the value at later steps, relying only on the initial one.
- Confusing the value of the whole disk with those of individual partitions.
Different hashes do not always mean tampering
If two values do not match, the first thought is tampering, but the cause is often trivial: an interrupted copy, a faulty medium, an automatic format conversion while sending. For this reason, besides the value, it is worth documenting the exact size in bytes and the path the file followed: it helps understand what happened.
Hashes and integrity: value in court
How the hash value meets the requirement to preserve original data and prevent their alteration, and its limits before a judge.
The pages of this topic
Back to the overviewHashes and integrity: how it works
The properties that make a hash function suitable for forensic use and why MD5 and SHA-1 are no longer enough on their own.
Hashes and integrity: the step-by-step procedure
How hash values are computed, documented and verified during a forensic acquisition and in the later stages.
Hashes and integrity: the tools
From commands built into operating systems to forensic software: what is used to compute and verify hash values.
Hashes and integrity: a case study
A dispute over a video filed in a lawsuit: how hash values settle the question of whether the copies match.
Hashes and integrity: the checklist
The essential checks for using hash values correctly during an acquisition and in the later stages.
Hashes and integrity: frequently asked questions
Short answers to the most common doubts about hash values, algorithms and the integrity of digital evidence.