Skip to content

6. Placement in the File

Section 6 of draft-laget-pdf-pqs-00.

Each PDF-PQS signature is carried in the PDF file using either Place A or Place B. Verifiers MUST support both placements. Signers SHOULD use Place A whenever applying a classical signature concurrently, and Place B otherwise. When Section 6.3 prohibits Place B, a signer that would not otherwise apply a classical signature MUST either apply a classical signature to act as the host or refrain from signing.

6.1. Place A: In a Host Signature

In Place A, the PDF-PQS signature is carried as an unsigned attribute within the SignerInfo of a classical host signature:

id-aa-pdfpqsSignature OBJECT IDENTIFIER ::= { id-pdfpqs 1 }

PdfPqsSignature ::= ContentInfo

The following requirements apply to Place A:

  • The id-aa-pdfpqsSignature attribute MUST contain exactly one value, and a host SignerInfo MUST NOT contain more than one instance of this attribute.
  • The host signature MUST be a PDF signature field whose /Contents value is a CMS SignedData structure (for example, using SubFilter ETSI.CAdES.detached [PAdES] or adbe.pkcs7.detached).
  • L MUST equal the byte length of the file immediately preceding the revision that adds the host signature. Consequently, the PDF-PQS signature covers the document state prior to the host signature rather than the host signature itself.
  • The signer MUST insert the id-aa-pdfpqsSignature attribute prior to creating any Document Security Store (DSS) entry or document timestamp that depends on the host signature’s /Contents value.
  • The /Contents placeholder reserved for the host signature MUST be large enough to accommodate both the host SignedData and the id-aa-pdfpqsSignature attribute. Reserving 32768 bytes is sufficient for a single ML-DSA-65 PDF-PQS signature with a timestamp token.

Because unsigned attributes lie outside the data signed by the host SignerInfo, PDF readers that do not implement PDF-PQS ignore id-aa-pdfpqsSignature and continue to validate the host signature normally.

Place A is required for documents whose existing certification signatures or PDF/A conformance claims disallow new file attachments (see Section 6.3).

6.2. Place B: Attached File

In Place B, the PDF-PQS signature is stored as an embedded file stream added in the incremental update beginning at byte offset L. The stream payload MUST consist solely of the DER-encoded ContentInfo with no trailing or framing bytes. The associated file specification dictionary MUST contain:

  • /F and /UF entries set to pdfpqs-<n>.p7s, where <n> is a positive base-10 integer starting at 1 for the first PDF-PQS attachment in the document and incrementing by 1 for each subsequent attachment.
  • /AFRelationship set to /Supplement.
  • An embedded file stream whose /Subtype is /application#2Fpkcs7-signature.

The signer MUST reference the file specification dictionary from both the document catalog’s /AF array and its /EmbeddedFiles name tree. Verifiers locate Place B signatures by inspecting entries in the /EmbeddedFiles name tree.

Although /AF and /AFRelationship are PDF 2.0 constructs, PDF 1.7 readers ignore unrecognized keys and locate the attachment through /EmbeddedFiles. Signers MUST NOT alter the catalog /Version entry or the PDF file header version solely to add a Place B signature.

6.3. Documents That Restrict Placement

A DocMDP certification signature ([ISO32000-2], Section 12.8.2.2) restricts subsequent modifications to a document according to its access permissions (/P):

  • Permission level 1 prohibits all changes. Adding a PDF-PQS signature via either Place A or Place B invalidates the certification; signers MUST NOT add a PDF-PQS signature to such a document.
  • Permission levels 2 and 3 permit additional signatures but disallow new embedded file attachments. Signers MUST use Place A and MUST NOT use Place B on such documents.

A FieldMDP lock restricts modifications to specified form fields but does not prohibit applying a new signature. Where a signer cannot fully evaluate document locks, Place A is the safer placement.

Documents claiming PDF/A-1 conformance forbid embedded files altogether, and documents claiming PDF/A-2 conformance permit only embedded files that themselves conform to PDF/A (which a PDF-PQS signature does not). Conformance is indicated by the pdfaid:part property in the catalog XMP metadata stream. Signers MUST NOT use Place B for documents claiming PDF/A-1 or PDF/A-2 conformance. PDF/A-3 permits arbitrary embedded files and therefore allows Place B.

Type to search…

↑↓ navigate↵ selectEsc close