I would like to create a secure chat application for multiple users on a device. The user have to login to the app before using the chat application.
My thought was to store a private key in SharedPreferences, check if the device is rooted. If this is the case, the app cannot be used. So if there is no root, a private key-value pair stored in SharedPreferences should be secure, right? Then I might store for each user on the device a keypair. I do not want to store the chat messages online.