I need a chat between two users and I obviously want to make it as secure as possible. I am, by no means, a cryptography expert, so I turn to you guys for some advice.
Because I like the idea of having E2E encryption, I did some reading about the Diffie–Hellman method and the Signal Protocol.
My issue is that this is a web app and the users are not bound to a fixed device, so I can't just generate and store a key locally. Storing the key in a database would destroy the point of having E2EE.
I've read an article that Facebook Messenger is planning (or already has, idk I don't use Facebook lol) to implement E2EE for their messages, and because Facebook can be used via web – or more specifically, can be used from multiple devices – it has to be possible somehow, right?
I spoke to a professor at my uni about this and he suggested generating the keys from the user password upon login, but that would mean that the user can't change his password or else all his messages become inaccessible.