Is any PDF encryption secure? #2579
MartinThoma
started this conversation in
General
Replies: 1 comment 2 replies
-
@exiledkingcc Do you have any insights about this topic? My best guess is that it's not relevant for the perms as they are small. The ECB-issue only manifests if there are larger chunks of data. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Somebody (I'm not sure if they want to stay anonymous) pointed out that AES in ECB mode is insecure. You can find this example for AES in ECB mode issues.
The PDF specs
PDF 1.7
According to PDF 32000-1:2008, page 58:
And page 67:
The ECB mode is not mentioned at all. The CBC mode should be used.
Looking in https://developer.adobe.com/document-services/docs/assets/5b15559b96303194340b99820d3a70fa/PDF_ISO_32000-2.pdf
PDF 2.0
and
pypdf
pypdf (AlgV5) uses ECB in
verify_perms
; so we seem to follow the PDF 2.0 specs.My Question
pypdf seems to do what it should do: Follow the specs.
My question is about the specs. Why does the perms use ECB mode while the rest uses CBC? Is that an issue? Why was it done like that?
Beta Was this translation helpful? Give feedback.
All reactions