Why is adding a native password to a PDF not trivial???......... - Page 1
Forum section: electronics / general

author: Smokey
author_rank: Super Contributor
timestamp: August 27, 2019, 11:46:10 pm
content: I have a person I'm working with that wants to pass around PDF documents and wants to use native PDF password system (instead of password protected zip or something). I through this would be trivial, but it's not. None of the typical big name free PDF viewers appear to have password creation capabilities. Open programs that can create PDFs like Libreoffice mangle existing PDFs when it tries to import them, which isn't acceptable.The last thing I want to do is pay Adobe a monthly subscription for just this, and online tools that you submit files to and they send you back a new file with a password are obviously not acceptable either.It looks like my best options are to either use a nagware tool like PDFMate, or buy some form of commercial PDF creator like Nitro or PDF Architect.Isn't PDF supposed to be a standard document format? Why would adding a native password be so hard?(As always, I welcome someone showing me I'm just being stupid and there is a much better solution)::EDIT:: I'm talking about user passwords to open the file, not master passwords to change permissions. Not that I think this changes much.

author: sleemanj
author_rank: Super Contributor
timestamp: August 28, 2019, 12:00:18 am
content: https://askubuntu.com/questions/258848/is-there-a-tool-that-can-add-a-password-to-a-pdf-file

author: rs20
author_rank: Super Contributor
timestamp: August 28, 2019, 12:00:49 am
content: https://unix.stackexchange.com/questions/187404/how-to-set-password-for-pdf-filesEven if you're using Windows or Mac, I imagine that these pdftk / qpdf tools have Windows builds available.

author: amyk
author_rank: Super Contributor
timestamp: August 28, 2019, 12:26:35 am
content: Quote from: rs20 on August 28, 2019, 12:00:49 amYes, I actually have a copy of qpdf... which I use more for removing passwords than adding them.I don't know about pdftk but qpdf is self-contained:https://github.com/qpdf/qpdf/releasesNot the most efficient or elegant code but it does the job and it's free and open source.Searching for PDF tools is probably one of the searches that is very likely to skew your perception heavily towards expensive and not-very-well-written crapware, because they're spammed heavily in the search engines. PDF itself is not trivial but not hard to write software to handle either, which is why there's so much of it out there.

author: soldar
author_rank: Super Contributor
timestamp: August 28, 2019, 11:56:27 pm
content: Have a look:https://www.easytechguides.com/password-protect-a-pdf-file.htmlIn general I believe pdf and Office-type documents' passwords are easy to crack and good encryption is the way to go.

author: amyk
author_rank: Super Contributor
timestamp: August 29, 2019, 01:32:37 am
content: Quote from: soldar on August 28, 2019, 11:56:27 pmThe earlier versions with "export" (i.e. 40-bit) encryption are very easy to crack, invented at a time when the US was significantly stricter with its laws around encryption and a Tera was considered impossibly huge. Now I have more bytes on my hard drives than will fit in a 40-bit counter...The later ones, especially 256-bit AES, are significantly harder to crack. That is, unless you're like a certain company who password-protected its "confidential" datasheets with the latest algorithm but used a 9-digit pure-numeric password... or perhaps that was the intent.

author: Someone
author_rank: Super Contributor
timestamp: August 29, 2019, 06:04:27 am
content: Quote from: rs20 on August 28, 2019, 12:00:49 amThe PDF handling from the built in libraries/applications on a Mac have surpassed most users needs, annotation, collation, encryption, etc all just there and built in. But like most things in the Mac world there are few configuration options and its not always obvious exactly what its doing (no idea which level of encryption its using).

author: Towger
author_rank: Super Contributor
timestamp: August 29, 2019, 07:28:45 am
content: Depends on what your doing. I once had to write a dll using one of the free libraries to add AES256 encryption to PDF files, as the program's existing report writer could only do RC4 and a customer was screaming about security etc.

author: tooki
author_rank: Super Contributor
timestamp: September 02, 2019, 10:59:04 pm
content: FWIW, on the Mac, you don't need a third party tool to password-protect a PDF. Here's a cut-and-paste of the help page:QuoteQuote from: Someone on August 29, 2019, 06:04:27 amYeah. I have no idea what it uses, either!

author: onesixright
author_rank: Frequent Contributor
timestamp: September 02, 2019, 11:47:32 pm
content: Quote from: tooki on September 02, 2019, 10:59:04 pmAccording to this page:Quotehttps://www.macintouch.com/forums/showthread.php?tid=1459