ISO/DTS 32004
(Main)Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
- Abstract
This document specifies how to extend the ISO 32000-2:2020 specification by adding extensions to the Encrypt dictionary and trailer dictionary to provide integrity protection to the encrypted PDF document. This document also ensures that extensions are fully backward-compatible. These extensions are intended for developers of software that creates PDF files (PDF writers), software that reads existing PDF files and (usually) interprets their contents for display (PDF readers), software that reads and displays PDF content and interacts with the computer users to possibly modify and save the PDF file (interactive PDF processors) and PDF products that read and/or write PDF files for a variety of other purposes (PDF processors). NOTE PDF writers and PDF readers are more specialized classifications of interactive PDF processors and both are PDF processors. This document does not specify the following: — specific processes for converting paper or electronic documents to the PDF file format; — specific technical design, user interface implementation, or operational details of rendering; — specific physical methods of storing these documents such as media and storage conditions; — methods for validating the conformance of PDF files or PDF processors; — required computer hardware and/or operating system.
- Status
- Not Published
- Technical Committee
- ISO/TC 171/SC 2 - Document file formats, EDMS systems and authenticity of information
- Drafting Committee
- ISO/TC 171/SC 2/WG 8 - PDF specification
- Current Stage
- 5020 - Proof sent to secretariat or FDIS ballot initiated: 8 weeks - 50 Approval
- Start Date
- 18-Nov-2026
- Due Date
- 18-Nov-2026
- Completion Date
- 18-Nov-2026
Buy Documents
ISO/DTS 32004 - Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
REDLINE ISO/DTS 32004 - Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
ISO/DTS 32004 is an ISO technical specification for Portable Document Format (PDF) 2.0. It defines how to extend encrypted PDF documents with integrity protection by adding entries to the Encrypt dictionary and trailer dictionary, so PDF writers, PDF readers, interactive PDF processors, and other PDF processors can create and verify a PDF Message Authentication Code (MAC) in a backward-compatible way.
It is aimed at software developers and implementers who work with encrypted PDF files, including files that also carry digital signatures. The mechanism lets a recipient check that the document content, and in signed cases the signature container as well, has not been altered.
What does ISO/DTS 32004 specify?
ISO/DTS 32004 specifies extensions to ISO 32000-2:2020 for integrity protection in encrypted PDF 2.0 files. The document stays within the PDF file format and its security dictionaries, and leaves file conversion, rendering design, storage media, conformance testing, and hardware or operating system requirements outside its scope.
The document is organized into six clauses plus three informative annexes:
| Part of the document | What it covers |
|---|---|
| Clause 1-3 | Scope, normative references, and defined terms |
| Clause 4 | Extension schema details for PDF documents using this extension |
| Clause 5 | Changes to the Encrypt dictionary and file trailer |
| Clause 6 | How to compose PDF MAC tokens |
| Annex A | ASN.1 module for PDF MAC |
| Annex B | Validation of document integrity using PDF MAC |
| Annex C | Examples |
Clause 4 defines the developer extension entry that identifies the use of this mechanism. Clause 5 adds the dictionary entries that signal, carry, and locate the PDF MAC token. Clause 6 defines the token format, algorithms, and digest calculations.
What are the key requirements of ISO/DTS 32004?
Extension setup and file identification
ISO/DTS 32004 requires PDF documents using these enhancements to include an extensions dictionary in the document catalog with the ISO_ prefix. The developer extensions dictionary uses BaseVersion 2.0, ExtensionLevel 32004, and ExtensionRevision :2025, and the URL entry identifies the ISO page for the document. In practice, this lets processors recognize that the file uses the PDF MAC extension while remaining compatible with PDF 2.0 conventions.
The document also states that the extension is backward-compatible with ISO 32000-2:2020 as amended. That matters because a file can keep normal PDF structure while adding integrity protection.
Encrypt dictionary and permission signaling
ISO/DTS 32004 adds KDFSalt to the Encrypt dictionary. The salt is a 32-byte value used in key derivation, and the note says it is intended to remain constant across incremental updates. In practice, implementers need to store the same salt so later MAC validation still derives the same key.
Clause 5 also adds permission bit 13 rules. When bit 13 is zero, the document expects a PDF MAC token in all revisions, and the trailer AuthCode dictionary becomes required. For public-key security handlers, the same bit 13 rule applies to recipient permissions, and the document adds a consistency rule across encrypted permission values. This gives readers a signal that integrity protection is expected and helps resist stripping the MAC from the file.
Trailer dictionary and AuthCode dictionary
The trailer gains an AuthCode dictionary that describes the PDF MAC token. If the document is encrypted with permission bit 13 set to zero, this trailer entry is required. The V entry in the Encrypt dictionary must be at least 5 when the AuthCode dictionary is used.
The AuthCode dictionary has two ways to hold the token:
- Standalone - the MAC is stored directly in the MAC entry.
- AttachedToSig - the MAC is stored as an unsigned attribute on a signature or document time stamp signature, and SigObjRef points to that signature dictionary.
The ByteRange entry defines exactly which bytes are authenticated. For a standalone token, the MAC entry occupies the excluded region. For an attached token, the signature dictionary carries the range, and the MAC is placed in the signature container instead. This is what makes the integrity check precise and repeatable.
PDF MAC token structure and algorithms
Clause 6 defines PDF MAC tokens as CMS ContentInfo objects and requires them to follow IETF RFC 5652. The token uses one PasswordRecipientInfo, a symmetric key wrapping algorithm, and the key derivation function pdfMacWrapKdf. The supported key wrapping method is AES-256 key wrapping without padding.
The document allows these digest algorithms:
- SHA-256
- SHA-384
- SHA-512
- SHA3-256
- SHA3-384
- SHA3-512
The MAC algorithm is HMAC with SHA-256. In practice, implementers must choose from the listed algorithms and identify them with the correct object identifiers.
Authenticated attributes and key derivation
ISO/DTS 32004 requires authAttrs to be present and unauthAttrs to be absent. The authenticated attributes include exactly one content type attribute, one message digest attribute, and one CMS algorithm protection attribute. This makes the container fixed in structure and avoids unauthenticated parts that could be changed without invalidating the token.
The key derivation function pdfMacWrapKdf is an HKDF-based construction. It uses SHA-256, the KDFSalt value from the PDF file, the info string PDFMAC, and the file encryption key as input key material. For public-key security handler use with subfilter adbe.pkcs7.s5, the file encryption key comes from the DefaultCryptFilter. In practice, the MAC depends on the confidentiality of the file encryption key, so only a party with the right encryption access can generate or verify the correct token.
Unsigned and signed revisions
ISO/DTS 32004 treats unsigned and signed revisions differently. In an unsigned revision, the PDF MAC token is written into the trailer AuthCode dictionary, and the ByteRange normally covers the whole file except the MAC itself. In a signed revision, the PDF MAC token is attached as an unsigned attribute on the signature or document time stamp signature, because adding a new trailer token would disturb signature coverage.
The token payload is a PdfMacIntegrityInfo structure. For an unsigned revision, it carries a dataDigest only. For a signed revision, it also carries a signatureDigest derived from the raw signature bytes. This allows the MAC to protect both the document content and the signature container.
What terms does ISO/DTS 32004 define?
- Abstract Syntax Notation One (ASN.1) - A standard notation for describing data types and structures; ISO/DTS 32004 uses it for the PDF MAC token syntax.
- Distinguished encoding rules (DER) - Encoding rules for ASN.1 values; here they define how the token is serialized.
- file encryption key - The key used by a PDF security handler for document-level encryption; the MAC key derivation starts from this key.
- hashed message authentication code (HMAC) - A MAC built from a hash function and a shared secret key; this document uses HMAC-SHA-256 as the MAC algorithm.
- Message Authentication Code (MAC) - A symmetric-key checksum used to detect accidental or intentional modification of data.
- Portable Document Format (PDF) - The file format defined in ISO 32000-2:2020.
- signed revision - A PDF revision that adds a digital signature or document time stamp signature.
- unsigned revision - A PDF revision that does not add a digital signature or document time stamp signature.
Who uses ISO/DTS 32004?
ISO/DTS 32004 is used by developers of PDF writers, PDF readers, interactive PDF processors, and other PDF processors. Those implementers use it when they need to create encrypted PDF files with integrity protection, read files that carry a PDF MAC token, or validate documents that combine encryption with digital signatures.
It is also relevant to teams that test PDF interoperability and security behavior in software that creates, displays, modifies, or saves PDF files. The standard gives them a common way to place, identify, and validate the integrity token.
What changed in ISO/DTS 32004 from the previous edition?
ISO/DTS 32004 is the second edition and cancels and replaces ISO TS 32004:2024. The foreword lists these changes:
- ISO 32000-2:2020/DAmd 1:- was added to the normative references alongside ISO 32000-2:2020.
- Technical details for whitespace processing were modified.
- Clarifications were added for user access permissions bit processing.
Which standards are used with ISO/DTS 32004?
- ISO 32000-2:2020 - The base PDF 2.0 specification that this document extends.
- ISO 32000-2:2020/DAM 1 and ISO 32000-2:2020/DAmd 1:- - The amendment referenced by this document for the updated PDF 2.0 framework.
- IETF RFC 2104 - Defines HMAC, the MAC construction used here.
- IETF RFC 3394 - Defines the AES key wrap algorithm used for MAC key encryption.
- IETF RFC 4231 - Provides HMAC identifiers and test vectors for the supported HMAC family.
- IETF RFC 5652 - Defines Cryptographic Message Syntax (CMS), which carries the PDF MAC token.
- IETF RFC 5869 - Defines HKDF, which ISO/DTS 32004 uses in pdfMacWrapKdf.
- IETF RFC 6211 and IETF RFC 8933 - Define CMS algorithm protection handling for authenticated CMS data.
- NIST CSOR - Supplies algorithm registrations for the digest algorithms named in the document.
What does the ISO/DTS 32004 document contain?
ISO/DTS 32004 contains the extension schema, dictionary additions, token format, and validation guidance needed to implement PDF MAC support. Clause 5 includes the added entries for the Encrypt dictionary, trailer dictionary, permission bits, and the AuthCode dictionary. Clause 6 gives the CMS structure, the PdfMacIntegrityInfo type, the key derivation method, the supported digest and MAC algorithms, and the rules for placing tokens in unsigned and signed revisions.
Annex A gives an ASN.1 module for implementation work. Annex B explains validation in two parts - document binding validation and CMS MAC validation. Annex C provides example PDF structures showing a standalone MAC and a MAC attached to a signature container.
Relations
- Effective Date
- 17-May-2025
Buy Documents
ISO/DTS 32004 - Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
REDLINE ISO/DTS 32004 - Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
Get Certified
Connect with accredited certification bodies for this standard

