Menu

#525 Enigmail fails to validate detached attachment signatures that it creates

duplicate
nobody
1.8.2
Minor
38.3
2.0.26 (Gpg4win 2.2.2)
Windows
---
nobody
2015-12-17
2015-10-01
No

Enigmail fails to validate detached attachment signatures that it creates

http://screencast.com/t/QZ3ETjHz6

Steps to reproduce are in screencast. If you need attachments, pub key and detached signatures I can attach them.

Related

Bugs: #525

Discussion

  • Ludwig Hügelschäfer

    You're writing a signed HTML message in Inline format. This causes trouble and is not recommended. Maybe this affects signature verification of the attachments. Please try again with a plaintext message or PGP/MIME format.

     
  • Velja Radenkovic

    Maybe I did not understood things good but why would message body have anything to do with the attachments encrypted separately? Looks to me that for each attachment there is detached signature (.sig files in attachments) which should allow atachment validation independently of message body. I will inspect .sig files and get back with more info.

     
  • Ludwig Hügelschäfer

    You can check the signatures of the sent message. Are the signatures valid there?

     
  • Velja Radenkovic

    Yes but the setting says "sign each attachment separately" i.e. validation of inline body signature doesn't mean that attachment signatures are valid because they are not included in inline body signature calculation at all. It is possible that attachments are replaced or altered, and the inline message body will still validate against its signature. Attachments in the message have separate signature files (.sig files) attached to mail message, which represent detached signatures(thats the thing I will check) and those should be used to vlidate signature of attachments in message.

    We may put things other way: What is the purpose of "Verify signature" enigmail context menu item, that you get when you right click attachment or sig file next to it in message with attachments, signed using "sign each attachment separately" option.

    Thanks for the discussion,
    Velja

     
  • Velja Radenkovic

    .sig files are indeed detached signatures of attachments. Furthermore, they validate.

    Output of commands executed on attachment and sig file from my screencast in the first message:

    C:\Users\User>gpg --list-packets "D:\DOKUMENTI\work\epgp\enigmail_atts\Chrysanthemum.jpg.sig"
    :signature packet: algo 1, keyid D0AC4BBEA7ECFC22
    version 4, created 1443707840, md5len 0, sigclass 0x00
    digest algo 2, begin of digest e5 1f
    hashed subpkt 2 len 4 (sig created 2015-10-01)
    subpkt 16 len 8 (issuer key ID D0AC4BBEA7ECFC22)
    data: [4095 bits]

    which shows that sig files contain signature packet.

    C:\Users\User>gpg --verify "D:\DOKUMENTI\work\epgp\enigmail_atts\Chrysanthemum.jpg.sig" "D:\DOKUMENTI\work\epgp\enigmail_atts\Chrysanthemum.jpg"
    gpg: Signature made 10/01/15 15:57:20 Central Europe Daylight Time using RSA key ID A7ECFC22
    gpg: Good signature from "Velja Radenkovic velja@l.lh" [ultimate]

    which shows that signature validates i.e. file is intact.

    Command that Enigmail executes after which it diaplays "BAD SIGNATURE" copied from enigmail console:

    enigmail> "D:\Program Files (x86)\GNU\GnuPG\pub\gpg2.exe" --charset utf-8 --display-charset utf-8 --batch --no-tty --status-fd 2 --verify C:\Users\User\AppData\Local\Temp\Chrysanthemum.jpg.sig C:\Users\User\AppData\Local\Temp\Chrysanthemum-1.jpg

    I couldn't execute that command because there are no Chrysanthemum-1.jpg and no Chrysanthemum.jpg.sig in Temp dir. They do not exist. It is possible that they existed and Enigmail deletes temp files after trying to validate signature. Or it didint copy attachment and signature before executing command. I can't tell for sure why is that context menu command failing if i dont look at code which is not something I can afford now.

    Thank you,
    Velja

     
  • Velja Radenkovic

    Attachment and sig from 1st message screen cast.

     
  • Adam Laurie

    Adam Laurie - 2015-10-05

    I can confirm that attaching a plaintext file and signing with 'Sign each attachment seperately and send the message using inline PGP' results in an email that can have the attachment tampered but will still show a good signature.

    To reproduce:

    1. Send email with plaintext attachment, signed as above.
    2. Save received email as .eml file
    3. edit .eml file and modify attachment text
    4. open modified .eml file and observe "good" signature

    Of course, attachment signatures can be checked independantly, but from a 'normal' end user experience, this situation is very misleading.

     

    Last edit: Adam Laurie 2015-10-05
    • Ludwig Hügelschäfer

      Adam, the signature bar in your example shows the signature status of the message body only. If you send in PGP/MIME format, then the signature is calculated over message body and attachment. This is not quite the problem Velja is having.

       
  • Velja Radenkovic

    The problem is that attachment signatures can not be checked individually so its also broken for very advanced user. See my first post and screencast.

     
    • Adam Laurie

      Adam Laurie - 2015-10-05

      Yes, I saw that but the above attachments verify OK on my up to date Ubuntu setup (giving a good sig for untampered and a bad sig for tampered).

       
    • Ludwig Hügelschäfer

      Velja, of course you can check the signatures of each attachment individually when sending in inline format. Right-click on the "2 attachments" in the attachment pane. Another line showing all attachments will come up at the bottom. Then right click on a single attachment. A popup menu will show up, select "Verify signature". Do this for all of your attachments.

      Please do this not only in your inbox, but also in your sent folder to verify if the message was intact at the moment it was sent.

       
      • Velja Radenkovic

        No you can not. You didn't watch my screen cast at all? Did you? Here is another one:

        http://screencast.com/t/0fDntS1rkmlX

        You can not check signatures of attachments because it shows "BAD signature" on good signature. Enigmail doesn't validate signature that it produces. It is a bug. Broken feature.

        This is my last call. I dont know why I was trying this much.

        Good luck.
        Velja

         
  • Ludwig Hügelschäfer

    I think we have a misunderstanding. We're obviously using different language: Was I meant when saying " check the signature": Look whether the signature is good or bad. You probably meant: "Proove a good signature".

    Obviously the signature is already bad in the sent folder. Thanks for checking that. Please give us a debug log (https://www.enigmail.net/support/bugs.php). Please also give us the saved messages (sent folder and Inbox) and your public key. Please mail it directly to patrick at enigmail dot net and to ludwig at enigmail dot net. Thanks.

     

    Last edit: Ludwig Hügelschäfer 2015-10-05
  • Velja Radenkovic

    Signature is good. It validates fine against attachment using GPG from command line. Its in the post above. I will send log as soon as I can.

     
  • Velja Radenkovic

    mails + pub key + log (sent to email to)

     

    Last edit: Velja Radenkovic 2015-10-07
  • Ludwig Hügelschäfer

    Thanks for the files. I could reproduce the problem with your saved messages and Enigmail 1.8.2. However, using a nightly version of Enigmail everything is well and I get good signatures for both attachments on both messages (inbox and sent). So this bug is already fixed on master. A review showed, that [#517] is most likely also your problem. Would you please install a nightly build of Enigmail (https://www.enigmail.net/download/nightly.php) and test again? Thanks!

     

    Related

    Bugs: #517


    Last edit: Ludwig Hügelschäfer 2015-10-10
    • Velja Radenkovic

      I am sorry for late response. I will do very soon and I will notify you.

      On Sat, Oct 10, 2015 at 11:03 AM, "Ludwig Hügelschäfer" huegelschaefer@users.sf.net wrote:

      Thanks for the files. I could reproduce the problem with your saved
      messages and Enigmail 1.8.2. However, using a nightly version of Enigmail
      everything is well and I get good signatures for both attachments on both
      messages (inbox and sent). So this bug is already fixed on master. A review
      showed, that https://sourceforge.net/p/enigmail/bugs/517/ is most likely
      also your problem. Would you please install a nightly build of Enigmail (
      https://www.enigmail.net/download/nightly.php) and test again? Thanks!


      Status: open
      Labels: attachment signature verification
      Created: Thu Oct 01, 2015 02:00 PM UTC by Velja Radenkovic
      Last Updated: Wed Oct 07, 2015 09:58 AM UTC
      Owner: nobody

      Enigmail fails to validate detached attachment signatures that it creates

      http://screencast.com/t/QZ3ETjHz6

      Steps to reproduce are in screencast. If you need attachments, pub key and
      detached signatures I can attach them.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/enigmail/bugs/525/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #525

  • Patrick Brunschwig

    • status: open --> duplicate
     
  • Patrick Brunschwig

    Duplicate to bug 517

     

Log in to post a comment.

MongoDB Logo MongoDB