Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling document catalog dictionary in an encrypted doc not specified #439

Closed
lrosenthol opened this issue Jun 24, 2024 · 6 comments
Closed
Assignees
Labels
ISO approved Resolved issue approved by ISO

Comments

@lrosenthol
Copy link
Contributor

The current spec does not state anything about whether the document catalog dictionary can be in a ObjStm in an encrypted document. Allowing it to be so would prevent the use of cleartext metadata (since you need to be able to read the catalog w/o decryption), so most implementations do NOT put it in one in that case, nor can they read such a file.

Recommend we put a specific SHALL in the spec to address this case.

@lrosenthol lrosenthol added the bug Something isn't correct label Jun 24, 2024
@lrosenthol lrosenthol changed the title Handling document catalog dictionary in an encrypted doc Handling document catalog dictionary in an encrypted doc not specified Jun 24, 2024
@mkl-public
Copy link

Wouldn't a catalog in a non-encrypted object stream (with an Identity Crypt filter) also allow cleartext metadata?

@petervwyatt
Copy link
Member

Can you please be more precise?
Are you proposing that the DocCatalog "shall not" be in an ObjStm under all conditions, only if there is an Encrypt dict, or some other condition(s)? Or do you mean that in order to have clear-text Metadata, the DocCatalog "shall not" be in an ObjStm?

@petervwyatt petervwyatt added this to the Encryption related milestone Jun 25, 2024
@MatthiasValvekens
Copy link
Member

PDF DigSig TWG is on board with a blanket prohibition on putting the catalog inside an encrypted ObjStm (i.e. cleartext object streams in otherwise encrypted documents are fair game), predicated on the assumption that such documents don't really circulate today because most mainstream PDF viewers wouldn't be able to read them.

@petervwyatt
Copy link
Member

petervwyatt commented Sep 11, 2024

Proposed solution wording in 2 places:

  1. new bullet in the bulleted list of what is not allowed in object streams in 7.5.7 Object streams
  • The document catalog (see 7.7.2 Document catalog dictionary) in an encrypted document
  1. to be added as a new 2nd paragraph (after the only paragraph) in section 7.7.2 Document catalog dictionary:

For encrypted documents, the catalog dictionary shall not be in an object stream (see 7.5.7 Object streams).

@petervwyatt petervwyatt added the proposed solution Proposed solution is ready for review label Sep 11, 2024
@petervwyatt petervwyatt self-assigned this Sep 11, 2024
@mkl-public
Copy link

mkl-public commented Sep 11, 2024

@petervwyatt

The catalog only needs to be forbidden in encrypted object streams. There is no need to disallow it in not encrypted ones.

@petervwyatt
Copy link
Member

PDF TWG agree

@petervwyatt petervwyatt added ISO approved Resolved issue approved by ISO and removed bug Something isn't correct proposed solution Proposed solution is ready for review labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISO approved Resolved issue approved by ISO
Projects
None yet
Development

No branches or pull requests

4 participants