auto sign files

Mark Ivs markivs2003 at yahoo.com
Sun Jan 16 19:06:44 CET 2005


Neil,
Thank you for your detailed explanation of why it's
very bad idea to sign it using a script.
I am going to present the concerns to people involved
and let them be fully aware of the risks. My guess is
they are going to tell our customer that since this is
an automated process, we can only encrypt it but not
encrypt & sign.

Earlier, I was thinking auto signing files was
possible in a secure way after reading the
documentation in the link below.
http://www.gnupg.org/(en)/documentation/faqs.html#q4.14
Is that FAQ question about auto-signing keys or
auto-signing files? Can you please clarify?

> If you want to 
> sign automatically, use a non-personal key that
> doesn't have ANY passphrase set.
What does that mean?

> 2. as a script - in which case use a separate key
> and advise your customer 
> that the signature is worse than useless should your
> machine be compromised. 
Now that I understand the risks involved, I wouldn't
use a script to auto sign files.
But still I am curious to know how you would do it.

Btw, I don't have my passphrase on a post-it note :)

Thanks again.
-M


--- Neil Williams <linux at codehelp.co.uk> wrote:

> On Sunday 16 January 2005 5:11 am, Mark Ivs wrote:
> > Hello,
> > I have the following line in my perl script that
> signs
> > and encrypt files.
> 
> Signing is a personal act, that's why it requires a
> passphrase. If you want to 
> sign automatically, use a non-personal key that
> doesn't have ANY passphrase 
> set. You cannot trust any machine to sign FOR you,
> recording the passphrase 
> in any form of script is simply insecure. There is
> no difference between 
> using a passphrase in clear text in the script and
> using no passphrase at 
> all! You wouldn't consider a key without a
> passphrase as secure - why do you 
> think storing the passphrase in clear text is going
> to be OK?
> 
> (Or do you keep your current passphrase on a post-it
> note on your monitor for 
> everyone to read?)
> :-)
> 
> You said nothing all through this about automating
> this process - you've 
> talked only of signing files manually. It's a
> completely different issue.
> 
> 1. You cannot sign a personal signature
> automatically (because you have to be 
> there).
> 2. Any machine operated signature isn't worth
> verifying because the script 
> will sign anything it's told to sign.
> 
> A signature made by a script doesn't verify anything
> - it just means that the 
> script is functioning. Anyone with authorised or
> unauthorised access to the 
> machine can sign the files - no matter what they
> contain.
> 
> You're not even doing this on a secure system, it's
> Windows! You have no idea 
> if that box is already compromised. There could be
> someone with a trojan 
> already available who could put their own files on
> that box and the script 
> would sign the files!!! You'd be sending your
> customer a signed and encrypted 
> TROJAN! Best of all, the attacker would have
> absolute anonymity because he'd 
> be putting files on YOUR machine and using YOUR key!
> 
> Explain to your 'customer' - the choices are:
> 1. Files are only encrypted, not signed at all.
> 2. Files are signed with a machine-only worthless
> signature.
> 3. Files are only released when you are awake.
> 
> Any other option is untenable and explain why. Don't
> accept a customer who 
> would be happy with the attack described above -
> s/he will quickly blame you 
> if it happens and their machines get attacked via
> your poor signature 
> process. If there's money involved, it's imperative
> that you do not open 
> yourself to this risk - by not signing any files
> automatically - or s/he will 
> have every reason to sue you for negligence. Do you
> have that kind of money?
> 
> A signature made by a machine cannot be trusted
> because the key cannot be 
> trusted - the machine will sign everything that is
> thrown at it.
> 
> We've had this discussion before about the GD -
> people's trust models vary but 
> that's mine.
> 
> If you can't sign the file personally, don't sign
> the file at all.
> 
> How often are these files changing? What on earth
> are you actually doing?
> 
> > The problem is I need to run my perl script as a
> batch
> > file through Windows NT scheduled task,
> 
> Why not make it easier for an attacker to find the
> passphrase by putting the 
> passphrase and the secret key on your home page?
> This is NOT a secure way of 
> using a key!
> 
> > which is 
> > scheduled to run few times a day.
> 
> Then change the schedule. I do this every day - I
> let the script do everything 
> up to the point where a signature is required for
> the final file. Then it 
> waits and only proceeds if the signature file can be
> found and verified.
> 
> Verifying a signature doesn't require the
> passphrase, just the public key.
> 
> You can be notified or reminded by email, even SMS
> if you configure it (and 
> pay for it IIRC).
> 
> > That means I cannot 
> > manually type the passphrase everytime. So, I was
> > wondering if there is a way to enter the
> passphrase in
> > the above gpg command itself. Or is there any
> other
> > solution to this problem?
> 
> Not securely.
> 
> > I believe others must have 
> > ran into this issue before, since it looks like a
> > common problem.
> 
> Only for those who don't have a clear understanding
> of security and the 
> reasons for signing files.
> 
> Decide clearly whether you want to sign these files
> :
> 
> 1. as a person - in which case YOU need to be there.
> OR
> 2. as a script - in which case use a separate key
> and advise your customer 
> that the signature is worse than useless should your
> machine be compromised. 
> 
> Naturally, you would assure your customer you would
> make every effort to 
> prevent such an attack but that you cannot guarantee
> that the machine has NOT 
> been attacked when the automated signature is made
> (because you won't be 
> logged in at the time to check).
> 
> The customer MUST be clear that this would be a
> MACHINE signature and it has 
> NO correlation with you as an individual - or any
> other individual. You 
> cannot be held personally responsible for the
> content of the signed files. 
> (So what's the point?)
> 
> If they are willing to accept that, they have only
> themselves to blame. To me, 
> such signatures are worse than useless.
> 
> -- 
> 
> Neil Williams
> =============
> http://www.dcglug.org.uk/
> http://www.nosoftwarepatents.com/
> http://sourceforge.net/projects/isbnsearch/
> http://www.williamsleesmill.me.uk/
> http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
> 
> 

> ATTACHMENT part 1.2 application/pgp-signature 
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250



More information about the Gnupg-users mailing list