We want to integrate an Asymmetric (public + private key) encryption mechanism for ou Chat app.
But the issue using this option is that, how can we ensure that the user is using the same private key on the mobile app & also on the web version of the same app ? Since we should not share private key accros multiple devices.
Our goals is simply to make the chat-messages on the database not readable (persist as encrypted) by the server or any user that do not belong the the conversation, since we are also using HTTPS between the parties.
What is the efficient and easiest way to achieve this ?