# How to verify a digital signature in a PDF: the checks, tools and libraries

> To verify a PDF signature, recompute its hash, check the signature, decide whether you trust the key and read the time. Tools, libraries and a checklist.

- URL: https://computese.com/verify-pdf-signature/
- Author: Kai Mai, Chief Technology Officer, Computese
- Published: 2026-11-30
- Updated: 2026-12-03
- Topics: Security, Custom software

## In short
- Verifying a PDF signature answers four questions in order: do the signed bytes still hash to the recorded value, does the signature match the signer's public key, is that key one you trust, and when was it made. Each check proves one thing only.
- An embedded signature covers a ByteRange of the file and carries a CMS container; bytes appended after signing sit outside it. A detached seal leaves the PDF unchanged and ships a separate proof file, which a PDF reader will not show.
- Acrobat's "At least one signature has problems" usually means the signer's certificate is not in its trusted identities, not that the file was altered. pdfsig, pyHanko and OpenSSL separate valid math from trust the same way.
- pyHanko (MIT), EU DSS (LGPL) and Poppler's pdfsig (GPL) verify embedded signatures. Apache PDFBox ships only a partial example, and pdf-lib and @signpdf do not verify. For Minute Notary seals, the MIT-licensed sealed-pdf-verify runs five checks offline.
- No check proves who the signer was, what the document means in law, or that a private key was never stolen. A trusted timestamp shows when data existed, and a pinned fingerprint narrows whose key it is.

To verify a digital signature in a PDF, open it in Adobe Acrobat Reader and choose Signatures, then Options and Validate Signatures. Behind that click run four checks: the signed bytes still hash to the recorded value, the signature verifies with the signer's public key, the key chains to a root you trust, and the signing time holds.

Command-line tools such as pdfsig and pyHanko run the same checks. This guide is for two readers: a person who received a signed or sealed PDF and must decide whether to trust it, and a developer choosing a library to verify PDFs in code. It covers what each check proves, embedded signatures and detached seals, Acrobat's messages, tools with their licences, our open-source verifier and a trust checklist. Versions, licences and rules are as of December 2026. The commands ran on a Mac with OpenSSL 3.6.2, Poppler's pdfsig 25.12.0 and pyHanko 0.38.2.

## What does verifying a PDF signature prove, and what does it not?

A green tick answers fewer questions than it seems to. Verification is four checks, plus a fifth where the issuer keeps a public log, and each proves one thing.

| Check      | A pass proves                                                                              | A pass does not prove                                               |
| ---------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| Integrity  | Not one byte in the signed range has changed                                               | Anything about bytes outside that range                             |
| Signature  | The signer held the private key that matches the public key                                | Whose key it is                                                     |
| Key trust  | A certificate chain to a trusted root, or a fingerprint you pinned, ties the key to a name | That the person is who they claim, or that the key was never stolen |
| Time       | A timestamp authority signed the hash, so the data existed by then                         | When the person decided to sign                                     |
| Public log | An entry recomputes and links to the one before it                                         | That the log you were shown is the log everyone sees                |

The first two checks are arithmetic. A signature is made over a digest of the data, so one changed byte gives a different digest and a failed signature. The [Digital Signature Standard, FIPS 186-5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), says the verifier uses the claimed signatory's public key and the same hash function. Nothing in that arithmetic says whose key it is: a key you generated yourself verifies as cleanly as a bank's.

