Hacker News
points by philsnow 1 day ago | 0 comments
It's so insane to have PDF programs doing their own encryption, not because "don't roll your own crypto" (although yes for that reason too), but because the people who write PDF programs (libraries, viewers, general-purpose tools like qpdf, etc etc) aren't (necessarily) going to be great at understanding or designing good encryption UX.

Also, I get that a lot of sensitive information is exchanged with PDFs these days, but why should PDFs have encryption built-in to the file format? Sensitive information is also exchanged in image files, word documents, zip files, html, etc etc etc etc. If you take all the work that goes into making the crypto UX decent for one kind of file and apply that to "all files", then each ecosystem doesn't have to invent their own.

This is just like "high-end" car manufacturers insisting on making their own software, and not integrating apple carplay. They're either going to make a truly shitty podcast app, or they're not even going to bother and instead tell people to use bluetooth to listen to podcasts like it's 2006.

[–] dingaling 21 hours ago
> but why should PDFs have encryption built-in to the file format?

Because very few 'end user' people know how to use en/decryption. So it's much easier to send them a familiar file and say 'enter this password' than to have them searching the web to work out which arguments to pass to openssl. In a command line? What's that?

I received an AES-encrypted file recently but neither gnupg nor openssl could determine what mode and keysettings the sender had used, so it was just a useless lump of data. Very secure though...

[–] 1718627440 1 hour ago
This should simply be an option in the context menu of the file manager. (And is on my Linux machine)
[–] lmz 21 hours ago
Usually the desire is for some of the metadata processing to be reusable between the encrypted and non encrypted formats ("like a regular file, just this data is encrypted"). This is also why eg. Zip files are encrypted per entry, not globally.

Since the kind of data people want available may differ for each file format, here we are.

[–] otabdeveloper4 15 hours ago
> but why should PDFs have encryption built-in to the file format?

So you could open encrypted documents on iOS and Android.

[–] GoblinSlayer 21 hours ago
S/MIME?
[–] Avamander 13 hours ago
CDOC2, there are also other similar widely used encrypted container formats.