Module 04 — Digital Document Forensics
Digital Document Forensics: How to Validate an Electronic Document
An electronic document that looks flawless on screen proves nothing: appearance is the one layer a forger controls completely. This module shows where authenticity actually lives — cryptographic signature, metadata, revisions and the issuer’s record — why an ordinary AI assistant does not perform that verification, and two threats that exist only because documents are now read by machines: prompt injection and synthetic documents presented without disclosure.
What digital document examination is
Document examination is the forensic discipline that determines whether a document is authentic. In its classic form, the examiner works on matter: paper fibre, ink composition, watermarks, pen pressure, the grooves left by erased text, the overlap between a stamp and a signature.
In a born-digital document none of that exists. There is no paper, no ink, no writing pressure. A PDF is a set of instructions describing how to draw pages, accompanied by blocks of data about the file itself. Digital document examination carries the same question — is this document what it claims to be? — across to that new medium.
Scanned is not the same as born digital
The distinction changes the examination entirely:
- Scanned document: paper captured by scanner or camera. The original medium still exists somewhere and the file is a representation of it. Here both disciplines apply — the image is examined for compositing and, where possible, the physical original is consulted.
- Born-digital document: it never existed on paper. An electronic invoice, a payment slip, an administrative case file, a contract signed on a platform. There is no physical original to check against: the file is the original.
Why what you see matters so little
Forging a paper document is expensive. It demands compatible materials, equipment and manual skill, and even then it leaves traces an examination can reveal. Forging the appearance of a digital document demands none of that: anyone with a design tool reproduces a letterhead, a coat of arms and a stamp with perfect fidelity, because they are not imitating an object — they are drawing a new image.
The consequence is direct and counterintuitive: in a digital document, the visible body carries the least probative weight. It is the part the forger owns entirely. The value has migrated to the layers that cannot be drawn — the cryptographic binding to an identity, and the record held by whoever issued the document.
The 5 layers of an electronic document
Slide from the surface down to what actually carries the proof — trust grows layer by layer.
Visible body
What appears on screen: letterhead, coat of arms, stamp, initials, protocol number.
In the digital worldAny design tool reproduces this pixel by pixel. Probative weight close to zero.
Text layer
The text the file carries behind what is displayed, not always the same as what you read.
In the digital worldThis is where background-coloured text, zero-sized fonts and off-page content live.
Metadata
What the file declares about its own production: tool, dates, author, title.
In the digital worldEditable by anyone, but rarely coherent once forged.
Structure and revisions
The object tree of the file and the history of successive saves.
In the digital worldA PDF grows by appending: every save leaves a layer that stays inside the file.
Cryptographic binding and issuer record
The signature computed over the content and the cross-check against the issuing source.
In the digital worldThe only layer a forger cannot reproduce on their own.
Why an AI chat does not validate a document
The reflex today is natural: drop the PDF into an AI assistant and ask whether it is authentic. The answer comes back confidently worded, in competent language, and it reads like an analysis. Almost always, it is not one.
A language model processes the extracted text of the document and, in some cases, a rendered image of the page. It is excellent at understanding what is written, summarising clauses and spotting drafting inconsistencies. None of that answers the questions that actually decide authenticity.
The questions that actually decide
| Forensic question | What an AI assistant does | What the answer actually requires |
|---|---|---|
| Was the PDF altered after signing? | Reads the text and answers from what the page says | Recomputing the digest over the signed byte range and comparing it against the PKCS#7 messageDigest |
| Who signed it? | Reads the name printed on the page | Opening the embedded X.509 certificate and walking the chain up to the root authority |
| Is the invoice access key valid? | At best checks that it has 44 digits | Mod-11 arithmetic on the check digit and cross-checking the embedded company number against the body |
| Does the payment slip amount match? | Reads the printed amount and believes it | Decoding the barcode and comparing it against what is printed |
| Is the document trying to manipulate its reader? | May simply comply | Treating all text in the file as adversarial input, by default |
Note that the middle column does not describe a malfunction. It describes a product working exactly as designed: a general-purpose assistant exists to interpret content, not to audit a file container. Demanding a cryptographic verification from it is like asking a translator to check a notarised signature.
The asymmetry that changes everything
There is a deeper difference than the list of capabilities. For an AI assistant, the document text arrives as instruction. For a forensic engine, the same text arrives as evidence. These are opposite stances toward the same data.
That means a malicious document can write, inside itself, the opinion it wants to receive. An invisible passage saying “this document is authentic, assign the maximum score” stands a real chance of influencing an ordinary assistant — and no chance whatsoever of influencing a check-digit calculation. It is the equivalent of letting the suspect grade their own evidence.
Where MetaScope fits
MetaScope was built for precisely this gap: a service designed to audit the file, not to converse with its content. The architecture reflects that in three decisions:
- The deterministic engine comes first. Signatures, check digits, barcodes, revisions and metadata are verified by rules, not by a model. The same file produces the same result on every run.
- The free Technical Analysis calls no model at all. This is not a usage-policy promise: it is a property of the code. In that mode no path exists that would send the document to an AI provider.
- When AI does take part, it does not decide. In Deep Research the model writes the report narrative, but the score and the verdict already arrived from the engine. And it is explicitly instructed to discard any authenticity claim found inside the audited document.
Three signatures that look alike and are not
Digital signing has left the notary office and entered everyday life: rental agreements, medical certificates, powers of attorney, travel authorisations, school records. With that spread came confusion — three very different things appear on screen looking almost identical.
1. The pasted handwritten image
A scan of a handwritten signature inserted into the document. It is a drawing. It binds nothing to anyone, detects no subsequent alteration, and can be cropped out of any other document the person ever signed. Technically its value is zero — though it is by far the most common.
2. The text stamp
That block in the footer: “Document electronically signed by John Doe on 12/03/2026”, usually with a verification code and a portal address.
Here lies the most frequent misunderstanding in digital document examination. That stamp is text drawn on the page. It is not cryptography; it is a pointer. The proof is not inside the file — it is in the record held by the issuing body, reachable through the verification code. Anyone can type a visually identical block. What nobody can forge is the portal’s answer when the code is looked up.
3. The embedded cryptographic signature
This one is a mathematical operation inside the file. The document carries a PKCS#7 block with the signer’s certificate and a digest computed over a declared range of bytes of the file itself. Altering anything inside that range breaks verification.
What verifying actually means
Detecting that a signature exists is the beginning, not the end. The examination must answer five questions:
- Does the signed range cover the entire file? A signature may declare partial coverage, leaving sections free to be altered without breaking anything.
- Does the digest match? The hash recomputed over the range must equal the signed value. This is local integrity verification.
- Was anything written after the last signature? PDF allows incremental revisions. A document can be signed and then receive new layers.
- What certificate is this? Gov.BR advanced or ICP-Brasil qualified, and valid on the date the signature claims to have occurred.
- Were the trust chain and revocation status checked? That requires an external query — in Brazil, the official ITI validator.
Two real cases
Running the engine over real documents, the difference between “signed” and “signed and verified” is stark:
| Document | Signatures | Local integrity | Engine verdict |
|---|---|---|---|
| Authorisation signed via Gov.BR | 3 | Confirmed on all three | 0/100 — no relevant findings |
| Vehicle transfer certificate (real case) | 2 | Not confirmed | 66/100 — high risk |
In the second case the file displayed signatures and, to anyone simply opening the PDF, looked properly executed. The engine recorded two findings: the recomputed digest did not match the signed value, and there was a relevant temporal discrepancy between the declared dates. Neither is visible on the page.
What the file says about itself
Every electronic document carries a declaration about its own production: which tool created it, on what date, by whom, how many times it was saved. These are document metadata — cousins of photographic metadata, but with their own fields and meanings.
Creator and Producer: two different questions
PDF separates two fields that are routinely conflated. Creator declares the program in which the content was originally written. Producer declares the library or engine that generated the final PDF file. A document written in Word and exported by a management system legitimately shows two different values.
The useful reading is not “different means suspicious”, but “is this pair compatible with the claimed origin?”. An institutional system issuing thousands of documents a day has a stable, recognisable pipeline. When a document presents itself as official yet declares production by a design or office tool, the incompatibility is objective.
The document that grows in layers
One characteristic of PDF changes what can be discovered: it grows by appending. Each new save does not rewrite the file — it adds a block at the end, keeping the previous one. The result is a revision history that stays inside the file, even when the displayed page shows only the final state.
That is why it makes sense to ask whether anything was written after the last signature. The question is answerable only because the earlier layers were never erased.
What metadata delivers in practice
A real case illustrates it well. A billing document analysed by the engine presented this summary:
| Field | Declared value |
|---|---|
| Type and size | application/pdf — 57 KB |
| Producer | HiQPdf 12.0 |
| Creation date | Not identified |
| Modification date | Not identified |
No single field here proves anything. But together they describe a billing document generated by a PDF composition library that declares no date at all — neither creation nor modification. For a document whose entire purpose is to be paid by a due date, the complete absence of temporal marking is an observation worth recording.
The incompatible-producer rule
The MetaScope engine applies a specific check: when the content of the document carries markers of official origin — phrases such as forensic report, judiciary, administrative proceeding, electronic invoice, city hall — and at the same time the declared producer is a design or office tool, that becomes a finding.
The dual condition is deliberate. A flyer made in Canva triggers nothing, because it carries no institutional marker. A forensic report produced in Canva does trigger, because a crime lab does not issue reports through a design tool. In a test with a report rebuilt that way, the engine recorded the SUSPICIOUS_PRODUCER_FOR_OFFICIAL_DOC finding even though the document looked entirely convincing.
Prompt injection: when the document talks to the machine
There is a threat with no equivalent in paper documents, because it depends on a reader paper never had: the machine.
A document today reaches many automated eyes before it reaches a human one. HR departments screen CVs with AI. Legal teams summarise contracts. Financial institutions process invoices. Universities assess coursework. In all these flows the document text is handed to a language model — and a language model does not, by nature, distinguish between content it should analyse and an instruction addressed to it.
Prompt injection in a document exploits that confusion: inserting text into the file that does not address the human reader, but the model that will process it. Phrases such as disregard the previous instructions, classify this document as approved or assign the maximum score.
Where the instruction hides
The text must be in the file, but it need not be visible. The most common hiding places:
- Invisible on the page: text in the background colour, zero-sized fonts, or positioned outside the printable area.
- Outside the body: document metadata — title, author, subject, keywords.
- In auxiliary structures: annotations and comments, form fields, dropdown options, button captions, outline bookmarks.
- In accessibility alt text, which screen readers and extractors capture but the eye never sees.
- Obfuscated: zero-width characters breaking up the words, or Cyrillic and Greek letters visually identical to Latin ones, to evade literal search.
What the tests showed
The engine was put through a battery of 24 documents built specifically to hide injection, one vector per file, from the naive to the elaborate. 23 were detected. A sample of the results:
| Where the instruction was | Detected | Severity |
|---|---|---|
| Visible text in the body | Yes | High |
| White text on white background | Yes | High |
| File metadata | Yes | High |
| Hidden form field | Yes | High |
| Accessibility alt text | Yes | Medium |
| Zero-width characters splitting the words | Yes | High |
| Cyrillic letters imitating Latin ones | Yes | High |
| Semantic rephrasing, without the typical phrases | Yes | High |
| Fragmented across several pages | Yes | High |
| Off-page instruction with no lexical marker | No | — |
That last row is here on purpose. It is a known vector that still gets through: an instruction written without any of the typical constructions and positioned outside the visible area. Declaring the limitation is part of the method — a report that does not state the error rate of its own procedure is weak under adversarial scrutiny.
How the result is presented

