BASALT · JOURNAL
How to password protect a PDF on a Mac, and what the password actually does
A PDF can carry two completely different passwords, and only one of them protects anything. Most people set the wrong one, believe the file is secured, and send it anyway.
This post covers what encryption in a PDF actually is, the difference between a user password and an owner password, and what permission flags are worth.
The two passwords
The user password is the open password. Without it, a reader cannot decrypt the file's streams and strings, so it cannot render a single page. This is real cryptography. If you set a user password and lose it, the content is gone.
The owner password is the permissions password. A file with only an owner password opens for anyone, with no prompt at all, because the document is encrypted with a padded default value rather than a secret. It exists only to gate changes to the restriction settings.
That is the distinction that matters. A user password controls whether the document can be read. An owner password controls nothing except which flags are set in a dictionary that any capable reader is free to ignore.
What permission flags are, and why they are advisory
When you check boxes to disallow printing, copying, extraction for accessibility, form filling, or assembly, you are setting bits in the /P field of the encryption dictionary. That is it. The bits are integers in a dictionary inside the file.
Honoring them is a convention. A conforming reader is expected to grey out Print when the print bit is clear, and mainstream readers do. But the file is already decrypted at that point, since the reader opened it without asking for anything, and nothing prevents software from reading the flags and proceeding regardless.
So "printing restricted" is a label, not a lock. If a document must not be printed by a determined recipient, a PDF permission flag will not achieve that.
The encryption itself
Several algorithms appear in the wild, and the revision of the security handler tells you which. RC4 at 40 bits is the original scheme, obsolete, with a key space small enough to be the problem on its own. RC4 at 128 bits is better, but RC4 is deprecated. AES-128 arrived with the crypt filter mechanism and is still common. AES-256 is the current scheme, with key derivation that no longer runs the password through the old MD5-based routine, and it is what a modern tool should write by default.
Two things hold for all of them. Encryption applies to streams and strings, not to the file structure, so object numbers, the cross-reference table, and the general shape of the document stay visible. And the strength of AES-256 is bounded entirely by the password you choose. A four-character password behind a modern cipher is a four-character password.
Practical choices before you send a file
Pick a user password if the content genuinely should not be readable by anyone who obtains the file. Accept the consequence: the recipient needs the password, out of band, and if it is lost the document is unrecoverable.
Do not rely on an owner password for confidentiality. It creates a file that opens instantly for everyone while displaying a lock icon that suggests otherwise, and that gap changes how carelessly the file gets forwarded. Transmit the password over a different channel than the document, since a password in the same email thread protects against nothing except a misaddressed attachment.
And understand what encryption does not do. It does not remove anything. Metadata, hidden layers, annotations, form values, and any text sitting under a black rectangle are all still there, encrypted along with everything else, and fully available the moment the recipient opens the file. Encryption controls who reads the document; it does not control what the document says. If material needs to be gone, it has to be removed before encryption, which is a different operation covered in how to redact a PDF on a Mac and removing metadata from a PDF.
Encryption and the rest of the document
An encrypted PDF still holds its full Info dictionary and XMP packet, including author name, original file path, and edit history. Those decrypt with everything else, as does an OCR text layer, which stays searchable and extractable for the recipient.
Encryption and flattening are unrelated. If a form's field values need to stop being separately readable, that is flattening, described in what flattening a PDF actually does. Applying a password also re-writes the file, and a tool that appends an incremental update instead of writing a fresh generation can leave earlier, unencrypted revisions in the bytes.
Frequently asked questions
How do I password protect a PDF on a Mac?
Use a PDF tool that writes an encrypted copy with a user password, which is the password required to open the file. Preview can export a password-protected PDF through the File menu's export dialog by checking the encryption option and entering a password. Whatever you use, confirm you are setting an open password rather than a permissions password, because only the open password stops someone from reading the document.
What is the difference between a user password and an owner password?
A user password is required to open and decrypt the document, while an owner password only controls who may change the permission settings. A file with only an owner password opens for everybody with no prompt, and its restrictions on printing or copying are advisory flags that software can ignore. If you want the file to be unreadable without a password, you need a user password.
Can someone bypass PDF printing and copying restrictions?
Yes, easily, because those restrictions are bits in the encryption dictionary rather than cryptographic controls. When a file carries only an owner password, any reader can decrypt it without a secret, so honoring the permission flags is purely a matter of software convention. Mainstream viewers respect them, and plenty of other tools do not. Treat permission flags as a courtesy signal, never as protection.
Which encryption should I choose for a PDF?
Choose AES-256 if the tool offers it, since it is the current scheme and uses modern key derivation. AES-128 is acceptable for compatibility with older readers. Avoid RC4 at either 40 or 128 bits, because RC4 is deprecated and the 40-bit variant is trivially weak. Remember that the cipher only matters up to the strength of the password you pick.
Does password protecting a PDF hide its metadata?
No, encryption conceals the document from people without the password but changes nothing for people who have it. The Info dictionary, XMP packets, author name, original file path, edit history, hidden layers, and any content sitting under a black rectangle all decrypt along with the pages. If something must not reach the recipient, remove it before you encrypt, because a password protects the file in transit, not from its reader.
What happens if I forget the password to my own PDF?
The document is unrecoverable through legitimate means if it was a user password, because the content is genuinely encrypted and there is no maintenance key or recovery path in the format. Recovery services work by guessing passwords, which is slow, uncertain, and usually involves uploading your file. Store the password in a password manager at the moment you set it, alongside the file name.
Should I password protect a PDF or redact it?
Redact it if specific information must not reach the reader, and password protect it if the whole document should not reach unauthorized people. The two solve different problems and are frequently confused: a password stops the wrong person opening the file, while redaction removes content so that even the right person cannot see it. Sensitive documents often need both, in that order.
Doing it in Basalt
Basalt adds a password to a PDF as one of its eighteen tools, writing a new encrypted file and leaving your original untouched. Everything runs in a sealed engine process with no network entitlement, enforced by macOS at the code-signature level, so the document and its password never leave your Mac. The same window handles redaction that destroys content rather than covering it, metadata cleanup, form flattening, and password removal when you have the password. It is $29 once for up to three Macs, free for 24 hours, at basaltformac.com.
Redaction that proves itself
Basalt destroys the content you mark, then re-opens the file it wrote and proves the content is gone before it saves anything. Your documents never leave your Mac.