gdelugre/origami

Encryption doubts

AgoraSecurity opened this issue · 1 comments

Hello,

I saw that it says:
"Decrypts the current document (only RC4 40..128 bits)."
Source: https://github.com/gdelugre/origami/blob/master/lib/origami/encryption.rb#L47

What are the possible encryption algorithms? What is the software missing? I saw it's missing AES, but is it missing something?

Another question, in https://github.com/gdelugre/origami/blob/master/lib/origami/encryption.rb#L96 & https://github.com/gdelugre/origami/blob/master/lib/origami/encryption.rb#L171
There are two encryption algorithms possible: AES & RC4, does all the pdf readers support them?

Thanks!

PS. This post has more doubts than issues, sorry for posting them here.

PDF supports encryption with RC4 and AES with different password derivation functions. The comment on the decrypt function is wrong, it is possible to decrypt AES-encrypted documents.

Regarding the PDF encryption methods, the most common PDF readers support both RC4 and AES. Some readers may not support the latest password derivation algorithm though (it is only used if you pass the hardened: true option to the encrypt method).