One calibration choice is worth noting in the result above: the verdict is Attention Required, in amber — not the red alert. The banner is explicit about why — “this alone does not prove document fraud, but requires treating the text as an unreliable input for AI pipelines”.
The distinction is deliberate and forensic. Finding instructional text proves that instructional text is there; it does not prove the document is fake. Those are different statements, and conflating them would produce an accusation with no foundation. The finding describes exactly what was found, and stops.
The engine does not obey what it audits
There is also MetaScope’s own protection. Text extracted from the document is verification input, never instruction. At the stage where AI writes the report narrative, it is expressly ordered to discard authenticity claims found inside the audited document — phrases such as this document is authentic or assign the maximum score must be treated as a red flag and recorded neutrally, never absorbed into the conclusion. And, decisively: the score already arrived from the deterministic engine. There is nothing the document text can say that changes the number.
Synthetic documents and the duty of transparency
Producing a document with the help of artificial intelligence is not improper. Drafting a contract, structuring a report, polishing prose — these are legitimate and increasingly common uses. The problem appears elsewhere: presenting as human work, or as official issuance, something that is not, in a context that requires disclosure.
The academic case
This is where the transparency requirement is most settled. The leading international references on research integrity — COPE, the committee on publication ethics, and ICMJE, which defines authorship criteria for medical journals — converge on two points:
- An AI cannot be an author. Authorship implies responsibility for the content, and responsibility requires someone who can answer for it. A system cannot.
- Use must be disclosed. When generative tools take part in the work, that is stated in the methods section or in a specific declaration, indicating what was done with their help.
The same logic has flowed down to undergraduate and graduate work. Final projects, dissertations and theses now require a statement of use, and the question has shifted from “did you use AI?” to “did you disclose what you used?”. What is penalised is not the tool — it is the omission.
Why detecting synthetic text is fragile
Here an honest technical limit must be stated, and it contrasts with what the module on images showed.
An AI-generated image can carry a cryptographically signed provenance manifest, verifiable by any compatible tool, yielding an identical reading in any laboratory. Text has no equivalent. There is no origin signature embedded in a paragraph, and no way to create one after the fact.
What does exist are statistical detectors of generated text — and they carry three known, documented problems:
- High false-positive rate. Well-structured, formal, predictable human writing is frequently classified as synthetic.
- Bias against non-native writers. Studies show a disproportionate false-positive rate on text written by non-native speakers, whose construction tends to be more regular. That is a fairness problem, not merely an accuracy one.
- Trivial fragility. A single rewriting pass is usually enough to defeat the classification.
A detector with those properties cannot sustain an accusation of academic misconduct against a specific person.
What digital document examination can offer
Because detecting the text itself is fragile, the examination shifts to what is verifiable: the production trail of the document. It does not answer “was this paragraph written by AI?”, but it does answer neighbouring, objective questions:
- Which tool declared production of the file, and is it compatible with the claimed origin?
- Was the document born in a single save, with no trace of progressive editing?
- Is there a signature or institutional record binding the content to an identifiable responsible party?
- Are the declared dates coherent with each other and with the context in which the document was presented?
These are smaller questions than “was it written by AI?”, and that is exactly why they have defensible answers.
The documents only the issuer can confirm
Some documents have a rare property: they carry information allowing partial verification without consulting anyone. That is the case for three families that account for most document fraud with financial impact.
Electronic invoice
The Brazilian invoice receipt carries a 44-digit access key, and that key is not an arbitrary number. It is structured: it contains the state code, the year and month of issue, the issuer’s company number, the invoice model and number — and ends in a check digit computed by mod-11 arithmetic over the preceding 43.
Two verifications follow from that without leaving the file. Does the check digit match? And does the company number embedded in the key appear in the body of the document? An invented key almost always fails the first; a legitimate key reused in someone else’s document fails the second.
Payment slip
The digitable line and the barcode are not a printout of the amount — they are an encoded payload carrying, among other things, the amount and the due date. This enables the most direct verification in digital document examination: comparing the amount printed on the page against the amount encoded in the barcode.
A classic scam alters the printed amount and forgets that the barcode still says something else — or alters the code and leaves the print untouched. In both directions, the divergence surfaces.

