AES-256 Encryption in Practice
Modern protection uses the Standard security handler at revision 6 with AES-256 and separate user and owner credentials. The file key is random; each password wraps it, so either credential recovers the key, but only the owner password can change permissions in a compliant editor. Revision 4 with AES-128 remains common, while RC4 should be treated as obsolete.
The /P mask controls printing, modification, copying, annotation, form filling, accessibility extraction and assembly. The bits are not fully independent in every viewer: form filling has its own bit, yet some viewers treat it as part of annotation rights, and a cleared print bit can also block high-quality printing. Test the output in two viewers because enforcement varies.