Skip to content
documentflare
Privacy

PDF Passwords: What Encryption Really Does (AES, RC4 and the Honest Limits)

AES-256, AES-128 or RC4? How to check a protected PDF's real algorithm, why password encryption doesn't do everything, and why Document Flare always produces AES-256.

This page contains affiliate links: we may earn a commission if you use them, at no extra cost to you. This does not influence our recommendations. As an Amazon Associate, we earn from qualifying purchases.

Table of contents

A PDF password is not a single security level

Encrypting a PDF with a password locks access to the file — it doesn’t necessarily harden the content. Yet many tools display “AES-256” as if it were a universal label. Reality is more nuanced: with default implementations, the source document’s version can determine the resulting algorithm — RC4 40-bit, RC4 128-bit or AES-128. We document that gradation — because a misidentified encryption gives false assurance — and explain why Document Flare systematically forces the strongest revision.

YubiKey 5 NFC — FIDO2 security keyYubiKey 5 NFC — FIDO2 security keyHardware two-factor authentication: phishing-proof sign-in for sensitive accounts.affiliate

Why the AES-256 advertised everywhere is often wrong

The PDF standard does not define one encryption. It defines several revisions:

  • revision 2: RC4 with a 40-bit key (PDF 1.3 and earlier);
  • revision 3: RC4 with a 128-bit key (PDF 1.4 / 1.5);
  • revision 4: AES with a 128-bit key in CBC mode (PDF 1.6 / 1.7);
  • revision 5: AES with a 256-bit key, reserved for PDF 1.7 Extension Level 3.

A classic PDF 1.7 file — the most common case today — will therefore be encrypted as AES-128 by an implementation that follows the document’s declared version, not AES-256. When a tool advertises “AES-256” without explicitly forcing revision 5, it is often simplifying its marketing.

How to verify what a tool really does

PDF stores its encryption parameters in an /Encrypt dictionary. You can inspect it with technical tools:

  • qpdf --show-encryption file.pdf displays the algorithm, key size and permissions;
  • pdftk file.pdf dump_data gives indications about the protection;
  • advanced PDF readers or Python libraries (pikepdf, PyPDF2) expose the /V, /R, /Length and /CF entries.

What to look for:

  • /V = 1 and /R = 2 → RC4 40-bit;
  • /V = 2 and /R = 3 → RC4 128-bit;
  • /V = 4 and /R = 4, with /CF/StdCF/CFM = /AESV2 and /Length = 128 → AES-128;
  • /V = 5 and /R = 5, with /AESV3 and /Length = 256 → AES-256.

If a tool promises AES-256 without forcing revision 5, check the result’s /Encrypt dictionary — the label may be marketing only.

The real level in Document Flare: forced AES-256

Document Flare uses the @cantoo/pdf-lib library to encrypt and decrypt in the browser. By default, this library picks the algorithm according to the source PDF’s declared version — with the gradation described above. Document Flare does not stick to that default: when writing, the tool declares the PDF 1.7 Extension Level 3 profile, which systematically selects revision 5 — AES-256 (AESV3).

Concretely: even if your source document is an old PDF 1.4, the protected file that comes out is AES-256 encrypted. You can verify it yourself with qpdf --show-encryption: you will read /V = 5, /R = 5, /CFM = /AESV3, /Length = 256.

What the password protects — and doesn’t

Password encryption protects opening the file. Without the password, the content stays unreadable — in theory. In practice, resistance depends heavily on the password itself: “123456” or the company name fall in seconds, even with AES-128.

What the tool does not do, as it stands:

  • it does not restrict copy / print permissions; the entered password serves as both user password and owner password;
  • it does not encrypt the document metadata separately;
  • it is not an electronic signature: it only proves that whoever holds the password can open the file.

If you need to make information unrecoverable, password encryption is not enough: you must redact the sensitive area before protecting the file.

Limits and pitfalls

  • Weak password = weak protection. Prefer a long passphrase, even one that is easy to remember.
  • RC4 40-bit should raise alarm. If you receive a protected PDF dating from before PDF 1.4, its protection is now considered obsolete; re-encrypt it as AES-256 before relying on it.
  • An already-encrypted PDF cannot be re-encrypted. The tool rejects protected PDFs; unlock them first with the password in the Unlock PDF tool.
  • Size and pagination are capped. The tool accepts up to 50 MB and 1,000 pages.
  • Short passwords are flagged. The interface shows a warning if the password is under 6 characters.
  • Forgetting the password means losing the document. No backdoor is kept; processing is entirely local.

Honesty as differentiation

Many tools ride on the AES-256 label. We prefer to state precisely which algorithm is applied and under what conditions. An informed user chooses better: they know when to add a redaction step, when to avoid RC4, and when to send the password through a separate channel.

If you want to protect a PDF without sending it to a server:

And if you need to remove a protection you legitimately own:

The right hardware

YubiKey 5 NFC — FIDO2 security keyYubiKey 5 NFC — FIDO2 security keyHardware two-factor authentication: phishing-proof sign-in for sensitive accounts.affiliate Thetis Pro — FIDO2 security keyThetis Pro — FIDO2 security keyBudget NFC + USB-C alternative for two-factor authentication.affiliate