I'm creating a mobile chat application using python (django) as backend, and I'd like to implement an end-to-end (E2E) cryptographic system for protecting messages.
Now, as I understood so far, when one of the user create the chat, the server will go to generate 2 couples of public and private key, and the next step is to exchange the public keys between the users and save locally the private ones.
Now the problem arise when the user log out of the application, or simply delete it, since the private key is not stored anywhere in the server, but only on the local memory, how can the user recover the chat?
Feel free to link me everything, because it's not so easy to found interesting things on web about it. Here's an interesting guide I followed
Thank you