PDF encryption is one of the most widely used — and most misunderstood — security features in the format. Millions of PDFs are sent every day with password protection, but few senders understand what that protection actually prevents and, more importantly, what it does not prevent. A strong AES-256 password on a PDF genuinely protects the content from casual interception. A restrictions password ("owner password") that prevents copying does not — any standard PDF reader can circumvent it. This guide explains the PDF encryption model technically: the two password types and what each controls, the evolution from RC4 to AES-256 GCM, the permission flags and their real-world limitations, how to apply and remove encryption with common tools, and the honest assessment of what PDF encryption is actually good for.

The two password types: user password and owner password

PDF encryption uses two distinct passwords with fundamentally different security properties: User password (open password) — The document encryption key is derived in part from the user password. Without the correct user password, the document cannot be opened or decrypted. This is genuine cryptographic protection — an attacker without the password cannot read the content (assuming a strong password and modern AES encryption). Owner password (permissions password) — This password does not protect the content. The document is encrypted with a key that includes the user password and a fixed permissions data structure. The owner password gates access to modify permissions — it does not provide a second layer of encryption. Anyone with the user password (or no password, if no user password is set) can read the document. The permissions restrictions (no copying, no printing, no editing) are enforced by compliant PDF viewers as a courtesy — they are not cryptographically enforced. The permission bypass reality — Because permissions are stored as flags in an unencrypted structure, and because the document's content key is accessible once the user password is entered, any software can decrypt the content and ignore the permission flags. Tools like qpdf, Ghostscript, and many commercial PDF processors will strip permissions on a "permissions-restricted" PDF if you provide the user password — or even without a user password if none is set. The permissions system relies on viewer compliance, not cryptographic enforcement.

PDF encryption algorithms: RC4 to AES-256 GCM

PDF encryption has evolved through several algorithm versions: PDF 1.1–1.3: RC4-40 — 40-bit RC4 stream cipher. Completely broken. Brute-force attackable in seconds on modern hardware. Never use for any security purpose. PDF 1.4: RC4-128 — 128-bit RC4 with improved key derivation. Still RC4 (a stream cipher with known weaknesses including the BEAST attack class). Should be considered legacy. PDF 1.5: AES-128 (CBC) — The first PDF AES encryption. AES in CBC mode with 128-bit keys. Substantially stronger than RC4-128. The key derivation function was improved to use MD5 then SHA-256 in subsequent revisions. This is the /EncryptionRevision R3 and R4 encryption. PDF 1.7 Extension Level 3 (Acrobat 9): AES-256 (CBC) — 256-bit AES in CBC mode. The key derivation was significantly improved: SHA-256 instead of MD5, with a random owner key salt and user key salt. This is Revision 5 (R5) encryption. Substantially stronger for document-open password security. Note: the owner password check in R5 had a flaw discovered by researchers — owner password verification could be bypassed in some implementations. PDF 1.7 Extension Level 8 (Acrobat X): AES-256 (CBC, Revision 6) — R6 encryption fixed the R5 owner password flaw. New key derivation using random 32-byte intermediate keys. The current standard for AES-256 CBC encryption. PDF 2.0: AES-256 GCM — PDF 2.0 added AES in GCM (Galois/Counter Mode) — authenticated encryption (AEAD). Unlike CBC, GCM produces an authentication tag that detects tampering. If an attacker modifies even one byte of the encrypted content, decryption fails and reports an integrity error. This is the most secure PDF encryption available and should be used for high-security documents. Key derivation matters — The algorithm is only as strong as the password and key derivation. A 10-character random password with AES-256 provides genuine protection. A four-digit PIN with AES-256 is trivially brute-forced. PDF password crackers (ElcomSoft EPPR, hashcat mode 10500) use GPU acceleration to test millions of passwords per second.

Permission flags and what they control

PDF permissions are stored as a 32-bit integer in the encryption dictionary. The defined permission bits: Bit 3 — Print: Allow printing. If 0, compliant viewers refuse to print. Note: permissions-stripped copies ignore this. Bit 4 — Modify: Allow modifying document content (other than annotations and fields). If 0, editing is blocked in compliant viewers. Bit 5 — Copy: Allow text/image selection and copying. If 0, compliant viewers block clipboard copy. Screen readers may also be blocked (a significant accessibility concern — PDF/UA requires copy permission to be set). Bit 6 — Add annotations: Allow adding or modifying annotations and form fields. Required for filling forms in many viewer implementations. Bit 9 — Fill forms: Allow filling interactive form fields. Bit 10 — Copy for accessibility: Allow text extraction for accessibility purposes regardless of the Copy bit. Screen readers use this bit. Bit 11 — Assemble: Allow inserting/deleting/rotating pages and creating bookmarks. Bit 12 — Print high quality: Allow high-quality printing (if Print bit is set, this distinguishes draft vs full-quality print). Applying encryption with common tools: qpdf: qpdf --encrypt user_pass owner_pass 256 -- input.pdf output.pdf (uses AES-256 R6) Ghostscript: gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOwnerPassword=ownerpass -sUserPassword=userpass -dEncryptionR=6 -sOutputFile=out.pdf in.pdf Acrobat Pro: File > Properties > Security > Security Method: Password Security > configure passwords and permissions. Removing encryption: qpdf: qpdf --decrypt --password=userpass input.pdf output.pdf Ghostscript: open with -sPDFPassword=password and save without encryption.