How know who is a file encrypted for ?
vedaal at hush.com
vedaal at hush.com
Wed Feb 27 18:00:59 CET 2008
vedaal at hush.com vedaal at hush.com
wrote o Wed Feb 27 15:51:05 CET 2008
>What I meant, was something like this mockup:
==============
>C:\>gpg --recipient-keys ENCRYPTED_FILE.gpg
>gpg: file ENCRYPTED_FILE.gpg was encrypted to the following keys:
actually, gnupg already does this when decrypting,
but only after the passphrases are entered incorrectly for each key
in the example i posted,
here is the gnupg output after intentionally giving the wrong
passphrases for each of the keys:
gpg: Invalid passphrase; please try again ...
You need a passphrase to unlock the secret key for
user: "cccc1 <cccc1 at key.test>"
2048-bit RSA key, ID 756C91DE, created 2005-12-01
:encrypted data packet:
length: 90
mdc_method: 2
gpg: encrypted with 2048-bit RSA key, ID 756C91DE, created 2005-12-
01
"cccc1 <cccc1 at key.test>"
gpg: public key decryption failed: bad passphrase
gpg: encrypted with 1024-bit ELG-E key, ID F0E74948, created 2002-
01-15
"boo <boo at key.test>"
gpg: public key decryption failed: bad passphrase
gpg: encrypted with 2048-bit RSA key, ID 495CA15B, created 2005-12-
01
"bbbb1 <bbbb1 at key.test>"
gpg: public key decryption failed: bad passphrase
gpg: encrypted with 2048-bit RSA key, ID F9015496, created 2005-12-
01
"aaaa1 <aaaa1 at key.test>"
gpg: public key decryption failed: bad passphrase
gpg: decryption failed: secret key not available
c:\gnupg>
so,
a simple workaround to see which keys a message is encrypted to,
is to just type:
gpg filename
and press the 'enter' key quickly and repeatedly until gnupg gives
the 'failed decryption' message, and lists all the keys
(also not too hard to live with ... ;-) )
vedaal
any ads or links below this message are added by hushmail without
my endorsement or awareness of the nature of the link
--
Need cash? Click to get a cash advance.
http://tagline.hushmail.com/fc/Ioyw6h4dP5JPpivsACr8uRGuNoIGIPHVi2hu11IoWuXXcqfw85CjFt/
More information about the Gnupg-users
mailing list