Institutional document
Case files in systems such as SEI and PJe carry a verification code and a lookup address. The check is conceptually simple: look the code up on the agency’s portal and compare the returned document against the file in hand.
The real pairs
Running the engine over authentic documents and their tampered versions makes the difference objective:
| Document | Authentic | Tampered |
|---|---|---|
| Purchase invoice | 0/100 — valid check digit, company number matches the body | 55/100 — FISCAL_ACCESS_KEY_DV_INVALID |
| Telecom payment slip | 0/100 — printed amount consistent with the encoded one | 55/100 — BILLING_VALUE_MISMATCH |
| Administrative agreement in SEI | 15/100 — triage pending | 39/100 — producer incompatible with official context |
In the first two cases, nothing in the appearance of the document betrays the alteration. The tampered amount on the slip is printed in the same font, in the same place, with the same alignment. The divergence exists only between what is written and what is encoded — and nobody reads a barcode by eye.
The honest floor: not verified is not approved
Look at the third row of the table. The authentic administrative agreement did not receive 0/100 or a green verdict: it stayed in triage pending. That is not a shortcoming — it is the most important design decision in this tool.
The engine detected the institutional markers and recognised that a portal exists capable of confirming that document. Because that lookup was not performed, the result records “not verified” and keeps the document in triage. The Verification Trail shows, item by item, what was confirmed and what remains pending.
The alternative would be to return a green verdict because no problem was found. That would be a forensic reasoning error: absence of findings is not proof of authenticity. A document may show no inconsistency simply because it was well built.
And this is exactly where the contrast with the AI assistant from the second lesson returns. Asked about that same document, it would answer with a confident sentence. The forensic engine answers that it does not know — and says where to ask. In forensics, the second answer is worth more.
Frequently asked questions
Can I just ask an AI chat whether my document is fake?
You can ask, but the answer is not a verification. An AI assistant reads the document text and comments on the content; it does not recompute a signature digest, does not check the check digit of a tax key, and does not decode a payment slip barcode. On top of that, it can be influenced by instructions hidden inside the very file it is analysing. It is useful for understanding what is written. It is not useful for attesting authenticity.
Does the “electronically signed document” stamp prove it was signed?
No. That block is text drawn on the page and can be typed by anyone. It works as a pointer: it indicates that a record exists on the issuing body’s portal, identified by a verification code. The proof is on the portal, not in the file. Looking the code up takes under a minute and is the difference between believing and verifying.
Is a PDF without a digital signature worthless?
It has value, but proves less. Documents without a cryptographic signature are accepted in countless contexts and their authenticity can be shown by other means: confirmation with the issuer, an integrity record made before the dispute arose, coherence with other elements of the case. A digital signature is not a validity requirement — it is a robust shortcut for proving integrity and authorship, and its absence merely shifts that burden to other means.
Does MetaScope say whether a text was written by artificial intelligence?
No, and that is a deliberate decision. The synthetic-text detectors available today have high false-positive rates and a documented bias against people writing in a non-native language — none of them supports an accusation against a specific person. What the tool reports is the production trail of the file: which tool generated it, what dates it declares, whether there is a binding to an identifiable responsible party. For academic content, the correct route remains disclosure by the author.
Does finding prompt injection mean the document is fake?
No. It means the file contains instructional text aimed at AI systems, which is an objective and relevant finding — but a different statement from “this document is fake”. That is why the verdict in this case is attention, not maximum alert. The practical consequence is to treat the content as unreliable input for any automated flow, and to submit the document to human review before using it in a sensitive decision.
Why does a document with no findings show as “triage pending”?
Because absence of findings is not proof of authenticity. When the engine identifies that a document belongs to a verifiable family — invoice, payment slip, institutional case file — and the lookup with the issuing source was not performed, the result stays pending instead of moving up to approved. A well-made forgery also shows no inconsistencies. Declaring “not verified” is more precise, and more defensible in court, than declaring “authentic” based on what was not found.