This question is well outside the realm of iText, but I'll give it a go:

Option 1:
When installing your program, have the user define a password.  Use this 
password to encrypt the properties file.

Heh... but someone could still hack your installer.  I suppose your installers 
could be one-offs with data unlocked through a registration code.  Use the 
registration code to decrypt the fixed server password, then encrypt it again 
with the user's password.

But the registration code and/or installer need to arrive in a secure fasion.  
Email ain't gonna cut it.  /Physical/ mail would (at least in theory).

Option 2: 
Only allow submission over an SSL connection.  No SSL -> no submission.

Option 3:
Some form of hackable obfuscation.  You could generate a password based on some 
property or properties of the user that the server will know about for 
example... but unless that information passes from server to client over a 
secure connection (SSL or something like it), you're going to be open to 
someone handy with a decompiler.


Or in more general terms:
A: Secure data on the client duplicated on the server.
B: Secure data communicated from server to client (or visa versa)
C: insecure data.

And option A has to involve B at least once.

Once you have a secure password, you don't need to use PDF security... you 
could just stuff the entire PDF through AES for example.

PS: If you're using PDF's security, you want to be setting the OPEN password, 
not the OWNER password.  The owner password is enforced at the whim of the 
opening application... there's nothing physically preventing an app from 
modifying things that have been 'disabled' under an owner password (copy/paste, 
print, whatever).

--Mark Storer
  Senior Software Engineer
  Cardiff Software

#include <disclaimer>
typedef std::Disclaimer<Cardiff> DisCard;



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Behalf Of bruno
> Sent: Wednesday, June 14, 2006 7:05 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Encrypted Pdf is secure - but how do I
> keep people from stealing my password ?
> 
> 
> java.jago wrote:
> 
> >>Based on your story I don't see any reason why the
> >>PDF should be encrypted. Don't encrypt the PDF and
> >>do all client-server communication using SSL.
> >>    
> >>
> >
> >Well, I thought about that - I have my self-written 
> ftp-upload manager 
> >in java. I don't know if I can easily extend it with SSL.
> >
> >Moreover, I wanted to use encryption - because there may be 
> cases, where 
> >SSL is no option.
> >
> If the end-user chooses the owner password,
> and you want the server to be able to open the PDF file,
> there is no other option than to send the password
> over the connection between the client and the server.
> Without SSL, this is not a safe solution.
> 
> If you want to choose the owner password,
> and you want this password to be used for
> creating a PDF on the client side, you can
> only protect this password 'psychologically'.
> Meaning you can obfuscate it, but a hacker
> will always be able to retrieve it.
> br,
> Bruno
> 
> 
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 


_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to