Skip to content

Verification flow

A step-by-step walkthrough of how a PDF-PQS verifier checks a document and decides whether it is valid.

Every PDF-PQS verifier runs the same 12-step checklist so that different tools and libraries agree on whether a document is valid. Steps 1 through 10 check each PDF-PQS signature individually, and steps 11 and 12 check the document as a whole.

The diagram below maps each step to the exact result codes it can emit (pulled automatically from the specification appendix).

Verification flowSteps 1 to 10 run for each PDF-PQS signature and stop at the first failure. Steps 11 and 12 run for the whole file. Each step lists the result codes that it reports.For each PDF-PQS signature (stop at the first failure)For the whole file1Find the signaturesE_PARSE 2Parse the payloadE_PARSE E_ALG_NOT_ALLOWED E_PROFILE 3Check LE_LENGTH_OUT_OF_RANGE E_NOT_REVISION_END 4Compare the digestE_DIGEST_MISMATCH 5Verify the ML-DSA signatureE_SIGNATURE_INVALID 6Check signing-certificate-v2E_SIGNING_CERT_MISMATCH 7Validate the pathE_CERT_EXPIRED E_PATH_INVALID W_DOMAIN_ONLY 8Verify the timestampE_TIMESTAMP_INVALID W_NO_TIMESTAMP 9Check revocationE_REVOKED E_REVOCATION_UNKNOWN 10Place A: host boundaryE_HOST_BOUNDARY 11PQC required by the domainE_PQC_REQUIRED_MISSING E_POLICY_UNAVAILABLE 12Report changes after LW_CHANGES_AFTER_L Red: failure (result invalid). Amber: warning (the result does not change).

What the 12 steps are checking

If you are building or integrating a verifier, it helps to think of the 12 steps in four groups:

  1. Structure and integrity (Steps 1 to 6). Can the verifier parse the PDF and the CMS signature payload? Does it use an allowed algorithm (pure ML-DSA-65 or ML-DSA-87)? Does L land on a real revision end? Does the SHA-512 hash of bytes [0, L) match? Does the ML-DSA signature verify mathematically, and does signing-certificate-v2 match the signer’s certificate?
  2. Trust, time, and revocation (Steps 7 to 9). Does the signer’s certificate chain back to a trusted CA (or at least a domain-published issuer)? Is there a valid ML-DSA timestamp proving when it was signed? Have any certificates in the chain been revoked on a CRL?
  3. Placement sanity check (Step 10). For Place A signatures, does L line up with the start of the host signature’s revision?
  4. Whole-document protection (Steps 11 and 12). Did anyone strip a required post-quantum signature from a classical signature whose domain enforces pqcRequiredFrom? And were any unauthorized changes or extra revisions appended after L?

Important execution rules

  • Stop on the first failure per signature. As soon as a signature fails one of steps 1 to 10, the verifier stops checking that signature, reports that single failure code, and emits no warnings for it.
  • Timestamp time comes before path validation. Step 7 needs to know when to evaluate certificate expiration, which comes from step 8 if a valid ML-DSA timestamp is present (otherwise it uses the current verification time, or a fixed time for test vectors). Verifiers can run step 8 before step 7 as long as they report codes in step order.
  • Classical timestamps do not count. Because a quantum computer could forge an RSA or ECDSA timestamp, a classically signed timestamp is ignored and treated as missing (W_NO_TIMESTAMP).
  • Signature codes vs. file codes. E_PARSE in step 1, E_POLICY_UNAVAILABLE, and E_PQC_REQUIRED_MISSING apply to the entire file. All other codes belong to a specific signature.

What the four results mean for your app

Every verification run returns one overall status for the file, making it straightforward to map to badges or workflow decisions in your application:

Result What it means Suggested UI or business action
valid Every signature passed steps 1 to 11, no file-level checks failed, and every certificate chain ended at one of your configured trust anchors. Show as verified and trusted (along with any warnings, such as W_CHANGES_AFTER_L).
valid-domain-only Every signature passed steps 1 to 11, and at least one chain ended at an issuer listed in the signing domain’s policy document rather than a local trust anchor (W_DOMAIN_ONLY). Show as domain-verified, without displaying higher-level identity claims from certificate policies.
invalid At least one check failed for a signature or for the file as a whole. Reject or flag the document and surface the specific failure code.
no-signature The PDF has no PDF-PQS signature, and step 11 confirmed none was required by a domain policy. Treat as an unsigned (or classical-only) PDF according to your normal policy.

Warnings never change a valid result into invalid, but verifiers must always display them to callers and users. See Result codes for the full catalog, or read the normative procedure in Section 9.

Type to search…

↑↓ navigate↵ selectEsc close