---
title: "Test vectors"
description: "Standard test PDFs and expected verification results that every PDF-PQS implementation must pass."
---

> Documentation Index
> Fetch the complete documentation index at: https://pdf-pqs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Test vectors

Test vectors make sure that every PDF-PQS signer and verifier agrees on the exact same behavior, down to edge cases like tampered bytes, stripped signatures, expired certificates, and linearized PDFs.

Each vector consists of a synthetic PDF file, the exact inputs to hand your verifier, and the expected result and codes. Everything lives in the `pdf-pqs/spec` repository alongside a dedicated test CA (whose private keys are intentionally public for testing only).

## How to run the test vectors

To test your own verifier against `vectors/manifest.json`:

1. **Load the local PKI files.** Read `trustAnchors`, `certificates`, and `crls` from each vector's `inputs` object. All file paths are relative to the root of `pdf-pqs/spec`.
2. **Mock domain discovery.** Use `inputs.policyDocuments` as the policy document for each listed domain. Treat any domain not listed there as publishing no policy document.
3. **Stay offline.** Resolve any HTTPS URLs from `inputs.resources` instead of making live network calls.
4. **Pin the clock.** Pass `inputs.validationTime` as the verification time instead of reading your system clock, so certificate expiration and CRL checks stay deterministic.
5. **Compare outputs.** Check that your verifier's `result`, per-signature `codes`, and `fileCodes` match `expected`. The order of codes inside a list does not matter.

Note that signatures in `expected.signatures` are ordered by ascending `L` (with Place A before Place B when `L` is equal). The TypeScript signer generates all vector PDFs, and the **File** column below displays the first 12 hex characters of each file's SHA-256 hash (hover to see the full hash).

## Vectors

The JSON Schema for the manifest is in `vectors/manifest.schema.json`, and `vectors/README.md` documents how each vector file is generated.

Source: https://pdf-pqs.org/tools/test-vectors/index.mdx
