Are PowerPoint and PDF files encrypted or just locked?

1

2

I've seen PDF files that are locked so that one cannot copy text from it, but can highlight it. I've tried several PDF readers (some of which open source) and all of them respect the lock. Is it a form of encryption? If yes, how can I select text, but not copy it? Or is it just a lock that relies on readers abiding it?

Same question for locked .ppt files. I can't even open them with OpenOffice. With Powerpoint I can open them as "read only".

Again, is the content really encrypted? If yes, how can I select text, but not copy it? How is the information encrypted, but visible and selectable? I imagine if it was encrypted, it shouldn't be selectable, but should be blended into the page, like an image.

So, is it an access password, like in Windows log in, that doesn't matter if you boot from another drive? Or is it actual encryption, where one shouldn't be able to bypass?

Kiwi

Posted 2015-02-10T23:11:30.037

Reputation: 13

Answers

2

If you cannot read it without providing a password, then it's encrypted. (That said, earlier Office and Acrobat versions used to have really weak algorithms. Modern versions tend to use AES.)

If you can read it without a password, but must provide a password to modify, then the file is merely locked. Depending on the format, it might be enough to just flip a bit with a hex editor, or to modify the reader itself; e.g. Evince has a setting to ignore PDF restrictions. (But see below↓.)

  • (There is a slight possibility that the password was used for authentication/integrity checks as well, using some hash, though I can't remember any scheme that would allow verification without knowing the password, so that's probably unlikely.)

But, don't forget that the author might have simply embedded an image of the text, instead of text itself. Maybe the PDF came out of a scanner. Maybe it's not a PDF but a PostScript .ps document, which is somewhere halfway between text & image.


↓This bit, however...

I imagine if it was encrypted, it shouldn't be selectable, but should be blended into the page, like an image.

...is partly nonsense, but partly an interesting idea.

On the one hand, encryption doesn't change the way data works. If you encrypt a text document (e.g. a PDF file), then decrypt it, you get the exact same bytes back – you get the original document, not a flat image of it.

That said, it could work this way – the document could easily have two versions embedded in it; a rendered image readable by anyone, and an encrypted original readable (and therefore modifiable) only with a password. To modify the document, you would need to decrypt the original, edit it, and render into the image again.

I know Office documents don't do this – the modification password is just a lock. I'm less sure about PDF.

But I also doubt it, since this double-document scheme does have a major loophole: someone could still photoshop the image directly, and since the original is encrypted, this would be impossible to detect.

user1686

Posted 2015-02-10T23:11:30.037

Reputation: 283 655

1

My recollection from reading the PDF specs long ago was that readers are expected to abide by password restrictions but the specs provided enough information to let them ignore it.

PPT passwords are similar to PDF ... there's a bit of data in the file that tells the PowerPoint app "Ask the user for a password before opening this file." The data in the file isn't encrypted.

Steve Rindsberg

Posted 2015-02-10T23:11:30.037

Reputation: 4 139