Trust is a separate step. It comes from a certificate chain to a root your software trusts or, for a seal with no certificate, from a fingerprint you obtained by another route. Time is a third step. [pyHanko's documentation](https://docs.pyhanko.eu/en/latest/cli-guide/validation.html) separates self-reported times, which rest on the signer's word, from trusted timestamp tokens, and adds that a token only proves the signature existed when the token was created. [RFC 3161](https://www.rfc-editor.org/rfc/rfc3161.html) defines the token as supporting proof that a datum existed before a particular time.

![A document of grey bars passes along an arrow through five stations: a balance scale, a key and padlock, a stack of certificate cards on an orange shelf, a clock and a chain of linked cards.](https://computese.com/images/blog/verify-pdf-signature/five-checks-in-order.3309d4da61-1536.webp)

*A signature is judged in five separate steps, and the trust anchor is the one people skip.*

No check proves four things:

- **Who the person was.** A certificate names a key holder. Software shows the name, not the identity proofing behind it.
- **Legal effect.** [Regulation (EU) 910/2014](https://publications.europa.eu/resource/cellar/6a1e14d9-907e-11ef-a130-01aa75ed71a1.0007.02/DOC_2) (eIDAS), in its consolidated text of 18 October 2024, says in Article 25 that an electronic signature cannot be denied legal effect solely because it is electronic, and that only a qualified one equals a handwritten signature.
- **That a key was never stolen.** A stolen private key makes valid signatures, as the [sealed-pdf-verify threat model](https://sealed-pdf-verify.readthedocs.io/en/latest/threat-model/) says of its own seals.
- **That the content is true.** A signature fixes what was said, not whether it was right.

Whether a document is binding is a question for a lawyer; a verifier cannot answer it.

## Embedded signature, detached seal or electronic seal: what is the difference?

### A signature embedded in the PDF

The PDF standard, in the authorized copy of [ISO 32000-1 that Adobe hosts as PDF 32000-1:2008](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf), defines the byte range digest. The signature dictionary carries a `ByteRange`, an array of offset and length pairs, and a `Contents` string holding the signature value. The digest covers the whole file except the `Contents` value, and a validator recomputes it and compares. The value is a PKCS#7 object in the Cryptographic Message Syntax (CMS). The 2008 standard cites RFC 3852 for it, which [RFC 5652](https://www.rfc-editor.org/rfc/rfc5652.html) has since replaced. In a detached signature the signed content is absent from the CMS structure; it is the file's own bytes.

A one-page test PDF we signed with a throwaway certificate has the `ByteRange` `[0 1306 4214 1113]`:

```text
bytes 0 to 1306       signed
bytes 1306 to 4214    reserved for the signature value, zero padded
bytes 4214 to 5327    signed (the end of the file)
```

The standard also allows incremental updates, which append changes to the end of the file and [leave the original contents intact](https://computese.com/tools/pdf-metadata-remover/). That is how a PDF collects several signatures, as pyHanko's guide notes, and why the gap between the last signed byte and the end of the file matters.

![A long document strip in three segments with a padlock in the short middle one. Brackets cover the left and right segments, and an orange block attached beyond the right end sits outside both brackets.](https://computese.com/images/blog/verify-pdf-signature/bytes-after-signing.25aa019250-1536.webp)

*Bytes appended after signing sit outside the signed ranges, so a valid signature can sit next to an edited file.*

Incremental updates are also why text that a later save removed can still be in the file: the [PDF redaction checker](https://computese.com/tools/pdf-redaction-checker/) lists it, and [Redact PDF](https://computese.com/tools/redact-pdf/) makes a copy without the earlier versions.

In Europe, PDF signatures are profiled by [ETSI EN 319 142-1](https://www.etsi.org/deliver/etsi_en/319100_319199/31914201/01.03.01_60/en_31914201v010301p.pdf), the PAdES standard (PDF Advanced Electronic Signatures), in version 1.3.1 of November 2026. It defines four baseline levels: B-B adds signed attributes, B-T a trusted timestamp token, B-LT the validation material, stored in the document, and B-LTA further timestamps that protect that material.

This long-term validation matters because, as [Adobe's signature guide](https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSigDC/planning.html) explains, certificates expire or are revoked, and without embedded validation information a signature can be validated for only a limited time. ETSI also advises the sub-filter `ETSI.CAdES.detached` for new signatures, because ISO 32000-2 deprecates the older `adbe.pkcs7.sha1`.

### A detached seal: the PDF untouched, a proof beside it

A detached seal does not change the PDF. The signature, timestamp and log entry live in a separate proof file, so the check runs against the exact bytes you hold. The cost shows in a reader: nothing appears. pdfsig reported no signatures in the sealed test file used later in this guide, and the [sealed-pdf-verify FAQ](https://sealed-pdf-verify.readthedocs.io/en/latest/faq/) says a PDF reader shows no signature panel for such a seal.

![Top row: one document with a strip holding a padlock across its middle. Bottom row: a plain document beside a separate small seal card joined by a dashed line, the seal card drawn in orange.](https://computese.com/images/blog/verify-pdf-signature/signature-shapes.21b104c61c-1536.webp)

*An embedded signature lives inside the file, while a detached seal keeps the PDF untouched and keeps its proof beside it.*

### An electronic seal under eIDAS

In the consolidated regulation, a signatory is a natural person who creates an electronic signature (Article 3, points 9 and 10). A creator of a seal is a legal person who creates an electronic seal, which is data attached to or associated with other data to ensure its origin and integrity (points 24 and 25).

|                | Electronic signature                               | Electronic seal                                                       |
| -------------- | -------------------------------------------------- | --------------------------------------------------------------------- |
| Created by     | A natural person                                   | A legal person                                                        |
| Advanced form  | Capable of identifying the signatory (Article 26)  | Capable of identifying the creator of the seal (Article 36)           |
| Qualified form | Equivalent to a handwritten signature (Article 25) | A presumption of the data's integrity and correct origin (Article 35) |

A seal says an organization stands behind a document's origin, not that a person agreed to it. The proof-file seals later in this guide use the word more loosely than the regulation does.

## How do you verify a signature in Adobe Acrobat Reader?

Adobe's [current help page](https://helpx.adobe.com/acrobat/desktop/e-sign-documents/manage-digital-signatures/validate-digital-sign.html) gives these steps:

1. Open the PDF and select Signatures in the right panel.
2. Choose Options in the Signatures panel, then Validate Signatures.
3. Read the Signature Validation Status dialog.
4. To see whom the certificate names, choose Signature Properties, then Show Signer's Certificate.
5. To see what changed after signing, choose Options, then [Compare Signed Version to Current Version](https://helpx.adobe.com/acrobat/desktop/e-sign-documents/manage-digital-signatures/compare-versions.html).

The same page lists timestamp messages: "Signature is time-stamped" means the signer used a timestamp server you trust, and a time from the signer's computer clock is only a claim.

An [archived copy of Adobe's older help page](https://web.archive.org/web/20250106005818/https://helpx.adobe.com/acrobat/using/validating-digital-signatures.html), from January 2025, explains that a signature made with a self-signed certificate cannot be validated automatically, because the certificate is not in Adobe's list of trusted identities. Opening such a PDF shows "At least one signature has problems". It is a trust warning, not a tamper alert.

| What you see                                          | The usual cause                                                  | What to do                                                                          |
| ----------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| "At least one signature has problems", status unknown | The signer's certificate does not chain to a root Acrobat trusts | Show the certificate and confirm its fingerprint with the signer by another channel |
| An invalid signature                                  | The signed bytes changed, or the signature does not verify       | Ask the signer for the original, not a re-saved copy                                |
| A timestamp that could not be verified                | The authority's certificate is not among your trusted identities | Check the authority, then decide                                                    |

Adobe says to validate an unknown signature by hand and to contact the signer if it is invalid. Its guide explains why well-known issuers validate without effort: Acrobat and Reader download the Adobe Approved Trust List (AATL) of roots every 30 days by default, and support the European Union Trusted Lists (EUTL) the same way. Adobe does not recommend adding a self-signed or random certificate to your trusted identities.

![A certificate card with a key sends a dashed arrow toward an intermediate card and a shelf of root certificates, but the arrow breaks in the middle and an orange bracket spans the gap.](https://computese.com/images/blog/verify-pdf-signature/trust-gap.c922b76ae2-1536.webp)

*The signature math can pass while no trusted root vouches for the certificate, which is the case behind most unknown-validity warnings.*

## How do you verify a PDF signature from the command line or in code?

Any verifier reads the signature dictionary, verifies the CMS structure over the byte range, and judges trust, time and later changes. Tools differ mostly in the last job.

| Tool                                                                                              | Language and licence                                                                       | Version, December 2026                                                                         | What it checks                                                                                                                                                                                                  | Where it stops                                                                                                             |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [Poppler pdfsig](https://gitlab.freedesktop.org/poppler/poppler/-/raw/master/utils/pdfsig.1)      | Command line, [GPL](https://gitlab.freedesktop.org/poppler/poppler/-/raw/master/README.md) | [26.12.0](https://poppler.freedesktop.org/), 3 December 2026                                   | Signature, ranges, certificate, OCSP                                                                                                                                                                            | Trust depends on its certificate database                                                                                  |
| [pyHanko](https://github.com/MatthiasValvekens/pyHanko)                                           | Python 3.11 or later, MIT; CLI in the pyhanko-cli package                                  | [0.38.2](https://github.com/MatthiasValvekens/pyHanko/releases), 19 November 2026, pre-release | Integrity, your trust roots, timestamps, EU trusted lists                                                                                                                                                       | Change analysis is (very) experimental, per its docs                                                                       |
| [EU DSS](https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/doc/dss-documentation.html) | Java 8 or later, LGPL 2.1                                                                  | 6.5.1                                                                                          | PAdES and other AdES forms, trust, revocation                                                                                                                                                                   | A framework; its demos are for testing only                                                                                |
| [Apache PDFBox](https://pdfbox.apache.org/)                                                       | Java, Apache 2.0                                                                           | 3.0 and 2.0 lines                                                                              | Exposes the signature and signed bytes; its ShowSignature example does a partial check, certificates up to the root                                                                                             | No built-in validator: no change analysis and no AATL or EUTL check, per its [FAQ](https://pdfbox.apache.org/3.0/faq.html) |
| [iText](https://github.com/itext/itext-java/blob/develop/README.md)                               | Java, AGPL or commercial                                                                   | [9.8.1](https://github.com/itext/itext-java/releases/tag/9.8.1), 16 November 2026              | [Integrity and authenticity](https://api.itextpdf.com/iText/java/9.8.1/com/itextpdf/signatures/PdfPKCS7.html), [coverage](https://api.itextpdf.com/iText/java/9.8.1/com/itextpdf/signatures/SignatureUtil.html) | The AGPL is copyleft; closed software needs a commercial licence                                                           |
| [OpenSSL](https://github.com/openssl/openssl)                                                     | Apache 2.0                                                                                 | [4.1.1](https://github.com/openssl/openssl/releases/tag/openssl-4.1.1), 1 December 2026        | CMS signatures, timestamp tokens, chains                                                                                                                                                                        | Has no PDF parser; you cut the bytes out                                                                                   |

Two JavaScript libraries are worth ruling out. [pdf-lib](https://github.com/Hopding/pdf-lib) lists creating and modifying PDFs, with no signature verification among its features. [@signpdf](https://github.com/vbuch/node-signpdf/blob/develop/README.md) is a family of packages for signing PDFs in Node.js, paired with pdf-lib to add the placeholder. Neither verifies.

### pdfsig: the quickest second opinion

Poppler's pdfsig verifies the signatures in a PDF and shows whether the whole document is signed. On our test file, trimmed:

```text
$ pdfsig signed.pdf
Signature #1:
  - Signer Certificate Common Name: Example Signer (test only)
  - Signing Hash Algorithm: SHA-256
  - Signature Type: ETSI.CAdES.detached
  - Signed Ranges: [0 - 1306], [4214 - 5327]
  - Total document signed
  - Signature Validation: Signature is Valid.
  - Certificate Validation: Certificate issuer is unknown.
```

The last two lines tell the story of this guide: the math passed and trust failed, because the certificate is self-signed. By default pdfsig also asks OCSP servers about revocation, so it is not fully offline; `-no-ocsp` stops that.

### pyHanko: scripting with trust you control

Install the library and the command line together:

```bash
pip install pyHanko pyhanko-cli
pyhanko sign validate --pretty-print --trust cert.pem signed.pdf
```

In pyhanko-cli, `--trust` adds to the operating system's trust store; add `--trust-replace` to trust only the roots you list, which a future release will make the only behaviour. With the signer's certificate named as a trust root, pyHanko reported the signature cryptographically sound, the certificate trusted, the whole file covered and the bottom line VALID. Without `--trust`, the same file stayed sound but untrusted, with no path to a trust anchor, and the bottom line became INVALID. One flag moves the verdict, which is why you must decide your trust anchors. Its docs add that it does not validate the structural requirements of a PAdES profile. Its `adesverify` command follows the AdES validation model more closely and reports whether the certificates are qualified.

### OpenSSL: any step by hand

OpenSSL cannot read a PDF, but it verifies the CMS structure once you cut it out. A short script extracts the signed bytes and signature:

```python
import re, sys
pdf = open(sys.argv[1], "rb").read()
a, b, c, d = map(int, re.search(rb"/ByteRange\s*\[\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s*\]", pdf).groups())
open("signed-bytes.bin", "wb").write(pdf[a:a + b] + pdf[c:c + d])
open("sig.cms.der", "wb").write(bytes.fromhex(pdf[a + b + 1:c - 1].decode()))  # hex between < and >
```

Then [`openssl cms -verify`](https://docs.openssl.org/master/man1/openssl-cms/) checks the signature against the detached content, with `-binary` so the bytes stay untouched:

```bash
openssl cms -verify -inform DER -in sig.cms.der -content signed-bytes.bin -binary -CAfile cert.pem -out /dev/null
```

It printed "CMS Verification successful". Without `-CAfile` it failed on the self-signed certificate, as the other tools did.

> [!WARNING]
> OpenSSL checks only the bytes you give it. A file with extra bytes appended after the signed range passed this command, because the signed bytes were intact. A verifier must also check that the last range ends where the file ends, here at byte 5327.

## What do the tools say when the file has changed?

We made two edits to the signed test file: one byte changed inside the signed range, and a line appended after it, as an incremental update would do.

| File                            | pdfsig                             | pyHanko                                            | OpenSSL cms                                         |
| ------------------------------- | ---------------------------------- | -------------------------------------------------- | --------------------------------------------------- |
| Signed, self-signed certificate | Valid; certificate issuer unknown  | Sound; untrusted without `--trust`                 | Fails on the self-signed certificate unless trusted |
| One byte changed in the range   | Digest Mismatch                    | Cryptographically unsound; INVALID                 | CMS Verification failure (content verify error)     |
| A line appended after the range | Valid; "Not total document signed" | Sound; not the entire file; changes fit the policy | Successful                                          |

The last row is the one to remember. A signature can be valid while the file is not the one that was signed, because bytes were added later. pdfsig and pyHanko both say the signature does not cover the whole file, and Adobe's Compare Signed Version exists for the same reason. An appended page you expect, such as a second signer's, is normal. One you do not expect is not. Tools disagree at the edges, so run two on anything that matters.

## How do you verify a sealed PDF with sealed-pdf-verify?

[Minute Notary](https://minutenotary.ca/), an online notary platform we build and run, seals the PDFs it delivers. Each seal is recorded in a proof: a detached ECDSA P-256 signature over the PDF's SHA-256, the signing public key, an RFC 3161 timestamp token and the document's entry in an append-only ledger. We wrote [sealed-pdf-verify](https://github.com/minutenotary/sealed-pdf-verify) so that anyone can check that proof on their own machine with no network access, and we publish it under the MIT licence. It verifies this proof format only; for signatures embedded in a PDF, use the tools above.

A sealed PDF normally carries a QR code and a seal code that open the issuer's online check, which compares your copy without uploading it. The offline check needs the proof file, a small JSON file. Ask the issuer for the evidence archive, which holds it.

It has three forms:

- **A command line**, run with `npx sealed-pdf-verify` on Node 20 or later. `npx` downloads the package on first use; the check itself makes no network request.
- **A library** on [npm](https://www.npmjs.com/package/sealed-pdf-verify), where 0.1.1 is the latest as of December 2026. It has types and runs in Node and in browsers.
- **A browser page**, [hosted on GitHub Pages](https://minutenotary.github.io/sealed-pdf-verify/). You drop in the PDF and the proof, and nothing is uploaded.

### Quick start

With the PDF and its proof side by side, one command prints a verdict. To try it without a sealed document of your own, clone the repository and run it on `test/fixtures/sample.pdf` with `test/fixtures/sample.proof.json`. Those fixtures, renamed, give this output, trimmed:

```text
$ npx sealed-pdf-verify document.pdf --proof document.proof.json
Verdict: GENUINE

  hash       match         SHA-256 of the PDF equals the digest recorded in the proof
  signature  valid         ECDSA P-256 over the digest verifies with the proof's public key (der encoding)
  key        unpinned      no trust list supplied: the signature math was checked, the key itself was not (compare the fingerprint out of band)
  timestamp  trusted       the token covers this digest at 2026-11-04T12:42:14.000Z and its signer chains to a trusted root
  ledger     consistent    ledger entry #1 recomputes from the proof and matches

  Seal id        SPV-TEST-000001
  Key            4ff06705…63572997  (id test-key, version 1)
```

The exit status is 0 for genuine, 1 for altered and 2 for incomplete or an error. The fixture's timestamp is a real token from a public timestamp authority, so the chain check has something to verify.

### The five checks and the verdict

| Check     | Results                               | What it means                                        |
| --------- | ------------------------------------- | ---------------------------------------------------- |
| hash      | match, mismatch, not_checked          | SHA-256 of the PDF equals the digest in the proof    |
| signature | valid, invalid                        | ECDSA verifies over that digest with the proof's key |
| key       | pinned, unpinned, rejected            | Whether the key is on your trust list                |
| timestamp | trusted, imprint_only, none, invalid  | The token covers the digest and chains to a root     |
| ledger    | consistent, inconsistent, not_checked | The entry hash recomputes from the proof             |

The verdict is `genuine` when the hash is not a mismatch, the signature is valid, the key is not rejected, the timestamp is not invalid and the ledger is not inconsistent. Anything else is `altered`, and an unreadable proof is `incomplete`. Change one byte of the PDF and the picture changes:

```text
$ npx sealed-pdf-verify tampered.pdf --proof document.proof.json
Verdict: ALTERED

  hash       mismatch      SHA-256 of the PDF differs from the digest recorded in the proof: the bytes changed since sealing
  signature  invalid       signature does not verify with this key
  key        unpinned      no trust list supplied: the signature math was checked, the key itself was not (compare the fingerprint out of band)
  timestamp  invalid       token imprint does not match the document digest
  ledger     consistent    ledger entry #1 recomputes from the proof and matches
```

The ledger line still says consistent because that check recomputes from the proof's own fields and never reads the PDF. It is the hash chain from our [audit trail guide](https://computese.com/audit-trail/), cut down to one entry: a hash of the sequence number, the document digest, the previous entry's hash and the sealing time. Only the issuer's online check compares the entry with the chain the issuer holds.

The code's history shows what a verifier must survive. An early review found that a genuine signature could be reported as altered. A signature may arrive as DER or as 64 raw bytes, and about one raw signature in 256 begins with the byte that marks DER, so the parser misread it. Now the length decides, never the first byte. The changelog also records two independent review rounds before the first release and PEM parsing rewritten to run in linear time. A verifier reads files from strangers, so it must be strict.

### Pin the key

A valid signature proves only that some key signed the digest. The proof carries its own public key, so the proof cannot also be the reason you trust that key. That is `unpinned`: the math passed and the key was not checked. The README says to compare the fingerprint with one published out of band. A fingerprint fetched over a channel an attacker controls proves nothing, because an attacker in the middle can swap it; our [man-in-the-middle guide](https://computese.com/understanding-man-in-the-middle-mitm-attacks/) covers how that interception works.

The issuer publishes its official fingerprint on its [verification page](https://minutenotary.ca/verify), under Official seal key, and the repository's `trust/issuers.json` copies it (3796…634b, read on 17 November 2026). Compare the two before relying on either. The fingerprint is the SHA-256 of the key's SubjectPublicKeyInfo; compute it yourself:

```bash
openssl ec -pubin -in key.pem -outform DER | openssl dgst -sha256
```

Then pass a trust list, a JSON file shaped `{ "fingerprints": ["<64 hex characters>"] }`, with `--trust`. With the fixture's own key listed, the key line reads `pinned`. With a different key listed, it reads `rejected` and the verdict becomes `altered`, even though the signature math passed. The command line refuses an empty trust file, which can only be an unfilled template.

![A laptop receives a document and a proof card from the left and an orange trust-list card with a fingerprint from below, while a dashed arrow from it ends at a cloud crossed by a plain bar.](https://computese.com/images/blog/verify-pdf-signature/offline-verifier.48bcc908d2-1536.webp)

*The verifier runs on your machine with the PDF, the proof and your own trust list, and makes no network request.*

### Timestamp roots and evidence archives

The package ships two public timestamp roots, DigiCert Trusted Root G4 and the FreeTSA root, and the issuer's primary timestamp authority is DigiCert's. Add roots with `--tsa-roots`, or skip the chain check with `--no-tsa-trust`, and the best result is `imprint_only`. The [specification](https://sealed-pdf-verify.readthedocs.io/en/latest/specification/) requires the signer certificate to be valid at the timestamp's time, with an extended key usage that is critical and limited to time stamping. No revocation data is consulted, because the tool makes no network request.

On request the issuer also provides an evidence archive: a ZIP with the sealed PDFs, their seals, the key, the timestamp tokens and a segment of the ledger. `npx sealed-pdf-verify evidence.zip` verifies every PDF in it and walks the segment, checking that each entry links to the one before. On the fixture archive it reported two genuine documents.

### The library

In code, one function returns the verdict:

```ts
import { readFile } from "node:fs/promises";
import { verifySealedPdf } from "sealed-pdf-verify";

const verdict = await verifySealedPdf({
  pdf: new Uint8Array(await readFile("document.pdf")),
  proof: await readFile("document.proof.json", "utf8"),
  options: { trustedKeyFingerprints: ["<64 hex characters>"] },
});
console.log(verdict.overall, verdict.checks);
// genuine { hash: 'match', signature: 'valid', key: 'pinned', timestamp: 'trusted', ledger: 'consistent' }
```

It never throws on a bad document; an unreadable proof gives `incomplete`. A malformed fingerprint is a caller mistake and throws a `TypeError`, never a false "altered".

> [!WARNING]
> As of December 2026, a fresh npm install of 0.1.1 resolves two copies of an ASN.1 package the library uses. The ES module entry (`import`) then reports `altered` for a genuine file, with `signature: invalid`, `timestamp: invalid` and, with a pinned key, `key: rejected`. The CommonJS entry (`require`), the command line and the hosted page bundle their dependencies and are not affected. Until a release fixes it, load the library with `require`, or add this to `package.json` and reinstall: `"overrides": { "@peculiar/asn1-schema": "3.0.0", "@peculiar/asn1-x509": "3.0.0", "@peculiar/asn1-x509-attr": "3.0.0" }`. The failure is closed: a genuine file reads as altered, and we saw no false genuine.

Because the package is published from CI, you can check where it came from: npm shows a provenance attestation for 0.1.1, and `npm audit signatures` verified it. Our [SBOM guide](https://computese.com/sbom/) covers signing and checking attestations in your own pipeline.

### What a genuine verdict proves, and when to use something else

The README's threat model says a genuine verdict proves three things. The PDF bytes are the sealed bytes. The seal was made by the holder of the key in the proof, the issuer's when pinned. And the digest existed by the timestamp's time and sits in the ledger. It does not prove who signed the underlying document, its legal effect, that the issuer's key was never stolen, or that the ledger matches everyone else's copy. The seal is the issuer's statement about bytes and time, not about the people in the document.

It is the wrong tool for most signed PDFs. It verifies the proof format in its specification, schema version 1, not signatures embedded in PDFs; for those, use Acrobat, pyHanko or DSS. Its documentation does not describe the seal as qualified under eIDAS, so do not read a verdict as a legal opinion. And a detached proof can go missing; without it, the issuer's online check is the route.

The specification lets a third party build a verifier from it, which answers "who checks the checker" better than trust in us: write a second one, or reproduce the checks by hand.

## Can you check a seal by hand with OpenSSL and sha256sum?

Yes, with common command-line tools. We ran every step on the fixtures with OpenSSL 3.6.2, and again with LibreSSL 3.3.6, `sha256sum` and `jq`, which ship with current macOS.

1. **Hash.** `sha256sum document.pdf` must equal `documentHash` in the proof.
2. **Signature.** The seal is ECDSA P-256 over the SHA-256 digest, which is ECDSA with SHA-256 over the file, so the ordinary command works on the PDF itself:

```bash
jq -r .signature document.proof.json | base64 -d > sig.der
jq -r .publicKeyPem document.proof.json > key.pem
openssl dgst -sha256 -verify key.pem -signature sig.der document.pdf
```

It printed "Verified OK"; a tampered file failed. The [dgst manual](https://docs.openssl.org/master/man1/openssl-dgst/) documents `-verify` and `-signature`.

3. **Key.** Compute the fingerprint with the command above and compare it with the published one yourself. OpenSSL will not.
4. **Timestamp.** The proof stores a token, not a full response, so pass `-token_in`:

```bash
jq -r .tsaToken document.proof.json | base64 -d > token.der
openssl ts -verify -in token.der -token_in -data document.pdf -CAfile freetsa-root.pem
```

It printed "Verification: OK" against the FreeTSA root from the package, and a changed PDF gave "message imprint mismatch". The [ts manual](https://docs.openssl.org/master/man1/openssl-ts/) lists `-token_in`, `-data` and `-digest`. 5. **Ledger.** Join the sequence number, the document digest, the previous entry's hash and the sealing time with line feeds, with no trailing newline, and hash the result:

```bash
printf '%s\n%s\n%s\n%s' "$seq" "$documentHash" "$previousEntryHash" "$sealedAt" | sha256sum
```

The output must equal `entryHash`. Use `printf`, not `echo`, because a trailing newline changes the hash.

![A document and a proof card send arrows to a balance scale, a padlock and key, a clock and two linked cards, each followed by a check mark, and an orange bracket joins the four check marks.](https://computese.com/images/blog/verify-pdf-signature/hand-checks.00e711dacd-1536.webp)

*Ordinary commands reproduce each check, which is what makes the specification checkable.*

These tools give you no verdict logic: pinning as a decision, the rule that a rejected key makes a file altered, the strict parsing. `openssl ts -verify` also validates certificates at the current time unless told otherwise; the [verification options](https://docs.openssl.org/master/man1/openssl-verification-options/) include `-attime`. Use the by-hand route to confirm the tool. It does not replace it.

## Should you trust the PDF you received? A checklist

1. **Keep the exact file you received.** A re-save, print to PDF, mail conversion or annotation changes the bytes. Ask for the original.
2. **Find the shape.** A signature panel means an embedded signature. A proof file beside the PDF may mean a detached seal.
3. **Check integrity.** Let a tool recompute the hash. A mismatch ends the check.
4. **Check coverage.** Is the whole file inside the signed ranges? If not, see what was added.
5. **Decide whose key it is.** A certificate should chain to a root you recognize, such as one on the AATL or an EU trusted list. A seal's key should match a fingerprint from outside the document.
6. **Read the time.** A timestamp from an independent authority is evidence. The signer's clock is a claim.
7. **Ask what is left.** Who the person was, whether they had authority and whether the document binds anyone are outside the check. Ask the issuer, and a lawyer if rights depend on it.
8. **If a step fails, tell the sender.** Do not trust a certificate just to turn a warning green.

## Where can we help?

If you are building a system that signs, seals, timestamps or verifies documents, our [custom software development](https://computese.com/services/custom-software-development/) team builds business platforms with APIs, an audit trail and a written failure mode for every outside dependency. That includes fail-closed document sealing, as in our [Minute Notary case study](https://computese.com/work/minute-notary/). If you already run one, [security testing](https://computese.com/services/security-testing/) has an engineer attack agreed targets under written rules. Our [post-quantum guide](https://computese.com/quantum-computing-in-cybersecurity-breakthrough/) covers the day ECDSA and RSA signatures can be forged.

## Key terms
- **Digital signature verification**: Recomputing the hash of the signed data, checking the signature with the signer's public key, deciding whether that key is trusted and reading the signing time. Each step proves one thing and no more.
- **ByteRange**: A PDF array of offset and length pairs naming the bytes a signature covers. The gap between the pairs holds the signature value itself, so a validator can recompute the hash without it.
- **CMS (PKCS #7)**: Cryptographic Message Syntax, defined in RFC 5652: the container that holds a signature, the signer's certificates and signed attributes. A PDF signature stores a DER-encoded one in its Contents entry.
- **PAdES**: PDF Advanced Electronic Signatures, ETSI EN 319 142-1. It profiles PDF signatures at four baseline levels: B-B, B-T with a timestamp, B-LT with validation material and B-LTA with archival timestamps.
- **Incremental update**: A way of changing a PDF by appending to the end of the file and leaving the original bytes intact. Several signatures use it, and bytes appended after a signature fall outside what it signed.
- **Detached seal**: A signature, timestamp and log entry kept in a proof file next to an unchanged PDF. The check runs against the exact bytes you hold, and a PDF reader shows no signature panel.
- **Electronic seal**: Under eIDAS, data attached to or associated with other data to ensure its origin and integrity, created by a legal person. An electronic signature, by contrast, is created by a natural person.
- **Timestamp token (RFC 3161)**: A token signed by a timestamp authority that binds a hash to a time, giving evidence that the data existed by then. It does not show when the person decided to sign.
- **AATL and EUTL**: The Adobe Approved Trust List of trusted root certificates and the European Union Trusted Lists of trust service providers. Acrobat downloads both, so signatures from listed issuers validate without manual trust.

## Common questions

### How do I verify a digital signature in a PDF?

Open the PDF in Adobe Acrobat Reader, choose Signatures, then Options and Validate Signatures, and read the status and the signer's certificate. From a terminal, pdfsig or pyHanko do the same. Either way, check that the hash matches, the signature is valid, the certificate chains to a root you trust and the signature covers the whole file.

### What does "At least one signature has problems" mean?

Adobe's help says a signature made with a self-signed certificate cannot be validated automatically, because the certificate is not in Acrobat's trusted identities, and the warning appears. It is a trust warning, not proof of tampering. An invalid status is different: the signed bytes changed, so ask the signer for the original.

### Can I verify a PDF signature without Adobe Acrobat?

Yes. Poppler's pdfsig is a command-line check, pyHanko is a Python library and CLI under the MIT licence, and EU DSS is a Java framework for EU standards. OpenSSL can verify the signature structure once you extract the signed bytes. Apache PDFBox ships only a partial example, and pdf-lib and @signpdf do not verify signatures.

### What is the difference between an electronic seal and an electronic signature?

Under eIDAS, a signature is created by a natural person and a seal by a legal person. A seal ensures the origin and integrity of data, and a qualified seal carries a presumption of both. It does not show that a person agreed to the document, which a signature can.

### Does a valid signature mean the document is legally binding?

No. A valid signature shows the bytes are unchanged and a key made it. Whether the document binds anyone depends on the law, the document and who the signer was. Under eIDAS only a qualified electronic signature equals a handwritten one, and verification software does not decide that for you.

### How do I verify a PDF sealed by Minute Notary?

With only the PDF, scan its QR code or enter its seal code on the issuer's online check, which compares your copy without uploading it. For an offline check, ask the issuer for the evidence archive and run npx sealed-pdf-verify on it, with the published key fingerprint in a trust list. The tool exits 0 for genuine.

## Sources
1. [FIPS 186-5, Digital Signature Standard (DSS)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), NIST
2. [Validating PDF signatures](https://docs.pyhanko.eu/en/latest/cli-guide/validation.html), pyHanko documentation
3. [RFC 3161: Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)](https://www.rfc-editor.org/rfc/rfc3161.html), IETF
4. [Regulation (EU) No 910/2014 (eIDAS), consolidated text of 18 October 2024](https://publications.europa.eu/resource/cellar/6a1e14d9-907e-11ef-a130-01aa75ed71a1.0007.02/DOC_2), Publications Office of the European Union
5. [sealed-pdf-verify: Threat model](https://sealed-pdf-verify.readthedocs.io/en/latest/threat-model/), sealed-pdf-verify documentation
6. [PDF 32000-1:2008, Portable document format, Part 1: PDF 1.7 (copy of ISO 32000-1)](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf), Adobe
7. [RFC 5652: Cryptographic Message Syntax (CMS)](https://www.rfc-editor.org/rfc/rfc5652.html), IETF
8. [ETSI EN 319 142-1 V1.3.1: PAdES digital signatures, Part 1](https://www.etsi.org/deliver/etsi_en/319100_319199/31914201/01.03.01_60/en_31914201v010301p.pdf), ETSI
9. [Acrobat Desktop Digital Signature Guide: pre-deployment configuration](https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSigDC/planning.html), Adobe
10. [sealed-pdf-verify: FAQ](https://sealed-pdf-verify.readthedocs.io/en/latest/faq/), sealed-pdf-verify documentation
11. [Validate digital signatures in Adobe Acrobat](https://helpx.adobe.com/acrobat/desktop/e-sign-documents/manage-digital-signatures/validate-digital-sign.html), Adobe
12. [Compare signed document versions](https://helpx.adobe.com/acrobat/desktop/e-sign-documents/manage-digital-signatures/compare-versions.html), Adobe
13. [Validating digital signatures, Adobe Acrobat (archived copy, January 2025)](https://web.archive.org/web/20250106005818/https://helpx.adobe.com/acrobat/using/validating-digital-signatures.html), Adobe, via the Internet Archive
14. [pdfsig manual page](https://gitlab.freedesktop.org/poppler/poppler/-/raw/master/utils/pdfsig.1), Poppler
15. [Poppler README (GPL licensing)](https://gitlab.freedesktop.org/poppler/poppler/-/raw/master/README.md), Poppler
16. [Poppler: latest stable release](https://poppler.freedesktop.org/), Poppler
17. [pyHanko README](https://github.com/MatthiasValvekens/pyHanko), pyHanko project, GitHub
18. [pyHanko releases](https://github.com/MatthiasValvekens/pyHanko/releases), pyHanko project, GitHub
19. [Digital Signature Service (DSS) documentation, version 6.5.1](https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/doc/dss-documentation.html), European Commission
20. [Apache PDFBox](https://pdfbox.apache.org/), Apache Software Foundation
21. [Apache PDFBox 3.0 FAQ](https://pdfbox.apache.org/3.0/faq.html), Apache Software Foundation
22. [iText for Java README (licensing)](https://github.com/itext/itext-java/blob/develop/README.md), iText, GitHub
23. [iText Core/Community 9.8.1](https://github.com/itext/itext-java/releases/tag/9.8.1), iText, GitHub
24. [PdfPKCS7 (iText 9.8.1 API)](https://api.itextpdf.com/iText/java/9.8.1/com/itextpdf/signatures/PdfPKCS7.html), iText
25. [SignatureUtil (iText 9.8.1 API)](https://api.itextpdf.com/iText/java/9.8.1/com/itextpdf/signatures/SignatureUtil.html), iText
26. [OpenSSL README (Apache License 2.0)](https://github.com/openssl/openssl), OpenSSL, GitHub
27. [OpenSSL 4.1.1 release](https://github.com/openssl/openssl/releases/tag/openssl-4.1.1), OpenSSL, GitHub
28. [pdf-lib README](https://github.com/Hopding/pdf-lib), pdf-lib, GitHub
29. [@signpdf README](https://github.com/vbuch/node-signpdf/blob/develop/README.md), node-signpdf, GitHub
30. [openssl-cms](https://docs.openssl.org/master/man1/openssl-cms/), OpenSSL documentation
31. [sealed-pdf-verify repository and README](https://github.com/minutenotary/sealed-pdf-verify), Minute Notary, GitHub
32. [sealed-pdf-verify on npm](https://www.npmjs.com/package/sealed-pdf-verify), npm
33. [Sealed PDF Verifier (hosted browser page)](https://minutenotary.github.io/sealed-pdf-verify/), sealed-pdf-verify project
34. [Verify a document](https://minutenotary.ca/verify), Minute Notary
35. [sealed-pdf-verify: Specification](https://sealed-pdf-verify.readthedocs.io/en/latest/specification/), sealed-pdf-verify documentation
36. [openssl-dgst](https://docs.openssl.org/master/man1/openssl-dgst/), OpenSSL documentation
37. [openssl-ts](https://docs.openssl.org/master/man1/openssl-ts/), OpenSSL documentation
38. [openssl-verification-options](https://docs.openssl.org/master/man1/openssl-verification-options/), OpenSSL documentation
