learning which symmetric cipher via --status-fd when --decrypting

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Feb 3 08:28:05 CET 2011


Hi GnuPG folks--

is there a way to get information about which symmetric cipher was used
on an encrypted message when decrypting?

for example:

< test.pgp gpg --decrypt --batch --status-fd=2 >/dev/null

yields:

> [GNUPG:] ENC_TO C61BD3EC21484CFF 1 0
> [GNUPG:] USERID_HINT C61BD3EC21484CFF Daniel Kahn Gillmor <dkg at fifthhorseman.net>
> [GNUPG:] NEED_PASSPHRASE C61BD3EC21484CFF CCD2ED94D21739E9 1 0
> [GNUPG:] GOOD_PASSPHRASE
> gpg: encrypted with 4096-bit RSA key, ID 21484CFF, created 2007-06-02
>       "Daniel Kahn Gillmor <dkg at fifthhorseman.net>"
> [GNUPG:] BEGIN_DECRYPTION
> [GNUPG:] PLAINTEXT 62 1296717746 
> [GNUPG:] PLAINTEXT_LENGTH 5
> [GNUPG:] DECRYPTION_OKAY
> [GNUPG:] GOODMDC
> [GNUPG:] END_DECRYPTION


if i add --verbose, i get additional info, but i think that's from the
--logger-fd, not --status-fd:

> [GNUPG:] ENC_TO C61BD3EC21484CFF 1 0
> gpg: using subkey 21484CFF instead of primary key D21739E9
> [GNUPG:] USERID_HINT C61BD3EC21484CFF Daniel Kahn Gillmor <dkg at fifthhorseman.net>
> [GNUPG:] NEED_PASSPHRASE C61BD3EC21484CFF CCD2ED94D21739E9 1 0
> gpg: using subkey 21484CFF instead of primary key D21739E9
> [GNUPG:] GOOD_PASSPHRASE
> gpg: encrypted with 4096-bit RSA key, ID 21484CFF, created 2007-06-02
>       "Daniel Kahn Gillmor <dkg at fifthhorseman.net>"
> [GNUPG:] BEGIN_DECRYPTION
> gpg: AES256 encrypted data
> gpg: original file name=''
> [GNUPG:] PLAINTEXT 62 1296717919 
> [GNUPG:] PLAINTEXT_LENGTH 5
> [GNUPG:] DECRYPTION_OKAY
> [GNUPG:] GOODMDC
> [GNUPG:] END_DECRYPTION


is there a way for a program that parses --status-fd to get this
information, or does the program need to parse --logger-fd as well to
find this out?

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1030 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20110203/c54c2525/attachment-0001.pgp>


More information about the Gnupg-users mailing list