On October 13, 2026, a judgment of the Superior Tribunal de Justiça (STJ, Brazil's Superior Court of Justice) was reported in which, by majority, digital evidence extracted from a mobile phone was held unusable, even though the original extraction had been certified by a hash value. The merits of that case belong to another file. The technical discussion it sheds light on, however, applies to any case: what a hash proves, and what it leaves open.
A hash function turns a data set into a fixed-length value. The property that matters for forensic examination is sensitivity: change a single bit of the set, and the value changes. That is why the hash calculated at collection serves as a reference. Whoever recalculates the hash later and obtains the same value demonstrates that the data examined is identical to the data collected. That demonstration is powerful, but it has a scope: the hash covers the bytes over which it was calculated, at the moment of calculation. It does not cover the physical media, the environment or the history of the device.
According to the report, the device was presented years later without a seal and locked by a password, which prevented a new extraction. The prevailing dissent held that the hash proved correspondence with the data documented at the time, but did not dispel doubts about subsequent preservation, and that the impossibility of technical counter-evidence impaired the adversarial process. The rapporteur, outvoted, considered that later lapses do not automatically render lawfully obtained evidence unlawful, that the forensic copy remained available, that a party-appointed technical expert had followed the process, and that there was no concrete sign of tampering nor demonstrated prejudice, in light of art. 563 of the CPP (Brazilian Code of Criminal Procedure). Read together, the two opinions make clear that the debate is not "hash, yes or no", but "what the hash covers and what the custody documentation covers".
From a forensic standpoint, there are three layers. The first is the content: the forensic copy, verified by hash, allows it to be examined. The second is the media: the original device, whose condition (seal, lock, battery, connection) may affect whether the acquisition can be repeated. The third is the history: who had access, when and under what conditions. The chain of custody, under arts. 158-A et seq. of the CPP, covers all three, and art. 158-B includes storage, understood as keeping the material in adequate conditions, including for the purpose of a counter-examination. The technical standard ISO/IEC 27037 deals with the identification, collection, acquisition and preservation of digital evidence and takes the same line: document so that third parties can verify.
In an inspection I attended as a party expert, concerning digital content already preserved, the position taken was that, before any search for expressions or files, the hash of the key file should be recalculated and compared with the one in the collection record, and the identification, recording, collection and preservation procedures examined. This presupposes technical access to the material and, at the same time, care that unrelated third-party data is not exposed during the examination.
A word of caution on method. The tool that extracts the data may be reliable and still depend on conditions that exist only at one moment: the device unlocked, the battery, the operating-system version, the connection. When the device comes back locked, what was a second opportunity for verification is lost. That is why documenting the condition of the device at seizure (on or off, unlocked or not, with or without signal) and the state of the seal over time matters as much as the hash: these records let the judge know whether the lack of a new extraction is a problem with the media or a limitation already known and recorded.
For the party producing the evidence, the hash is necessary, but it does not discharge the burden of documenting custody. For the party challenging it, the absence of custody documentation is not proof of tampering; it is grounds for requesting clarification, a new expert examination of a verifiable copy, or restricted weight. For the court, the useful question is graduated: what is known about the content, what is known about the media, and how much of the remaining doubt matters to the conclusion one intends to draw.
A hash certifies the collection, not the custody. The first expert question in cases like this should not be about the content of the file but about its history: who held it, in what condition the material reached the examination, and whether counter-evidence is still technically possible. The answers to those questions tell how much the hash is worth in that case.
7 min read Translated from the original in Portuguese. Read the original →