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.