Zhang Fan · Lawyer Home
中文 English

What to Check When Electronic Data Hash Values Differ

Electronic Evidence · Source and Integrity

It was a case involving a cross-border online platform and an amount exceeding RMB 10 million. The key evidence submitted by the prosecution was an external hard drive containing an image of the platform’s entire operational backend.

During the first review of the case file, the Electronic Data Extraction Record and the forensic expert opinion were both present. To many people, once a forensic institution has affixed its official seal, electronic evidence is unassailable. But a discrepancy emerged when we checked a long string of hash values in the supplementary attachments. When investigators seized the server at the scene and created an image file in raw format, the SHA-256 hash recorded in the extraction record ended in ...8A3F. Yet the examination report issued by the forensic centre six months later recorded a hash for the submitted material ending in ...9C21.

When hash values differ, first confirm that the objects hashed, the algorithms and the recorded values are accurate. If these conditions are all consistent, different hash values indicate a difference between the data used in the two calculations. Defence counsel should investigate the cause, identify the content affected and assess the implications for the evidence’s authenticity, identity and integrity.

In practice, when hash values differ, four critical points require close attention.

First, check the precise scope of what was hashed.

Often, the discrepancy arises from comparing things that cannot meaningfully be compared. When investigators seize a drive, they may calculate the hash of an image of the entire physical hard drive, including unallocated space. The forensic institution, meanwhile, may image and hash only a logical partition, such as the C drive or D drive. Another common situation is that the examiner compresses files into a .zip or .rar archive. One person hashes the archive, while another extracts it and hashes the folder inside. When checking the “description of submitted material” fields in the extraction record and examination report, the first step is to establish whether both parties hashed the same thing.

Second, check the algorithm used to calculate the hash.

Different algorithms produce entirely different outputs. In practice, there have been cases in which an examination record specified MD5 while the forensic opinion specified SHA-1. In others, both documents referred to a SHA algorithm, but one used SHA-1 and the other SHA-256. If the algorithms differ, the personnel who collected the evidence must be required to provide an explanation, and the comparison must be repeated using the same algorithm.

Third, check whether the Chain of Custody is complete and examine the sealing records.

If the object being hashed and the algorithm are consistent but the hash values still differ, follow the storage and transfer records to investigate possible data writes, operational errors, storage damage or mistakes in recording the hash values, and establish the extent of their effects. At this point, obtain every Physical Evidence Transfer Inventory and Sealing Record, and check the sequence day by day. From seizure at the search scene and sealed storage through submission for examination, forensic analysis and transfer with the case file, were the seals intact? Were there any discrepancies in the seal numbers? Was the submitted material ever powered on or used by unauthorised personnel during these transfers?

Fourth, check whether the necessary write-protection measures were taken during evidence collection.

When examining original storage media, the media should be connected to the examination equipment through a write blocker in accordance with the rules. Where conditions permit, a backup should be made and examined. If a write blocker cannot be used and a backup cannot be made, the reasons should be recorded and the activities should be video-recorded. Connecting media directly to an ordinary computer may change data or metadata on the original media, so the specific operations and their effects must be checked. An image file that has already been preserved must also be checked separately for changes. The extraction, sealing, transfer and examination records should ultimately be considered together to assess whether the electronic data can be used as a basis for deciding the case.

At the trial in that case, we applied for a person with specialised knowledge to appear in court and reconstruct the chain of transfers of the submitted material. The prosecutor was unable to give a reasonable explanation in court for the substantive change in the hash. The court ultimately found that the electronic data had been materially contaminated, that its authenticity and identity could not be confirmed, and that it could not lawfully be used as a basis for deciding the case.

Checking hashes has always been more than a technical comparison. It is the most fundamental and unyielding line of defence in the rules governing electronic data evidence.

Back to Legal Guides

Contact via WeChat

WeChat contact QR code
Scan in WeChat or from saved photos.