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

[question] pdftopdf preserves encryption? #146

Closed
zdohnal opened this issue Sep 2, 2019 · 4 comments · Fixed by #147
Closed

[question] pdftopdf preserves encryption? #146

zdohnal opened this issue Sep 2, 2019 · 4 comments · Fixed by #147

Comments

@zdohnal
Copy link
Member

zdohnal commented Sep 2, 2019

Hi,
I was looking into pdftopdf filter code, seeing how it works and find out that pdftopdf filter produces encrypted files if input file is encrypted.
Is it based on a specification of filtering? Or is it just for convenience? Would it be possible that I create the patch which disables the encryption in pdftopdf filter and could be added into project?

@tillkamppeter
Copy link
Member

The pdftopdf filter does not use any PDF interpreter, it does only manipulations on the PDF file, as re-ordering pages, removing, multiplying pages, scaling, rotating, ... No page is rendered or converted to another file format or internal structure (for example vector text/graphics to raster image). Probably due to thsi encrypted elements are not decrypted but passed on encryoted.
Up to now no one complained about that, so it seems that pdftopdf did its work correctly this way.
Could you tell what the problem caused by the current behavior of pdftopdf is?
Patches are welcome. Simply post a pull request.

@zdohnal zdohnal changed the title [question] pdftopdf perserves encryption? [question] pdftopdf preserves encryption? Sep 2, 2019
@zdohnal
Copy link
Member Author

zdohnal commented Sep 2, 2019

Our crypto people is trying to get rid of weaker hashes/ciphers and they are not happy when pdftopdf filter 'creates' (in matter of speaking, because it is only data which are sent to next filter and no new file is not created) new weakly encrypted (with usage of MD5 and RC4) file based on old weak encrypted file. According to them it would be better to just decrypt the file.

@tillkamppeter
Copy link
Member

Thank you very much, I have merged it now.

@zdohnal
Copy link
Member Author

zdohnal commented Sep 3, 2019

Thank you for merging it, Till!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants