You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2019/02/01 19:38:00 UTC
[jira] [Commented] (PDFBOX-4453) Encrypted string not decrypted
[ https://issues.apache.org/jira/browse/PDFBOX-4453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16758612#comment-16758612 ]
Tilman Hausherr commented on PDFBOX-4453:
-----------------------------------------
The problem is that there is another encrypted "0" in the file. Consider this code:
{code}
final Set<COSBase> objects = new HashSet<>();
objects.add(new COSString("0"));
objects.add(new COSString("0"));
System.out.println("size: " + objects.size());
{code}
It outputs
{noformat}
size: 1
{noformat}
So PDFBox believes that it has already decrypted that element but it hasn't. The encryption key is different for each object, so two encrypted identical elements are usually not the same.
> Encrypted string not decrypted
> ------------------------------
>
> Key: PDFBOX-4453
> URL: https://issues.apache.org/jira/browse/PDFBOX-4453
> Project: PDFBox
> Issue Type: Bug
> Components: Crypto
> Affects Versions: 2.0.13
> Reporter: Tilman Hausherr
> Priority: Major
> Attachments: 2AF-0088-NA-LMF35-40-01-2019-01-18-14-25-52(1).pdf
>
>
> In the attached file, an ancrypted string "0" should be decrypted to "3" but it is not.
> * It is RC4 40 bit enrcyption
> * The string is not decrypted because it is skipped because it is in the objects HashSet
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org