A verifier executes the procedure below, reporting the corresponding result codes defined in Appendix B. Processing for an individual PDF-PQS signature MUST terminate at the first failing step; the verifier reports that single failure code for the signature and suppresses all warnings for it.
The verification time is the wall-clock time at which verification is performed. Verifiers MAY accept an explicit verification time as input (for example, when executing test vectors or auditing historical validations).
9.1. For Each PDF-PQS Signature
- Locate signatures: extract every
id-aa-pdfpqsSignatureunsigned attribute from host signatures and every Place B embedded file attachment. If the input cannot be parsed as a valid PDF file, reportE_PARSEas a file-level failure and halt. - Parse the payload: decode the
ContentInfostructure. If it is not a DER-encodedContentInfocontainingSignedData, reportE_PARSE. IfsignatureAlgorithmor the signer’s public key is neither ML-DSA-65 nor ML-DSA-87, reportE_ALG_NOT_ALLOWED. If any other profile constraint in Section 4 is violated, reportE_PROFILE. - Validate L: extract L from
pdf-byte-length. If L exceeds the total byte length of the file, reportE_LENGTH_OUT_OF_RANGE. If L does not identify a revision end, reportE_NOT_REVISION_END. - Verify the content digest: compute SHA-512 over bytes
[0, L)and compare the result with themessage-digestsigned attribute. If the digests do not match, reportE_DIGEST_MISMATCH. - Verify the signature value: validate the ML-DSA signature over the DER encoding of
signedAttrs[RFC9882]. If cryptographic verification fails, reportE_SIGNATURE_INVALID. - Verify certificate binding: validate the
signing-certificate-v2attribute against the signer’s certificate. If it does not match, reportE_SIGNING_CERT_MISMATCH. - Validate the certification path: construct and validate an X.509 certification path
per [RFC5280], including certificate policy processing. Missing intermediate
certificates may be retrieved via the
authorityInfoAccessextension, the PDF DSS, or the domain policy document. The validation time is the timestamp time from step 8 if a valid ML-DSA timestamp is present, or the verification time otherwise. If any certificate in the path is outside its validity interval at the validation time, reportE_CERT_EXPIRED. If the path terminates at an issuer from the signer’s domain policy document (Section 7) rather than at a configured trust anchor, reportW_DOMAIN_ONLY. If no valid certification path can be constructed, reportE_PATH_INVALID. When the signer’s domain policy document is Unavailable and no cached copy exists (Section 7.2), its issuers are not available as trust anchors; step 7 therefore reportsE_PATH_INVALIDunless a valid path ends at a configured trust anchor. - Verify the signature timestamp: if an
id-aa-signatureTimeStampTokenattribute is present, validate the token and its certification path. To be accepted, the token MUST be signed with ML-DSA-65 or ML-DSA-87 and MUST cover theSignerInfosignature value. A timestamp token signed with any other algorithm is ignored and treated as absent. If no qualifying ML-DSA timestamp token is present, reportW_NO_TIMESTAMP. If an ML-DSA timestamp token is present but fails cryptographic or path validation, reportE_TIMESTAMP_INVALID. - Check revocation: evaluate the revocation status of the certification path per
Section 8. If any certificate in the path is revoked, report
E_REVOKED. If the revocation status cannot be determined because no valid CRL is in force, reportE_REVOCATION_UNKNOWN. - Verify placement boundary: for Place A, verify that L equals the byte offset at which
the revision introducing the host signature begins; if not, report
E_HOST_BOUNDARY. For Place B, step 12 inspects the revision starting at L.
Because step 7 requires the timestamp time determined in step 8, an implementation may evaluate step 8 prior to step 7 while still reporting result codes in step order.
9.2. For the Whole File
- Enforce domain post-quantum policies: for each classical signature in the file and
each signing domain D of its certificate:
- If a valid PDF-PQS signature belonging to D covers the classical signature (as defined below), proceed to the next domain; no policy fetch is required.
- Retrieve the policy document for D (Section 7.2). If the state is Not
published, proceed to the next domain. If the state is Unavailable and no cached
copy is available, report
E_POLICY_UNAVAILABLEat the file level and proceed to the next domain. - If
pqcRequiredFromis present and the classical signature is not demonstrably older thanpqcRequiredFrom(as defined below), reportE_PQC_REQUIRED_MISSINGat the file level.
- Detect post-signature modifications: for each valid PDF-PQS signature, inspect the
file after byte offset L in the manner [ISO32000-2] readers apply to classical
signatures. Let R denote the revision starting at offset L. Report
W_CHANGES_AFTER_Lif any of the following conditions hold:- Another revision follows R in the file.
- For Place B, R does not introduce the signature’s embedded file attachment (meaning the attachment appears in a later revision and R is an uncovered modification).
- R adds or modifies any PDF object outside the allowlist specified in Section 5 for its placement.
For the purposes of step 11, a “PDF-PQS signature of D” is a valid PDF-PQS signature whose signer certificate lists D as a signing domain and whose validated certification path (step 7) terminates either at a configured trust anchor or at an issuer listed in D’s policy document. A PDF-PQS signature belonging to a different domain does not satisfy D’s policy.
In step 11, a PDF-PQS signature covers a classical signature if either of the following holds:
- L is greater than or equal to the starting byte offset of the revision that introduces the classical signature (a Place A signature carried inside that classical signature satisfies this condition).
- The PDF-PQS signature uses Place B, the revision R beginning at L introduces the attachment with no disallowed objects under step 12, and the classical signature is introduced in the revision immediately following R.
In step 11, the creation time of a classical signature is established solely by an ML-DSA
timestamp token. A classical signature is considered older than pqcRequiredFrom only
when it carries a timestamp token that passes step 8 with a timestamp strictly earlier
than pqcRequiredFrom. Classically signed timestamps are disregarded because a quantum
adversary could backdate them. If no valid ML-DSA timestamp is present, the verifier
treats the classical signature as created at or after pqcRequiredFrom; because an
adversary can strip an unsigned timestamp attribute, an absent timestamp MUST NOT bypass
the policy check (Section 10.2).
9.3. Results
A verifier outputs a single overall result for the file, the per-signature result codes, and any file-level result codes. The four normative result values and their symbolic identifiers for test vectors and machine-readable reports are:
-
Valid, trusted (
valid): Steps 1 through 11 succeed for every PDF-PQS signature, no file-level failures occur, and every certification path terminates at a locally configured trust anchor. -
Valid, domain only (
valid-domain-only): Steps 1 through 11 succeed for every PDF-PQS signature, no file-level failures occur, and at least one certification path terminates at an issuer obtained from a domain policy document rather than at a locally configured trust anchor (W_DOMAIN_ONLY). Verifiers MUST NOT display identity assurance derived from certificate policies for this result. -
Invalid (
invalid): One or more steps fail for any PDF-PQS signature or at the file level. -
No signature (
no-signature): The file contains no PDF-PQS signatures and step 11 succeeds without failure.
Warnings do not alter the overall result, but verifiers MUST surface them to callers or users.