Download it now!
Bug 55425 - PDF import: support encryption algorithm value 4
Summary: PDF import: support encryption algorithm value 4
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) Master
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
Reported: 2012-09-28 15:06 UTC by Stephan Bergmann
Modified: 2019-01-08 10:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Bergmann 2012-09-28 15:06:20 UTC
For example, the .pdf file attached to <> "cannot import pdf 1-5 format with encrypted sections in otherwise unprotected document" (as <>) contains an Encrypt dictionary of

10747 0 obj
<< /Length 128
   /CF << /StdCF << /Length 16
                    /AuthEvent /DocOpen
                    /CFM /AESV2 >> >>
   /Filter /Standard
   /O (...binary...)
   /P -1052
   /R 4
   /U (...binary...)
   /V 4
   /StrF /StdCF
   /StmF /StdCF >>

whose V entry 4 specifies an en-/decryption algorithm that makes use of the CF, StmF, and StrF entries.  This was introduced with PDF 1.5 (for reference, see Table 20 "Entries common to all encryption dictionaries" in section 7.6.1 of <> "Document management — Portable document format — Part 1: PDF 1.7").

But our import code currently only supports older algorithm values 1 and 2 (cf. "m_pData->m_nAlgoVersion > 2" in PDFFile::setupDecryptionData at <>).  The resulting effect is that LO keeps asking for a password to open the document (bAuthenticated can never become true in the loop in checkEncryption at <>).

So, it would be nice if we also supported algorithm value 4.
Comment 1 Buovjaga 2014-11-08 15:02:32 UTC
I confirm that it can't be imported. Sounds like a good enhancement.

Win 7 64-bit Version:
Build ID: c989f5e0e11e295b11ffc921b0d105869e037e47
TinderBox: Win-x86@42, Branch:master, Time: 2014-11-07_22:50:48