Question: can pypdf decrypt 128/256 AES without PyCryptodome #1924
Answered
by
pubpub-zz
JeffBarrette
asked this question in
Q&A
-
The document suggests (to me) its possible. Am I misunderstanding? I can work successfully with 128-RC4 PDFs but with 128-AES: reader2 = PdfReader("AcrobatPro_128AES.pdf")
if reader2.is_encrypted:
reader2.decrypt("Layout_128AES")
print(reader2.metadata) ###FAILS HERE
pypdf.errors.DependencyError: PyCryptodome is required for AES algorithm 256-AES it fails even sooner: Reader3 = PdfReader("AcrobatPro_256AES.pdf")
pypdf.errors.DependencyError: PyCryptodome is required for AES algorithm |
Beta Was this translation helpful? Give feedback.
Answered by
pubpub-zz
Jun 29, 2023
Replies: 1 comment
-
In any case pypdf uses pyCryptodome for crypt/decrypt files. please install it first. Until now pypdf was only capable of decoding AES files ; writing AES encrypted files was not possible. the PR to introduce this major improvement is in the pipe (#1918) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MartinThoma
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In any case pypdf uses pyCryptodome for crypt/decrypt files. please install it first.
Until now pypdf was only capable of decoding AES files ; writing AES encrypted files was not possible. the PR to introduce this major improvement is in the pipe (#1918)