Read this for firebase security overview
https://www.firebase.com/docs/security/quickstart.html
Then you can integrate any of these or GitHub for other options
https://virgilsecurity.com
https://whispersystems.org
https://facebook.github.io/conceal/
https://github.com/scottyab/AESCrypt-Android