Sign in

For everyoneSecurity

PDF passwords: encryption versus permission restrictions

“The file is password-protected” can mean two different things for a PDF. A password to open encrypts the content, and without it the document cannot be read. A permissions password only asks the program that shows the document not to allow printing or copying, and does not protect the content. This article explains the difference, the strength of the ciphers and how to choose a password that holds.

Maroš Ďurík, founder of VellumedPublished 8 min read

In brief

  • Only the password to open keeps a document confidential. A document that has just a permissions password opens for anyone.
  • Limits on printing, copying and editing are enforced by the program that shows the PDF, not by the cipher. They can be bypassed.
  • Use AES-256 encryption. The PDF 2.0 standard marks the older ways of encrypting, RC4 included, as deprecated.
  • The password decides the strength: five or six random words, passed on through another channel than the file.

Which law this article refers to

This article is technical and applies wherever the PDF format (the ISO 32000 standard) is used. Where it mentions legal duties, it refers to European Union law, the General Data Protection Regulation (GDPR): Article 32 on security of processing and Article 34 on telling data subjects about a breach. Other countries regulate the same questions differently, for example under HIPAA in the United States or the UK GDPR in the United Kingdom, so check the rules of your own country.

This article is general information, not legal advice. For your own situation, ask your data protection officer or a lawyer.

Data protection laws in other countries
European Union and EEA
General Data Protection Regulation (GDPR)
United States
No single federal law: state laws, such as the CCPA/CPRA in California, and sector laws, such as HIPAA in healthcare
Brazil
General Data Protection Law (LGPD)
China
Personal Information Protection Law (PIPL)
Japan
Act on the Protection of Personal Information (APPI)
Russia
Federal Law No. 152-FZ on Personal Data

For orientation only: the list is not complete, and the laws change.

What is the difference between a password to open and a permissions password?

The PDF format knows two passwords. The password to open (the user password in the standard) is needed to display the document. The permissions password (the owner password in the standard) decides who may change the restrictions that were set: no printing, no copying of text, no editing.

The difference lies in what happens to the encryption key. With a password to open, the key is derived from the password, so the content is unreadable without it. If only a permissions password is set, the document is encrypted as well, but the key can be obtained without knowing any password. Every program therefore opens it, and the restrictions are merely an instruction it is expected to follow.

PropertyPassword to openPermissions password only
Opening the documentonly with the passwordwithout a password
Protection of the contentby encryption that depends on the passwordnone, every program obtains the key
No printing or copyinghonoured by the program that shows the PDFhonoured by the program that shows the PDF
Suited toconfidential documentsdocuments where you only want to make casual copying harder

Why permission restrictions are not protection

A ban on printing or copying is a flag stored in the file. The program that shows the document is expected to respect it, but the format does not force it to by cryptography. The documentation of qpdf, a library widely used for PDF encryption, says so plainly: the security of the restrictions is enforced solely by the software. There are programs that ignore the flags, and whoever sees a document on a screen can also photograph it.

Restrictions make sense as an organisational measure: they signal that a document should not be changed or passed on, and they prevent an accidental edit. As protection of personal data they are not enough. A document that has to stay confidential needs a password to open.

Ciphers: what is outdated and what to use

EncryptionIntroduced inAssessment
RC4, 40 bitsPDF 1.1can be broken in a short time, do not use
RC4, 128 bitsPDF 1.4outdated, do not use
AES, 128 bitsPDF 1.6deprecated in PDF 2.0, choose AES-256 for new documents
AES, 256 bitsan extension of PDF 1.7, and PDF 2.0recommended

AES-256 encryption exists in two versions. The older one (revision 5) checked a password too quickly, which made guessing easier. The newer one (revision 6), adopted by the PDF 2.0 standard, deliberately makes every attempt take longer. That slows guessing down, but it does not rescue a weak password. Today's tools as a rule use the newer version. Common current document viewers open it; very old programs do not.

Encryption covers the content of the document. The file name and its size stay unencrypted, and with some settings so do the document properties, such as the title and the author. A patient's name or a diagnosis therefore does not belong in the file name, and it is sensible to clear the document properties before encrypting.

