Foundations · Overview

Hashes and integrity: the mathematical seal of digital evidence

What a hash value is, why a single different bit changes it and how it is used to prove that digital evidence has not been altered.

A physical object is closed in a sealed bag. A file is not: it can be copied, moved, opened and modified without leaving visible marks. To prove that digital data have remained identical over time a different kind of seal is needed, and digital forensics finds it in mathematics: the hash value.

A hash function takes any amount of data as input — a message, a photo, a two-terabyte disk — and returns a fixed-length string. The same sequence of data always produces the same value; but changing a single bit is enough for the value to change completely.

64hexadecimal characters in a SHA-256 value
1changed bit is enough to change the whole value
2^256possible SHA-256 values: a 78-digit number

What it is used for in practice

The hash value computed at acquisition is the identity card of the evidence. It is written in the record, quoted in the expert report and can be protected with a timestamp. Months or years later anyone can recompute it: if the result matches, the copy is the same; if it does not, something has changed.

Integrity
Shows that a file or forensic image has not been modified since acquisition.
Identification
Makes it possible to recognise a known file even if renamed or moved.
Comparison
Checks in seconds whether two copies are identical, without comparing them byte by byte.
Confidentiality
The value can be shared without revealing the content: the data cannot be recovered from the hash.

A hash does not say who created a file or when: it only attests that the content has stayed the same. That is why it works together with the chain of custody, which documents the history of the evidence, and the forensic image, which duplicates it without altering it.

↑