Want to customise or change the message that get displayed in Password prompt in password protected PDF - pdf

Is there a way to customise or change the message that gets displayed in the document open Password dialog box while trying to open a password protected PDF file.
Default message - "filename.pdf is protected. please enter a Document Open Password."

The message shown is completely up to the PDF viewer or processor in question.
In general you cannot prescribe it but you may create your own viewer showing the text you prefer.
PS: As the OP still hoped for a different answer (and asked essentially a duplicate question here):
The PDF specification in regard to opening password protected PDF files only rules:
If a user attempts to open an encrypted document that has a user password, the conforming reader shall first try to authenticate the encrypted document using the padding string defined in 7.6.3.3, "Encryption Key Algorithm" (default user password):
If this authentication attempt is successful, the conforming reader may open, decrypt and display the document on the screen.
If this authentication attempt fails, the application should prompt for a password. Correctly supplying either password (owner or user password) should enable the user to open the document, decrypt it, and display it on the screen.
(ISO 32000-1 section 7.6.3.1)
It does not present any mechanism to supply a message for prompting for the password.
Please note that the specification even makes prompting for a password merely a recommendation ("should", not "shall"). Completely in accord with the specification, therefore, other ways to retrieve a password might be tried instead, or such password protected documents might be ignored completely!
That been said specific PDF viewers might allow to provide a prompting message in a proprietary manner; after all the early signing mechanisms in Adobe Reader even allowed the PDF to provide appearances for successfully and for unsuccessfully verified signatures which made frauds possible! I doubt, though, that current versions of serious viewers allow providing password prompt messages even in a proprietary way.

Related

Is there a way to remove the reading password from PDF file?

So, I have a few confidential PDF files that I need to open, but they are reading-protected (not sure if that's the term, I can't read them without the password). I don't know this password. Is there any way to either remove/bypass this password or are there any tools for brute-forcing it?

What different options for password protection does PDF support?

In pdftk I can see three options:
1$ pdftk input.pdf output protected-userpw.pdf userpw very_secret
2$ pdftk input.pdf output protected-ownerpw.pdf ownerpw very_secret
3$ pdftk input.pdf input_pw very_secret output protected-input.pdf
When I open protected-ownerpw.pdf and protected-input.pdf I am not asked for a password. Only protected-userpw.pdf gives the expected result. What does ownerpw and input_pw do?
I use qpdf to create unprotected files from protected ones. Now I wonder if this always works. Which password protection mechanisms does the PDF format support? and what qpdf supports.
Owner and User password different meanings
In a PDF document you can set security rights, as
printing allowed
copying text allowed
filling out formfields allowed
...
These are actually only flags inside the document and it is up to the pdf viewer, if it obeys them or not.
When you set only an owner password, the user password is automatically set to empty. The PDF file is becoming still encrypted (all streams and strings will be saved in encrypted form), but it can be decrypted with the empty password. So you can open the PDF without any password input, but once opened you have only the rights to do something with the document, as specified in the security rights.
So maybe he is not allowed to print the document.
When you set an user and owner password somebody who opens the PDF needs to specify either the owner or user password during opening. If he has specified the user password, his security rights are according to the security settings in the pdf. If he has used the owner password, he gets all security rights granted.
PDF encryptions
There are many different encryption algorithms supported in the PDF. RC4 or AES with an encryption key length of 40 up to 128 and also user defined algorithms, which aren't covered inside the pdf specification. In recent extenstions to PDF 1.7 specification (extension level 3) also AES 256 was specified. In a later extension there was an update specified, which modified AES 256 a bit and fixed a theoretical security hole. Several tools still have a problem regarding these last extensions (but i don't know about qpdf).
These extensions are all available inside the normal pdf specification in the ISO specification of PDF 2.0, which was released today.

Can I sign arbitrary PDFs through DocuSign without preparing signature fields?

