Determining the recipients of a encrypted file

Werner Koch wk@gnupg.org
Tue Feb 6 19:27:01 2001


On Tue, 6 Feb 2001, Bernhard Herzog wrote:


> Background: I want to extend the passphrase dialog to display the key id
> and user name of the key whose password has to be entered. There doesn't
> seem to be a way to determine the key for an ecrypted file at the
That is true and it might further be impossible to do itat all. GnuPG has a feature to suppress the key ID in the mesage and it has therefore to try each secret key in turn until it finds a suitable one. There are 3 ways to figure out the the key to be used: a) Do not provide a passphrase and gpg will tell you which key is needed. Then run it again with the correct passphrase. This is not bulletproof. b) Use --command-fd and look out for a passphrase request. Consult gpgme on how to do this. c) Don't care about this at all and let gpg-agent handle it. Because gpg-agent is not yet available for Windows and is still quite new, b) is the preferred method to pass the passphrase. Werner -- Werner Koch <wk@gnupg.org> GNU Privacy Guard (http://www.gnupg.org) Free Software Foundation Europe (http://www.fsfeurope.org) [Please see X-* mail header for OpenPGP key info]