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.
| Property | Password to open | Permissions password only |
|---|---|---|
| Opening the document | only with the password | without a password |
| Protection of the content | by encryption that depends on the password | none, every program obtains the key |
| No printing or copying | honoured by the program that shows the PDF | honoured by the program that shows the PDF |
| Suited to | confidential documents | documents 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
| Encryption | Introduced in | Assessment |
|---|---|---|
| RC4, 40 bits | PDF 1.1 | can be broken in a short time, do not use |
| RC4, 128 bits | PDF 1.4 | outdated, do not use |
| AES, 128 bits | PDF 1.6 | deprecated in PDF 2.0, choose AES-256 for new documents |
| AES, 256 bits | an extension of PDF 1.7, and PDF 2.0 | recommended |
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
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
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
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.
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.
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.
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
- ISO 32000-2:2020 (PDF 2.0), provisions on encryption
- Regulation (EU) 2016/679 (GDPR), Articles 32 and 34
- qpdf documentation: PDF Encryption
- Müller et al.: Practical Decryption exFiltration: Breaking PDF Encryption (PDFex), ACM CCS 2019
This article is general information, not legal advice. For your own situation, ask your data protection officer or a lawyer.