BSI Group
BSI (British Standards Institution) is the business standards company that helps organizations make excellence a habit.

NYCE
Mexican standards and certification body.
Sponsored listings
Frequently Asked Questions
ISO/DTS 32004 is a draft published by the International Organization for Standardization (ISO). Its full title is "Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0". This standard covers: This document specifies how to extend the ISO 32000-2:2020 specification by adding extensions to the Encrypt dictionary and trailer dictionary to provide integrity protection to the encrypted PDF document. This document also ensures that extensions are fully backward-compatible. These extensions are intended for developers of software that creates PDF files (PDF writers), software that reads existing PDF files and (usually) interprets their contents for display (PDF readers), software that reads and displays PDF content and interacts with the computer users to possibly modify and save the PDF file (interactive PDF processors) and PDF products that read and/or write PDF files for a variety of other purposes (PDF processors). NOTE PDF writers and PDF readers are more specialized classifications of interactive PDF processors and both are PDF processors. This document does not specify the following: — specific processes for converting paper or electronic documents to the PDF file format; — specific technical design, user interface implementation, or operational details of rendering; — specific physical methods of storing these documents such as media and storage conditions; — methods for validating the conformance of PDF files or PDF processors; — required computer hardware and/or operating system.
This document specifies how to extend the ISO 32000-2:2020 specification by adding extensions to the Encrypt dictionary and trailer dictionary to provide integrity protection to the encrypted PDF document. This document also ensures that extensions are fully backward-compatible. These extensions are intended for developers of software that creates PDF files (PDF writers), software that reads existing PDF files and (usually) interprets their contents for display (PDF readers), software that reads and displays PDF content and interacts with the computer users to possibly modify and save the PDF file (interactive PDF processors) and PDF products that read and/or write PDF files for a variety of other purposes (PDF processors). NOTE PDF writers and PDF readers are more specialized classifications of interactive PDF processors and both are PDF processors. This document does not specify the following: — specific processes for converting paper or electronic documents to the PDF file format; — specific technical design, user interface implementation, or operational details of rendering; — specific physical methods of storing these documents such as media and storage conditions; — methods for validating the conformance of PDF files or PDF processors; — required computer hardware and/or operating system.
ISO/DTS 32004 is classified under the following ICS (International Classification for Standards) categories: 35.240.30 - IT applications in information, documentation and publishing; 37.100.99 - Other standards related to graphic technology. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO/DTS 32004 has the following relationships with other standards: It is inter standard links to ISO/TS 32004:2024. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
ISO/DTS 32004 is available in PDF format for immediate download after purchase. The document can be added to your cart and obtained through the secure checkout process. Digital delivery ensures instant access to the complete standard document.
Standards Content (Sample)
Contents
- Introduction
- 1 Scope
- 2 Normative references
- 3 Terms and definitions
- 3.1 Abstract Syntax Notation One
- 3.2 distinguished encoding rules
- 3.3 file encryption key
- 3.4 hashed message authentication code
- 3.5 Message Authentication Code
- 3.6 Portable Document Format
- 3.7 signed revision
- 3.8 unsigned revision
- 4 Extension schema details
- 5 Extensions to ISO 32000-2:2020 as amended by ISO 32000-2:2020/DAmd 1:—
- 5.1 Encrypt dictionary
- 13 When zero, indicates that a PDF MAC token is required to be present in all revisions
- 13 When zero, indicates that a PDF MAC token is required to be present in all revi-
- 5.2 File trailer
- 6 Composing PDF MAC tokens
- 6.1 General
- 6.2 PdfMacIntegrityInfo data type
- 6.3 CMS structure of a PDF MAC token
- 6.4 Key derivation function
- 6.5 Location of PDF MAC tokens
- 6.6 Computing the digests in a PDF MAC token
- Annex A
- Annex B
- Annex C
- Bibliography
Introduction
When encrypting documents, it is important to not only preserve the confidentiality of the encrypted material, but also to ensure that the receiving party can verify its integrity. Encryption mechanisms defined 1) in ISO 32000-2:2020 (as amended by ISO 32000-2:2020/DAmd 1:—,) currently only provide confidentiality without this authentication aspect.
This document describes a mechanism to protect the integrity of an encrypted PDF document using a Message Authentication Code (MAC), with key material derived from the file encryption key. Message authentication codes are distinct from digital signatures based on public-key cryptography. Digital signatures and message authentication codes have different but complementary security properties: a valid MAC created following this document proves knowledge of the file encryption key, whereas digital signatures as defined in 1) ISO 32000-2:2020 and as amended by ISO 32000-2:2020/DAmd 1:— do not have that property. The MAC mechanism described in this document is backwards compatible with ISO 32000-2:2020 and can also be used in PDF documents containing digital signatures.
This document follows all conventions for PDF specifications, as specified in ISO 32000-2:2020, Clauses 4 to 6.
1) Under preparation. Stage at the time of publication ISO 32000-2:2020/DAmd 1.2:2026.
FINAL DRAFT Technical Specification ISO/DTS 32004:2026(en) Document management — Portable Document Format — Integrity protection in encrypted documents in PDF 2.0
1 Scope
2) This document specifies how to extend ISO 32000-2:2020 (as amended by ISO 32000-2:2020/DAmd 1:— ) by adding extensions to the Encrypt dictionary and trailer dictionary to provide integrity protection to the encrypted PDF document. This document also ensures that extensions are fully backward-compatible. These extensions are intended for developers of software that creates PDF files (PDF writers), software that reads existing PDF files and (usually) interprets their contents for display (PDF readers), software that reads and displays PDF content and interacts with the computer users to possibly modify and save the PDF file (interactive PDF processors) and PDF products that read, write, or modify PDF files for a variety of other purposes (PDF processors).
NOTE PDF writers and PDF readers are more specialized classifications of interactive PDF processors and both are PDF processors.
This document does not specify the following:
- specific processes for converting paper or electronic documents to the PDF file format;
- specific technical design, user interface implementation, or operational details of rendering;
- specific physical methods of storing these documents such as media and storage conditions;
- methods for validating the conformance of PDF files or PDF processors;
- required computer hardware or operating system.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO 32000-2:2020, Document management — Portable document format — Part 2: PDF 2.0 2) ISO 32000-2:2020/DAmd 1:— , Document management — Portable document format — Part 2:
PDF 2.0 — Amendment 1 IETF RFC 2104, H. KRAWCZYK, M. BELLARE and R. CANETTI. HMAC: Keyed-Hashing for Message Authentication. 3) RFC Series IETF RFC 3394, J. SCHAAD and R. HOUSLEY. Advanced Encryption Standard (AES) Key Wrap Algorithm. RFC 4) Series IETF RFC 4231, M. NYSTROM. Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, 5) and HMAC-SHA-512. RFC Series 2) Under preparation. Stage at the time of publication ISO 32000-2:2020/DAmd 1.2:2026. 3) Available from: https:// www .rfc -editor .org/ info/ rfc2104. 4) Available from: https:// www .rfc -editor .org/ info/ rfc3394. 5) Available from: https:// www .rfc -editor .org/ info/ rfc4231.
ISO/DTS 32004:2026(en) 6) IETF RFC 5652, R. HOUSLEY. Cryptographic Message Syntax (CMS). RFC Series IETF RFC 5869, H. KRAWCZYK and P. ERONEN. HMAC-based Extract-and-Expand Key Derivation Function 7) (HKDF). RFC Series IETF RFC 6211, J. SCHAAD. Cryptographic Message Syntax (CMS) Algorithm Identifier Protection Attribute. RFC 8) Series IETF RFC 8933, R. HOUSLEY. Update to the Cryptographic Message Syntax (CMS) for Algorithm Identifier 9) Protection. RFC Series NIST CSOR.NIST Computer Security Resource Center (CSRC) Computer Security Objects Register (CSOR), 10) Algorithm Registration
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply. ISO and IEC maintain terminology databases for use in standardization at the following addresses:
- ISO Online browsing platform: available at https:// www .iso .org/ obp
- IEC Electropedia: available at https:// www .electropedia .org/
3.1 Abstract Syntax Notation One
ASN.1 International Standard for representing data types and structures Note 1 to entry: The encoding rules for this abstract syntax notation are defined in ISO/IEC 8825-1. [SOURCE: ISO 17261:2012, 3.5, modified — ISO/IEC 8825-2 has been replaced by ISO/IEC 8825-1 in the Note 1 to entry.]
3.2 distinguished encoding rules
DER encoding rules that may be applied to values of types defined using the ASN.1 (3.1) notation [SOURCE: ISO/IEC 18014-2:2021, 3.22, modified — note 1 to entry has been removed.]
3.3 file encryption key
key used for document-level encryption by a PDF (3.6) security handler of version 5 or higher Note 1 to entry: General provisions about PDF security handlers can be found in ISO 32000-2:2020, 7.6.3. Note 2 to entry: Extensions to PDF can define security handlers other than those specified in ISO 32000-2:2020. File encryption keys defined by such security handlers are also covered by this definition. 6) Available from: https:// www .rfc -editor .org/ info/ rfc5652. 7) Available from: https:// www .rfc -editor .org/ info/ rfc5869. 8) Available from: https:// www .rfc -editor .org/ info/ rfc6211. 9) Available from https:// www .rfc -editor .org/ info/ rfc8933. 10) Available from: https:// csrc .nist .gov/ projects/ computer -security -objects -register/ algorithm -registration.
ISO/DTS 32004:2026(en)
3.4 hashed message authentication code
HMAC mechanism for message authentication using a cryptographic hash function in combination with a shared secret key Note 1 to entry: This definition has been adapted from IETF RFC 2104.
3.5 Message Authentication Code
MAC cryptographic check sum on data that uses a symmetric key to detect both accidental and intentional modification of data [SOURCE: ISO 16609:2022, 3.10]
3.6 Portable Document Format
PDF file format defined in ISO 32000-2:2020
3.7 signed revision
initial or incremental revision of a PDF (3.6) file that adds a digital signature or document time stamp signature to the document Note 1 to entry: A PDF document can contain both signed revisions (3.7) and unsigned revisions (3.8).
3.8 unsigned revision
initial or incremental revision of a PDF (3.6) file that does not add a digital signature or document time stamp signature to the document Note 1 to entry: A PDF document can contain both signed revisions (3.7) and unsigned revisions (3.8).
4 Extension schema details
PDF documents using enhancements described in this document shall include in their document catalog dictionary (in accordance with ISO 32000-2:2020, 7.7.2) an extensions dictionary (in accordance with ISO 32000-2:2020, 7.12) with a prefix name of ISO_. This shall contain a developer extensions dictionary in accordance with ISO 32000-2:2020, 7.12.3, with the following entries as shown in Table 1. Encrypted PDF documents making use of the extension specified in this document shall conform to 2) ISO 32000-2:2020 as amended by ISO 32000-2:2020/DAmd 1:—.
Table 1 — Developer extensions dictionary values for documents using enhancements described in this document Key Type Value BaseVersion name 2.0 ExtensionLevel integer 32004 ExtensionRevision text string :2025 NOTE 1 The COLON (U+003A) character is part of the revision identifier. Type name DeveloperExtensions URL string https:// www .iso .org/ standard/ 92060 .html NOTE 2 Per ISO 32000-2:2020, 7.6.2, as modified by 5.2.2, the values of the ExtensionRevision and URL entries are serialized in encrypted form. Table 1 lists the unencrypted values of those entries.
ISO/DTS 32004:2026(en) 2)
5 Extensions to ISO 32000-2:2020 as amended by ISO 32000-2:2020/DAmd 1:—
5.1 Encrypt dictionary
5.1.1 Additions to ISO 32000-2:2020, 7.6.2 The content of Table 2 is appended to ISO 32000-2:2020, 7.6.2, Table 20 — Entries common to all encryption dictionaries.
Table 2 — Additions to ISO 32000-2:2020, Table 20 Key Type Value KDFSalt byte (Conditionally required; shall be a direct object) A 32-byte salt value for use string in key derivation (see 6.4 in this document).
This entry is required in documents that make use of PDF MAC.
NOTE The value of the KDFSalt entry is intended to remain constant throughout all incremental updates of the document.
5.1.2 Additions to ISO 32000-2:2020, 7.6.4.2 The content of Table 3 is appended to ISO 32000-2:2020, 7.6.4.2, Table 22 — Standard security handler user access permissions.
Table 3 — Additions to ISO 32000-2:2020, Table 22 Bit posi- Meaning tion
13 When zero, indicates that a PDF MAC token is required to be present in all revisions
of the document.
The location of the PDF MAC token is indicated by the AuthCode dictionary (see 5.2.3 in this document).
NOTE 1 The intention behind this permission bit is to signal to a PDF processor reading the document that a PDF MAC token is expected. The encrypted Perms entry provides a degree of tamper-resistance and helps to protect the document against attackers stripping the MAC. This protection is not without limitations: unless bit 13 is zero in all revisions, it can be trivially bypassed by a knowledgeable adversary. Furthermore, the last of row of ISO 32000-2:2020, 7.6.4.2, Table 22 — Standard security handler user access permissions shall refer to bit positions 14 — 32 as being reserved and set to 1. 5.1.3 Additions to ISO 32000-2:2020, 7.6.5.2 The content of Table 4 is appended to ISO 32000-2:2020, 7.6.5.2, Table 24 — Public–key security handler 2) user access permissions and as amended by ISO 32000-2:2020/DAmd 1:—, Table 24 — Public–key security handler user access permissions.
ISO/DTS 32004:2026(en) Table 4 — Additions to ISO 32000-2:2020, Table 24 and as amended by ISO 32000-2:2020/DAmd 1:— 2) , Table 24 Bit posi- Meaning tion
13 When zero, indicates that a PDF MAC token is required to be present in all revi-
sions of the document.
The location of the PDF MAC token is indicated by the AuthCode dictionary (see 5.2.3 in this document).
In an encrypted PDF the bit 13 values of all permission values encrypted in the Re- cipients CMS objects should be identical to allow consistent MAC usage. Furthermore, bit 13 shall not be zero in a public key security handler permissions value in which bit 2 is set to 1.
NOTE This addition supersedes the provision of ISO 32000-2:2020, 7.6.5.2 requiring that PDF readers ignore all flags other than those at bit positions 2, 3, 4, 5, 6, 9, 10, 11, and 12. Furthermore, the last of row of ISO 32000-2:2020, Amd 1:—, 7.6.5.2, Table 24, "Public–key security handler user access permissions" shall refer to bit positions 14 — 32 as being reserved and set to 1.
5.2 File trailer
5.2.1 Additions to ISO 32000-2:2020, 7.5.5 The content of Table 5 is appended to ISO 32000-2:2020, 7.5.5, Table 15 — Entries in the file trailer dictionary. Table 5 — Additions to ISO 32000-2:2020, Table 15 Key Type Value AuthCode dictionary (Required if the document is encrypted with user access permissions bit 13 zero. Shall be a direct object; PDF 2.0) Describes a PDF MAC token to validate the integrity of an encrypted document (see 5.2.3). If present, the value of the V entry in the document’s Encrypt dictionary shall be at least 5.
5.2.2 Additions to ISO 32000-2:2020, 7.6.2 The following entry is added to the bulleted list in ISO 32000-2:2020, 7.6.2. - Any byte strings representing the value of the MAC key in an AuthCode dictionary. NOTE This prevents strings containing PDF MAC tokens from being encrypted.
5.2.3 AuthCode dictionary
The AuthCode dictionary, defined in Table 6, contains a PDF MAC token or describes where to find it. All AuthCode dictionary entries defined below shall be direct objects, with the exception of the SigObjRef entry.
ISO/DTS 32004:2026(en) Table 6 — Entries in an AuthCode dictionary Key Type Value MACLocation name (Required; shall not be an indirect reference) Indicates where to find the PDF MAC token (see 6.5). The following values are defined:
- Standalone: The DER-encoded PDF MAC token is given by the value of the MAC entry.
- AttachedToSig: The PDF MAC token is an unsigned attribute on a digital signature, contained in the signature dictionary referenced by the SigObjRef entry. Any other values shall be second-class names in accordance with ISO 32000-2:2020, Annex E.
ByteRange array (Conditionally required; shall not be an indirect reference) An array of four non-negative integers describing the exact byte range over which to compute the document digest.
This entry shall be present if MACLocation is Standalone.
If MACLocation is AttachedToSig, this entry shall not be present. The first array element shall be zero.
If the byte range is given by [0, L , S , L ], then the document 1 2 digest is computed by hashing L bytes starting from position 0 in
the PDF file, followed by L bytes starting from position S in the
...
Contents
- Introduction
- 1 Scope
- 2 Normative references
- 3 Terms and definitions
- 4 Extension schema details
- 5 Proposed changes
- 5 Extensions to ISO 32000-2:2020 as amended by ISO 32000-2:2020/DAmd 1:—
- 5.1 Encrypt dictionary
- 13 When zero, indicates that a PDF MAC token is required to be present in all
- 13 When zero, indicates that a PDF MAC token is required to be present in all
- 5.2 File trailer
- 6 Composing PDF MAC tokens
- 6.1 General
- 6.2 PdfMacIntegrityInfo data type
- 6.3 CMS structure of a PDF MAC token
- 6.4 Key derivation function
- 6.5 Location of PDF MAC tokens
- 6.6 Computing the digests in a PDF MAC token
- Annex A
- Annex B
- Annex C
- Bibliography
Introduction
When encrypting documents, it is important to not only preserve the confidentiality of the encrypted material, but also to ensure that the receiving party can verify its integrity. Encryption mechanisms defined in ISO 32000-2:2020 (as amended by ISO 32000-2:2020/DAM 1) currently only provide confidentiality without this authentication aspect.
1) DAmd 1:—,) currently only provide confidentiality without this authentication aspect. This document describes a mechanism to protect the integrity of an encrypted PDF document using a Message Authentication Code (MAC), with key material derived from the file encryption key. Message authentication codes are distinct from digital signatures based on public-key cryptography. Digital signatures and message authentication codes have different but complementary security properties: a valid MAC created following this document proves knowledge of the file encryption key, whereas digital signatures as defined in 1) ISO 32000-2:2020 and as amended by ISO 32000-2:2020/DAM DAmd 1:— do not have that property. The MAC mechanism described in this document is backwards compatible with ISO 32000-2:2020 and can also be used in PDF documents containing digital signatures.
This document follows follows all conventions for PDF specifications, as specified in ISO 32000-2:2020, Clauses 4 to 6.
1) Under preparation. Stage at the time of publication ISO 32000-2:2020/DAmd 1.2:2026.
FINAL DRAFT Technical Specification ISO/DTS 32004:2025(en)
Document management — Portable document formatDocument Format — Integrity protection in encrypted documents in PDF 2.0
1 Scope
This document specifies how to extend the ISO 32000-2:2020 specification (as amended by ISO 32000- 2) 2:2020/DAM DAmd 1):— ) by adding extensions to the Encrypt dictionary and trailer dictionary to provide integrity protection to the encrypted PDF document. This document also ensures that extensions are fully backward-compatible.
These extensions are intended for developers of software that creates PDF files (PDF writers), software that reads existing PDF files and (usually) interprets their contents for display (PDF readers), software that reads and displays PDF content and interacts with the computer users to possibly modify and save the PDF file (interactive PDF processors) and PDF products that read, write, or modify PDF files for a variety of other purposes (PDF processors).
NOTE PDF writers and PDF readers are more specialized classifications of interactive PDF processors and both are PDF processors.
This document does not specify the following:
- — specific processes for converting paper or electronic documents to the PDF file format;
- — specific technical design, user interface implementation, or operational details of rendering;
- — specific physical methods of storing these documents such as media and storage conditions;
- — methods for validating the conformance of PDF files or PDF processors;
- — required computer hardware or operating system.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO 32000-2:2020, Document management — Portable document format — Part 2: PDF 2.0 1 2) ISO 32000-2:2020/DAMDAmd 1 :— , Document management — Portable document format — Part 2:
PDF 2.0 — Amendment 1
Under preparation. (Stage at the time of publication ISO 32000-2:2020/DAM 1:2025). 2) Under preparation. Stage at the time of publication ISO 32000-2:2020/DAmd 1.2:2026.
ISO/FDTSDTS 32004:2025(E:(en) IETF RFC 2104, H. KRAWCZYK, M. BELLARE and R. CANETTI. HMAC: Keyed-Hashing for Message Authentication. 2 3) RFC Series. Available from: .
IETF RFC 3394, J. SCHAAD and R. HOUSLEY. Advanced Encryption Standard (AES) Key Wrap Algorithm. RFC 3 4) Series. Available from: .
IETF RFC 4231, M. NYSTROM. Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, 4 5) and HMAC-SHA-512. RFC Series. Available from: .
5 6) IETF RFC 5652, R. HOUSLEY. Cryptographic Message Syntax (CMS). RFC Series. Available from: . IETF RFC 5869, H. KRAWCZYK and P. ERONEN. HMAC-based Extract-and-Expand Key Derivation Function 6 7) (HKDF). RFC Series. Available from: .
IETF RFC 6211, J. SCHAAD. Cryptographic Message Syntax (CMS) Algorithm Identifier Protection Attribute. RFC 7 8) Series. Available from: .
IETF RFC 8933, R. HOUSLEY. Update to the Cryptographic Message Syntax (CMS) for Algorithm Identifier 9) Protection. RFC Series NIST CSOR.NIST Computer Security Resource Center (CSRC) Computer Security Objects Register (CSOR), 810) Algorithm Registration. Available from:
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply. ISO and IEC maintain terminology databases for use in standardization at the following addresses:
- — ISO Online browsing platform: available at https://www.iso.org/obp
- — IEC Electropedia: available at https://www.electropedia.org/
https://www.rfc-editor.org/info/rfc2104.
3) Available from: https://www.rfc-editor.org/info/rfc2104.
https://www.rfc-editor.org/info/rfc3394.
4) Available from: https://www.rfc-editor.org/info/rfc3394.
https://www.rfc-editor.org/info/rfc4231.
5) Available from: https://www.rfc-editor.org/info/rfc4231.
https://www.rfc-editor.org/info/rfc5652.
6) Available from: https://www.rfc-editor.org/info/rfc5652.
https://www.rfc-editor.org/info/rfc5869.
7) Available from: https://www.rfc-editor.org/info/rfc5869.
https://www.rfc-editor.org/info/rfc6211.
8) Available from: https://www.rfc-editor.org/info/rfc6211.
9) Available from https://www.rfc-editor.org/info/rfc8933.
https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration. 10) Available from: https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration.
ISO/DTS 32004:2025(:(en) 3.1 3.1 Abstract Syntax Notation One ASN.1 International Standard for representing data types and structures Note 1 to entry: The encoding rules for this abstract syntax notation are defined in ISO/IEC 8825-1. [SOURCE: ISO 17261:2012, 3.5, modified — ISO/IEC 8825-2 has been replaced by ISO/IEC 8825-1 in the Note 1 to entry.] 3.2 3.2 distinguished encoding rules DER encoding rules that may be applied to values of types defined using the ASN.1 (3.1(3.1)) notation [SOURCE: ISO/IEC 18014-2:2021, 3.22, modified — note 1 to entry has been removed.] 3.3 3.3 file encryption key key used for document-level encryption by a PDF (3.6(3.6)) security handler of version 5 or higher Note 1 to entry: General provisions about PDF security handlers can be found in ISO 32000-2:2020, 7.6.3. Note 2 to entry: Extensions to PDF can define security handlers other than those specified in ISO 32000-2:2020. File encryption keys defined by such security handlers are also covered by this definition. 3.4 3.4 hashed message authentication code HMAC mechanism for message authentication using a cryptographic hash function in combination with a shared secret key Note 1 to entry: This definition has been adapted from IETF RFC 2104. 3.5 3.5 Message Authentication Code MAC cryptographic check sum on data that uses a symmetric key to detect both accidental and intentional modification of data [SOURCE: ISO 16609:2022, 3.10] 3.6 3.6 Portable Document Format PDF file format defined in ISO 32000-2:2020 3.7 3.7 signed revision initial or incremental revision of a PDF (3.6(3.6)) file that adds a digital signature or document time stamp signature to the document Note 1 to entry: A PDF document can contain both signed revisions (3.7(3.7)) and unsigned revisions (3.8(3.8).).
ISO/FDTSDTS 32004:2025(E:(en) 3.8 3.8 unsigned revision initial or incremental revision of a PDF (3.6(3.6)) file that does not add a digital signature or document time stamp signature to the document Note 1 to entry: A PDF document can contain both signed revisions (3.7(3.7)) and unsigned revisions (3.8(3.8).).
4 Extension schema details
PDF documents using enhancements described in this document shall include in their document catalog dictionary (in accordance with ISO 32000-2:2020, 7.7.2) an extensions dictionary (in accordance with ISO 32000-2:2020, 7.12) with a prefix name of ISO_. This shall contain a developer extensions dictionary in accordance with ISO 32000-2:2020, 7.12.3, with the following entries as shown in Table 1Table 1.. Encrypted PDF documents making use of the extension specified in this document shall conform to 2) ISO 32000--2:2020 as amended by ISO 32000-2:2020/DAM DAmd 1.:—. Table 1 — Developer extensions dictionary values for documents using enhancements described in this document Key Type Value BaseVersion name 2.0 ExtensionLevel integer 32004 ExtensionRevision text string :2025 NOTE 1 The COLON (U+003A) character is part of the revision identifier. Type name DeveloperExtensions URL string https://www.iso.org/standard/92060.html NOTE 2 Per ISO 32000-2:2020, 7.6.2, as modified by 5.2.25.2.2 in this document,, the values of the ExtensionRevision and URL entries are serialized in encrypted form. Table 1Table 1 lists the unencrypted values of those entries.
5 Proposed changes
2)
5 Extensions to ISO 32000-2:2020 as amended by ISO 32000-2:2020/DAmd 1:—
5.1 Encrypt dictionary
5.1.1 Additions to ISO 32000-2:2020, 7.6.2 The content of Table 2Table 2 is appended to ISO 32000-2:2020, 7.6.2, Table 20 — Entries common to all encryption dictionaries.
Table 2 — Additions to ISO 32000-2:2020, Table 20 Key Type Value KDFSalt byte (Conditionally required; shall be a direct object) A 32-byte salt value for use string in key derivation (see 6.46.4 in this document).
This entry is required in documents that make use of PDF MAC.
NOTE The value of the KDFSalt entry is intended to remain constant throughout all incremental updates of the document.
ISO/DTS 32004:2025(:(en) 5.1.2 Additions to ISO 32000-2:2020, 7.6.4.2 The content of Table 3Table 3 is appended to ISO 32000-2:2020, 7.6.4.2, Table 22 — Standard security handler user access permissions and as amended by ISO 32000-2:2020/DAM 1. Table 3 — Additions to ISO 32000-2:2020, Table 22 Bit positio Meaning n
13 When zero, indicates that a PDF MAC token is required to be present in all
revisions of the document.
The location of the PDF MAC token is indicated by the AuthCode dictionary (see 5.2.35.2.3 in this document).
NOTE 1 The intention behind this permission bit is to signal to a PDF processor reading the document that a PDF MAC token is expected. The encrypted Perms entry provides a degree of tamper-resistance and helps to protect the document against attackers stripping the MAC. This protection is not without limitations: unless bit 13 is zero in all revisions, it can be trivially bypassed by a knowledgeable adversary.
NOTE 2 This addition supersedes the provision of ISO 32000-2:2020, 7.6.4.2 requiring that PDF readers ignore all flags other than those at bit positions 3, 4, 5, 6, 9, 10, 11, and 12. Furthermore, the last of row of ISO 32000-2:2020, 7.6.4.2, Table 22 — Standard security handler user access permissions and as amended by ISO 32000-2:2020/DAM 1 shall refer to bit positions 14 — 32 as being reserved and set to 1.
5.1.3 Additions to ISO 32000-2:2020, 7.6.5.2 The content of Table 4Table 4 is appended to ISO 32000-2:2020, 7.6.5.2, Table 24 — Public–key security 2) handler user access permissions and as amended by ISO 32000-2:2020/DAM DAmd 1:—, Table 24 — Public–key security handler user access permissions.
Table 4 — Additions to ISO 32000-2:2020, Table 24 and as amended by ISO 32000- 2) 2:2020/DAmd 1:—, Table 24 Bit positio Meaning n
13 When zero, indicates that a PDF MAC token is required to be present in all
revisions of the document.
The location of the PDF MAC token is indicated by the AuthCode dictionary (see 5.2.35.2.3 in this document).
In an encrypted PDF the bit 13 values of all permission values encrypted in the Recipients CMS objects should be identical to allow consistent MAC usage. Furthermore, bit 13 shall not be zero in a public key security handler permissions value in which bit 2 is set to 1.
NOTE This addition supersedes the provision of ISO 32000-2:2020, 7.6.5.2 requiring that PDF readers ignore all flags other than those at bit positions 2, 3, 4, 5, 6, 9, 10, 11, and 12.
ISO/FDTSDTS 32004:2025(E:(en) Furthermore, the last of row of ISO 32000-2:2020/DAM, Amd 1:—, 7.6.5.2, Table 24, "Public–key security 9) handler user access permissions as amended by ISO 32000-2:2020/DAM 1 " shall refer to bit positions 14 — 32 as being reserved and set to 1.
5.2 File trailer
5.2.1 Additions to ISO 32000-2:2020, 7.5.5 The content of Table 5Table 5 is appended to ISO 32000--2:2020, 7.5.5, Table 15 — Entries in the file trailer dictionary.
Table 5 — Additions to ISO 32000-2:2020, Table 15 Key Type Value AuthCode dictionary (Required if the document is encrypted with user access permissions bit 13 zero. Shall be a direct object; PDF 2.0) Describes a PDF MAC token to validate the integrity of an encrypted document (see 5.2.35.2.3).).
If present, the value of the V entry in the document’s Encrypt dictionary shall be at least 5.
5.2.2 Additions to ISO 32000-2:2020, 7.6.2 The following entry is added to the bulleted list in ISO 32000-2:2020, 7.6.2. - — Any byte strings representing the value of the MAC key in an AuthCode dictionary. NOTE This prevents strings containing PDF MAC tokens from being encrypted.
5.2.3 AuthCode dictionary
The AuthCode dictionary, defined in Table 6Table 6,, contains a PDF MAC token or describes where to find it. All AuthCode dictionary entries defined below shall be direct objects, with the exception of the SigObjRef entry.
Table 6 — Entries in an AuthCode dictionary Key Type Value MACLocation name (Required; shall not be an indirect reference) Indicates where to find the PDF MAC token (see 6.56.5).). The following values are defined:
- Standalone: The DER-encoded PDF MAC token is given by the value of the MAC entry.
- AttachedToSig: The PDF MAC token is an unsigned attribute on a digital signature, contained in the signature dictionary referenced by the SigObjRef entry.
Any other values shall be second-class names in accordance with ISO 32000-2:2020, Annex E.
ByteRange array (Conditionally required; shall not be an indirect reference) An array of four non-negative integers describing the exact byte range over which to compute the document digest.
...







