How are changed keys handled?

#1

I have a particular contact who uses Delta Chat, too, with whom I have chatted for a while without problems.

At some point, I still received their messages while they stopped to receive mine. This persists for several Delta Chat versions on both sides. My messages appear as always in my outgoing folder, so everything looks fine on my side.

I know that this person has been switching devices recently and I wondered if they maybe haven’t synchronised their keys. Even if I have the wrong key, this probably isn’t the cause of the problem as the messages don’t seem to arrive at all, instead of just being undecipherable. But this made me wonder:

What does Delta Chat do if an encrypted chat was started with one key of the other side and then it continues with a new key?

#2

if you sent a message before receiving a message from your peer after the switch, that message will be encrypted with the old key and will show up in the peer delta chat with a message explaining it can’t be decrypted, if the peer write to you with that new delta chat (new keys) since his public key is sent along with his message, as soon as you receive the message you are aware of the change, your delta chat should had shown a message saying something like: “setup changed for X” in the chat with that peer, after that your delta chat will encrypt messages with the new received key and everything should work as usual.

Not a delta-pro but that is what I think it does, it uses Autocrypt maybe reading their docs will help you understand better.
Have a nice day @mbeko

2 Likes