[
https://issues.apache.org/jira/browse/PDFBOX-2269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094209#comment-14094209
]
Tilman Hausherr commented on PDFBOX-2269:
-----------------------------------------
Good for you, but I can't do it with the command line application (using JDK7):
{code}
Aug 12, 2014 5:53:35 PM org.apache.pdfbox.pdfparser.PDFParser parse
INFORMATION: Document is encrypted
Exception in thread "main" java.io.IOException:
java.security.InvalidKeyException: Illegal key size
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeEncryptedKey(StandardSecurityHandler.java:672)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:252)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.decryptDocument(StandardSecurityHandler.java:153)
at
org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1397)
at org.apache.pdfbox.tools.PDFReader.parseDocument(PDFReader.java:399)
at org.apache.pdfbox.tools.PDFReader.openPDFFile(PDFReader.java:349)
at org.apache.pdfbox.tools.PDFReader.main(PDFReader.java:335)
at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:80)
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeEncryptedKey(StandardSecurityHandler.java:666)
... 7 more
{code}
> Support for AES-256 Rev. 5 Decryption (Acrobat 9)
> -------------------------------------------------
>
> Key: PDFBOX-2269
> URL: https://issues.apache.org/jira/browse/PDFBOX-2269
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Michele Balistreri
> Attachments: AES-256_Rev5.diff, pass17_decrypted.pdf
>
>
> This patch adds support for decrypting files using the (deprecated) AES-256
> scheme revision 5. The current version only support revision 6. Since
> revision 5 files are generated by Acrobat 9, there is a relatively large
> amount of them in the wild so support is needed.
> This patch includes also the fixes from PDFBOX-2268
--
This message was sent by Atlassian JIRA
(v6.2#6252)