PDF encryption protects against reading, not against the file being altered: the format itself has no integrity protection. The PDFex research of 2019 showed that a modified encrypted document can send its content to an attacker once it is opened. Vendors fixed their programs afterwards, and integrity protection is added by the technical specification ISO/TS 32004 of 2024. A recipient should therefore use a current program and not open an encrypted file from an unknown source.

A password that holds

An attacker can copy an encrypted file and try passwords on their own computer, with no limit on the number of attempts and without you ever learning about it. Unlike signing in to a service, nothing locks an account after the third wrong attempt. The strength of AES-256 is therefore, in practice, the strength of the password.

  • Choose five or six randomly picked words, or at least 14 random characters. A password from a generator is better than an invented one.
  • Do not use anything that can be found out: a birth date, an identification number, a company name, a contract number.
  • Pass the password on through another channel than the file, for example by phone or by text message.
  • Use a different password for every recipient and every document.
  • Keep the password in a password manager. A forgotten password to a properly encrypted PDF cannot be recovered.

Related article: How to send a medical report by e-mail in line with GDPR

Step by step: encrypting a document before sending it

  1. Remove the document properties and hidden content

    The author, the title and attached files are part of a PDF. The Remove hidden data tool clears the document properties and, if you choose, attached files, scripts and links as well. It does not delete comments on the pages: delete them beforehand in the program the document was made in. Do this before you encrypt the document.

    Tool: Remove hidden data
    Screenshot: Remove hidden data in Vellumed
  2. Set a password to open

    Choose AES-256 encryption and a password that follows the rules above. You can add limits on printing and copying, but do not rely on them.

    Tool: Password-protect a PDF
    Screenshot: Password-protect a PDF in Vellumed
  3. Check the result

    Open the saved file in a different program from the one that made it. It should ask for the password before it shows the first page.

  4. Pass the password on separately

    Send the file by e-mail and the password by phone or by text message to a number you know from earlier contact.

  5. Remove the protection when it is no longer needed

    A document whose password you know can be saved without encryption, for example before it is archived in a system with its own access control.

    Tool: Remove a PDF password

Is a PDF password enough to meet GDPR?

Article 32(1)(a) names encryption among the measures by which a controller ensures a level of security appropriate to the risk. The Regulation prescribes no particular cipher, but it does require the state of the art to be taken into account. Encryption that can be broken in a short time, or permission restrictions without a password to open, do not meet that requirement for sensitive data.

Encryption matters after an incident as well. If a document reaches the wrong recipient but was encrypted and the password stayed safe, the data is unintelligible to the unauthorised person. In that case Article 34(3)(a) does not require the data subjects to be informed. The duty to assess and document the incident remains.

How Vellumed encrypts

The PDF protection tool in Vellumed sets a password to open and encrypts with AES-256 as defined in PDF 2.0. The encryption runs in your browser: neither the password nor the document is sent to a server. The permissions password is generated at random and stored nowhere, so nobody can later change the limits on printing, copying and editing with a password that could be guessed.

Two things are worth knowing in advance. We cannot recover a forgotten password, because we never receive it. And permission restrictions work with our tool exactly as this article describes: they are honoured by programs that respect the standard. Our own unlock tool opens a document that has only a permissions password and saves it without the restrictions.

Encrypt a PDF with a password to open

AES-256 in your browser. Neither the password nor the document leaves your device.

Password-protect a PDF

Questions and answers

Can a PDF password be cracked?

With AES-256 the attack is on the password, not on the cipher. A short or guessable password can be found by trying; a long random one cannot with today's technology. The old RC4 encryption with a 40-bit key can be broken whatever the password.

Is it enough to forbid copying and printing?

No, if the document has to stay confidential. A document without a password to open can be read by anyone, and the restrictions can be bypassed.

Which is safer, a PDF with a password or a ZIP archive with a password?

The cipher and the password decide, not the format. Both formats support AES-256 and both also have an old weak variant. An encrypted PDF opens in an ordinary document viewer without another program. In a ZIP archive the names of the files inside as a rule stay unencrypted.

What if the recipient cannot open the encrypted PDF?

Most often they use a very old program. A current document viewer or a web browser helps. Do not send them an unencrypted copy because of it.

Sources and legislation

This article is general information, not legal advice. For your own situation, ask your data protection officer or a lawyer.