Menu

Determine cipher/ digest of an encrypted/ signed mail

2013-08-02
2013-08-06
  • Jan Winkler

    Jan Winkler - 2013-08-02

    I am wondering if there is a way to determine with which cipher a mail has been encrypted and which digest has been used for signing it. For example using command-line gpg on an encrypted/ signed file with the verbose option gives information about these topics (e.g. "AES256 encrypted data", "Binary signature, hashmethod SHA1"). Clicking on the "Details" box of enigmail I am only informed that the signature is good. Is there a way to get/ display the detailed cipher/ digest information in Enigmail?

    Thanks!
    Jan

     

    Last edit: Jan Winkler 2013-08-02
  • Patrick Brunschwig

    Yes, this would certainly be possible. But Enigmail is made for average users, and I don't really see why this would be relevant to non-experts.

     
  • Jan Winkler

    Jan Winkler - 2013-08-06

    Yes, I understand, for the average user this information is not relevant.

    If someone else is interested: Meanwhile I think I have figured out how to extract the information from the debug-files which are generated by Enigmail if the generation of debug files is activated in the settings dialog. Please correct me, if I am wrong (don't know if this is the most straightforward way):

    After decryption/verification of a mail you find in enigdebug.txt the corresponding debug output. Immediately after decryption of a mail search for the last occurence of

    [GNUPG:] DECRYPTION_INFO

    The numbers behind this term are the mdc-hash type and the used encryption algorithm, e.g.

    [GNUPG:] DECRYPTION_INFO 2 9

    mdc hash: 2 ( = SHA1 )
    cipher: 9 ( = AES256 )

    The line starting with

    [GNUPG:] VALIDSIG

    gives us the information about the digest, e.g.

    [GNUPG:] VALIDSIG A252863736D072CF418E4295F4A1A3BBC5A3020C 2013-08-02 1375454111 0 4 0 17 2 01 A252863736D072CF418E4295F4A1A3BBC5A3020C

    The third last entry is the used digest algorithm (here: 2 = SHA1) and the fourth last the pubkey-algo (here: 17 = DSA)

    The codes can be found in the file include/cipher.h of the gnupg source.

    Anyway, I think an additional line in the open pgp security-info dialog for each message would be nice. Maybe something like this:

    Message encrypted using AES256 (key encryption: ELGamal), Hash algorithm: SHA1 (signing key: DSA)

    But, of course, this is a matter of taste and I know that there are more important things to do :-)

     

Log in to post a comment.