Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 655
    • Issues 655
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #690

Closed
Open
Created Dec 17, 2018 by Scott Moser@smoser

evince fails reading pdf with AESV3 256 encryption

Hi. This is created as suggested from evince issue 446.

Evince is unable to open PDFs encrypted with 256 bit AES (AESv3) encryption.

I'm seeing this problem with evince 3.30.2 running on Ubuntu (disco).

  1. Show some info on qpdf and evince versions.

    $ dpkg-query --show evince
    evince	3.30.2-1
    
    $ evince --version
    GNOME Document Viewer 3.30.2
    
    $ qpdf --version
    qpdf version 8.2.1
  2. Download a PDF to work with.

     $ wget https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf -q -O plain.pdf
     $ md5sum plain.pdf 
     88bb00da1e9bab21e9cb13248b8770b1  plain.pdf
  3. Encrypt it using qpdf and AES 256.

     $ rm -f encrypted-256.pdf encrypted-128.pdf
     $ qpdf --encrypt user-secret owner-secret 256 -- plain.pdf encrypted-256.pdf
    
     $ egrep -a AES encrypted-256.pdf
     << /CF << /StdCF << /AuthEvent /DocOpen /CFM /AESV3 /Length 32 >> >> /Filter /Standard /Length 256 /O <a868eeb995f6ff82543b1f38ab35f99cd9fd3611ddcfbb93f845b895fe64633fbf4e2714dd4dae142ccb602a50ede355> /OE <95e714077d596a65fecf766c94144c09341c9ddedc6f4237852960de7fc6d417> /P -4 /Perms <f708e990e02ae1ddc85b5a120731edc1> /R 6 /StmF /StdCF /StrF /StdCF /U <f972aa5c9877fd6d6650ca7b2705e12141f9d9d711a3378cd5e51c77c5dbc291e5270b54a36015d38b111c1c562a0749> /UE <435b9bd03432ad84261eb3bf19e00ce236e3acc26d831359fa8d2bacf758d1d0> /V 5 >>
    
    
     $ qpdf --password=user-secret --show-encryption encrypted-256.pdf
     R = 6
     P = -4
     User password = user-secret
     extract for accessibility: allowed
     extract for any purpose: allowed
     print low resolution: allowed
     print high resolution: allowed
     modify document assembly: allowed
     modify forms: allowed
     modify annotations: allowed
     modify other: allowed
     modify anything: allowed
     stream encryption method: AESv3
     string encryption method: AESv3
     file encryption method: AESv3
  4. Attempt to view with evince. supplying either user or owner password does not work.

  5. For comparision, try with AES 128 bit.. evince works fine here.

     $ qpdf --encrypt user-secret owner-secret 128 --use-aes=y -- plain.pdf encrypted-128.pdf
    
     $ qpdf --password=owner-secret --show-encryption encrypted-128.pdf
     R = 4
     P = -4
     User password = user-secret
     extract for accessibility: allowed
     extract for any purpose: allowed
     print low resolution: allowed
     print high resolution: allowed
     modify document assembly: allowed
     modify forms: allowed
     modify annotations: allowed
     modify other: allowed
     modify anything: allowed
     stream encryption method: AESv2
     string encryption method: AESv2
     file encryption method: AESv2
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking