Skip to content

Upgrading a 1:1 conversation to e2ee using a second email client does not work as expected #7945

@seifferth

Description

@seifferth

Delta Chat version on Bob's side: 2.43.0 (Android app from F-Droid)
Delta Chat version on Alice's side: 2.43.0 (Android app from F-Droid)

Settings:

  • Both Alice and Bob have "Multi Device Mode" enabled
  • Bob has "Show Classic Emails" set to "All"
  • Alice has "Show Classic Emails" set to "No, chats only"

Observed behaviour:

  • Alice and Bob exchange keys via SecureJoin, which creates a key-contact chat on both sides
  • Alice and Bob exchange multiple messages back and forth via Delta Chat
  • At some point, Alice uses a different email client to send a message (M) without e2ee
    • On Alice's side, this message does not appear in Delta Chat at all (as expected)
    • On Bob's side, this message appears in an address-contact chat with Alice (as expected)
  • Bob uses a different email client to send a reply (R) with e2ee enabled using the key known from the previous key exchange
    • On Alice's side, R does not appear in Delta Chat at all (unexpected)
    • On Bob's side, R appears in a new address-contact group chat that has Alice as its only member (unexpected); interestingly, there is no envelope symbol on the message itself

Expected behaviour:

  • Alice and Bob exchange keys via SecureJoin, which creates a key-contact chat on both sides
  • Alice and Bob exchange multiple messages back and forth via Delta Chat
  • At some point, Alice uses a different email client to send a message (M) without e2ee
    • On Alice's side, this message does not appear in Delta Chat at all
    • On Bob's side, this message appears in an address-contact chat with Alice
  • Bob uses a different email client to send a reply (R) with e2ee enabled using the key known from the previous key exchange
    • R appears in the existing key-contact chat between Alice and Bob on both sides

Thoughts about why this might happen

I guess there might be an issue with assigning R to an existing chat. Note that R does not reference (via In-Reply-To or References) any previous message from the key-contact chat between Alice and Bob. If Bob sends a reply R' that references an existing message from the key-contact chat (via both In-Reply-To and References; everything else being equal to the case described above), R' does indeed appear in the key-contact chat between Alice and Bob on both sides.

I do realize that assigning the message to an existing chat might be tricky in the case described above. However, the following methods should be possible:

  • R is signed by Bob -- so at least Alice should be able to attribute that message to Bob.
  • R is encrypted to both Alice's and Bob's encryption subkey. Both Alice and Bob know both encryption subkeys.

Other things that may be relevant

  • R uses protected headers (RFC 9788), where the outer header looks like this:
Date: [[real message Date]]
Message-ID: [[real Message-ID]]
From: bob@example.com
To: hidden-recipients:;
Subject: [...]
In-Reply-To: [[real In-Reply-To value]]
References: [[real References value]]
  • R contains an Autocrypt header with Bob's keydata, but no Autocrypt-Gossip header with Alice's keydata.

  • R does reference M (via In-Reply-To and References) but it does not reference any message found in the key-contact chat between Alice and Bob

  • Encryption was performed with gpg, so the PGP MESSAGE uses the old packet format for some things. The output of sq packet dump looks like this:

Public-Key Encrypted Session Key Packet, old CTB, 94 bytes
    Version: 3
    Recipient: [[KeyID for Bob's encryption subkey]]
    Pk algo: ECDH

Public-Key Encrypted Session Key Packet, old CTB, 94 bytes
    Version: 3
    Recipient: [[KeyID for Alice's encryption subkey]]
    Pk algo: ECDH

Sym. Encrypted and Integrity Protected Data Packet, new CTB, partial length, 1024 bytes in first chunk

    Version: 1
    No session key supplied

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions