End-to-End Encryption for a Chat application based on Android (Java) and Firebase

Job ID: 33981701

Budget: €30 – €250 EUR

Hello I have developed already a chat application for Android (Java) with Firebase Realtime DB as backend.

The app is not a professional project but a demo "mockup" to which I will need help to implement a very basic End-to-End Encryption, that should work like this:
1. After user A logs in the Chat App a random public private key pair is generated on his phone.
2. The private key from A is stored securely on his phone.
3. The public key from A is stored in Firebase and is accessible to anybody that chats with A.
4. If B sends a message to A he fetches the public key from A from Firebase encrypts the message for A locally and stores the encrypted message on firebase in the inbox from A.
5. A downloads the encrypted message from Firebase and decrypts it with his private key stored on his phone.
Vice versa for A to B.

I will provide full source code of the Android chat app and some Java code to simplify the development.
Deadline 4th July.