Blog
How PDF Encryption Works, and What a Password Actually Protects
Owner passwords, user passwords, and the real strength (and limits) of PDF password protection.
When Adobe first added password protection to PDF in the mid-1990s, the encryption underneath it was weak enough that "protected" was mostly a suggestion — 40-bit RC4 could be brute-forced on consumer hardware within a reasonable timeframe even then. The format has been revised several times since, and a PDF encrypted today with AES-256 is a genuinely different animal from one locked with the original RC4 scheme. But the confusion people run into isn't really about cipher strength. It's that a PDF can carry two separate passwords that do two completely different things, and most tools that add "a password" only ever set one of them.
Two passwords, two jobs
The PDF spec defines a user password and an owner password, and they aren't interchangeable. The user password gates opening the document at all — no password, no rendered page, full stop. The owner password is different: it doesn't block opening the file, it sets a permissions bitmask stored in the document's encryption dictionary that tells a compliant reader which operations are allowed once the file isopen — printing, copying text, adding annotations, form-filling, and so on.
Here's the part that trips people up: if you only set an owner password and leave the user password blank, anyone can open the file with no password prompt at all. The permissions restrictions apply, but only insofar as the PDF reader chooses to honor them. That's the catch with the whole owner-password mechanism — it's enforced by the reader software, not by cryptography. A reader that ignores the permission flags (and several open-source libraries do, by design, since the flags are advisory once you already have the decryption key) will happily let you copy "protected" text or print a "no-printing" document. Owner-password restrictions are closer to a polite request than a lock.
What actually gets encrypted
Setting a user password is a different story, because it drives real encryption of the file's contents — not just a flag. Modern PDF encryption (revision 6, used with AES-256 in PDF 2.0 and widely supported since PDF 1.7 extension level 8) derives an encryption key from the password using a key-derivation function with multiple rounds of hashing, then uses that key to encrypt strings and streams throughout the document: the text content, embedded images, even some metadata. Object structure — the page tree, the cross-reference table — stays readable so the reader can navigate the file, but you cannot extract meaningful content without the correct key. That's a meaningfully different security property than the owner password's "please don't."
The strength of that protection is bounded by two things: the cipher (AES-256 is not the weak link in any realistic attack today) and the password itself. A six-digit numeric password has only a million possible values, and offline brute-force tools can test that space in seconds once they have the encrypted file. A long, random passphrase pushes the search space out of reach of any practical attack. The cryptography is only ever as strong as the weakest input someone types into it — which is true of essentially every password-based encryption scheme, not a PDF-specific flaw.
What a PDF password isn't protecting you from
A user password stops someone from opening the file in a compliant reader without the password. It does not protect the file's existence, its filename, or metadata that might sit outside the encrypted portions in older document versions. It does nothing once the file has been opened and decrypted — a screenshot, a printed copy, or a "save as unprotected" action in a reader that has already decrypted the content are all outside what encryption can address, because by that point the confidentiality boundary has already been crossed legitimately. If the actual goal is proving a document hasn't been altered, or that a specific person approved it, that's a different problem — digital signatures, not passwords, are the tool for that job.
None of this makes PDF passwords useless. For the common case — keeping a payslip, a medical record, or a contract from being casually opened by whoever happens to have the file, whether that's an email attachment sitting in a shared inbox or a document on a USB drive that gets lost — AES-256 with a decent passphrase is entirely adequate. It's the same threat model as locking a filing cabinet: it won't stop a determined, resourced attacker, but it stops casual access, which is what most people actually need. Setting that up doesn't require understanding key derivation functions; the Add Password to PDF tool on this site handles the encryption step directly, you just need to pick a password worth the trouble.
Choosing a password that matches the threat
If the goal is stopping a coworker from idly opening a file that landed in a shared folder, almost any password clears that bar. If the goal is protecting something genuinely sensitive against a motivated attacker who has a copy of the encrypted file and time to work with, the password needs to resist offline brute-forcing, which means length and randomness matter far more than symbol substitution tricks ("p4ssw0rd" is not meaningfully stronger than "password" against modern cracking tools). A twelve-plus character passphrase built from unrelated words holds up far better than a shorter password dressed up with punctuation, and it's easier to remember besides.
