Is there a way to set the config file to ensure that when decrypting messages it tries a particular private key first?
Setting a default key should force gpg to try it first. Add this to gpg.conf:
default-key <key ID>
In any case, testing all the keys should take less than a second. Here's what the decryption process looks like, along with the processing time:
$ time gpg -d anon_message.pgp
gpg: anonymous recipient; trying secret key [REDACTED] ...
gpg: anonymous recipient; trying secret key [REDACTED] ...
gpg: anonymous recipient; trying secret key [REDACTED] ...
gpg: anonymous recipient; trying secret key [REDACTED] ...
gpg: anonymous recipient; trying secret key [REDACTED] ...
gpg: okay, we are the anonymous recipient.
gpg: encrypted with RSA key, ID 00000000
gpg: encrypted with RSA key, ID 00000000
gpg: encrypted with RSA key, ID 00000000
It worked!
real 0m0.513s
user 0m0.508s
sys 0m0.004s
So, half a second in this case. It will take less time if the message has been decrypted with fewer keys, or you have fewer private keys to test, or it hits a match sooner.
Is there a way to get 2 without 1? I'm not keen on the ability to decrypt messages I encrypt to others.
If you don't encrypt the message with your key, then your key ID won't be in it. 2 is automatic without 1.
This may be a silly question astor but what's the difference between the version, greeting & comments.
All I can see that would fit the bill is
Version: GnuPG v2.0.17 (MingW32)
but that's just one line, the version. What is the comments & greeting line?
Comments are just that, you can make a comment about the message, yourself, whatever, but they are usually used to advertise for the PGP program, like this:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
The greeting is a splash screen with copyright info that looks like this:
gpg (GnuPG) 1.4.11
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Now why would you want to see that every time you run the program?