On Wed, 18 Jul 2007 16:48:59 +0530, Manoj wrote: > Would like to know whether the encrypted & password protected PDF files are > hack proof. Once encrypted will anybody be able to crack the password > easily?
The password itself is pretty safe. As far as I know, the easiest way of getting the password is brute force (try passwords until you find it). Getting content from the PDF, on the other hand, is easier in some cases. So, if you use the password for different things, it will still be safe although your users have unprotected their PDF files ;-) Any scheme that uses only the Owner Password and an empty User Password (i. e. everyone can open the document but Adobe Reader does not allow you to print it) is "easy" to circumvent. The only protection of this scheme is the fact that for getting the PDF specification from Adobe you have to agree that you do not try to circumvent its protection features (plus the fact that PDF files got quite hard to parse nowadays, but you can of course use itext's parser to avoid that). In fact, it takes less than 20 lines of code to write a program using iText that creates an unprotected version from any PDF protected that way (This is similar to spreadsheet protection in MS Excel). Elcomsoft sells/sold products to do so, and they also provide/provided a service to unprotect single PDF files for a fee. Of course, I will not post code to the list how to do that (and I won't unprotect PDF files for a fee either), because I do not want to get sued by Adobe. :-) If you use a user password as well (that is needed by the user to open the PDF), at least all texts and images in the PDF will be encrypted (maybe, depending on the PDF version and your settings, more). It might still be possible to extract metadata like the number of pages from an encrypted PDF, but no actual content. On the other hand, if your users do not use Adobe Reader but other products to view the PDF, please note that some of them cannot open PDF files encrypted that way. In that case, it might be a better idea to use some strong file encryption (like TrueCrypt or PGP) around your PDF files instead of using a password. If someone knows the User password, he can (like in the case where the user password is empty) use it to create an unprotected PDF file, so the only disadvantage of another encryption method is that your users need the program to decrypt it (but you can use self-decrypting archives if your users all use Windows). The main use for encrypted PDFs is to show that you dislike this file to be printed/copied/whatever and it might be illegal to do so. Michael ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