Use case: My system needs to retrieve authorization forms from a variety of sources. There is no standard form - each source may define their own authorization form, but each authorization form requires exactly one signature. None of the blank forms will have PDF signature field markup - they will just be simple PDFs originally meant for printing and wet signing. For example, every summer camp in the country has their own release form. My system will receive those forms and present them for signature, without knowing what the form looks like ahead of time.
This means I will not have the chance to mark up the form with DocuSign "Sign Here" boxes.
Is it possible in DocuSign to have a system send in a form and allow the signer to manually determine exactly where they want to place their signature? Without giving the signer duties such as preparing the document themselves - I just want them to see the form on screen, and be prompted to "Click wherever you think you should sign", just like they would do in the paper world.
You can use DocuSign free form signing for your usecase.
See this DocuSign Blog Post for more information.
Free-form signing occurs when no tags are placed on a document submitted via DocuSign. This means that the signer will be presented with a palette of signature options (Signature, Initial, Full Name, etc.) which can be applied to the document at will.

how do password protected files work?

I was looking at an app on blackberry app world to create pdf files and that app claims to be able to password protect the files. How does one password protect a file. Isn't the code to read the file available, thus the password will be useless if the program decides not to check the password?
In addition to the other answers (which focus on encryption of arbitrary files) here an answer focusing on encryption of PDFs which was the use case initially startling the OP:
The PDF standard (ISO 32000-1) describes in section 7.6 how PDFs shall be encrypted in a manner that keeps the file structure of a PDF while hiding the content. PDFs are built from numerous objects (numbers, strings, arrays, dictionaries, streams, references, ...) and the mechanism described by the specification essentially only encrypts strings and stream contents.
Just like in the generic case described e.g. by #Mark, these encrypted string and stream contents are merely a bunch of random-looking data and have to be decrypted before the PDF can be displayed, but the remaining objects are unencrypted allowing PDF viewers and editors to recognize the file as a PDF.
Furthermore the PDF specification allows for two basic encryption types, by
a user password which anyone has to enter who wants to use the PDF in any way, and
an owner password which only needs to be entered for a configurable set of uses of a PDF (e.g. printing or editing) but not for merely viewing it.
Encryption using the latter kind of password obviously can be circumvented: After all, if you can view the PDF, you can extract all the data and do essentially what you want with unless your software co-operates with the scheme and forbids you to. And, obviously, not all software does co-operate.
Essentially the owner password mechanism stores a value in the PDF derived from the password which is sufficient to decrypt the encrypted data but does not allow for easy calculation of the original password.
Assuming the app is competently written, the .pdf file is encrypted using the password to derive the encryption key -- that is, the file is not, properly speaking, a .pdf file until it gets decrypted. Before that, the file is merely a bunch of random-looking data, and the program does not know what the decryption key is until you enter the password.
If done correctly a password protected file will be encrypted with an algorithm that needs the original password to undo the encryption. The password is used to initialize the encryption/decryption process and is not stored in the file. If you give the wrong password the decryption will not work and there is no way for the program to know the correct decryption key (except doing a brute force attack).

Reading a password protected pdf through application

I have requirement to show the pdfs to the users via asp.net application. These pdfs are password protected using iTextSharp. The password is known within the application but not to the users. Lets say password is saved in a table for each file. I want to display the pdf to users without asking for the password from them or letting them to know the pdf. Is there anyway to do this?
UPDATE
My requirement is to protect those pdf files from others who has access to the destination folder (where pdfs are uploaded) by putting password protection.
If you want to give people access to these PDFs you either need to give the users the password or remove the password. That's the only two options. The last option can be implemented in several ways, however. For instance, you could JPG the PDFs which would obviously remove the password. You could also apply a NULL userPassword which would allow people to open but not edit the PDFs. Both of these things you could do on the fly and serve a dynamic PDF if needed.
If I'm not understanding you correctly explain a little more and we'll try to help you.
With the PDF format, there are two types of password: user and owner password.
You can use a tool like PDFTK to rebuild your PDF using only an owner password and disallowing any authoring operation.