| Facebook Messenger already has Secret Conversations, which is end-to-end encrypted mode based on the Signal protocol. Here's the technical whitepaper:
https://about.fb.com/wp-content/uploads/2016/07/messenger-se... Here's some of the academic work on messaging franking that it has driven: https://eprint.iacr.org/2017/664.pdf Here's the instructions how to use it:
https://www.facebook.com/help/messenger-app/1084673321594605 Of course, you need to trust that the client from the app store and no, the implementation is not open source. |
This is not forward secure. It will also only work for messages under 256 bytes. I don't know what happens in this code if you exceed that message length.
You want to use ephemeral session keys here. Read the Secret Conversations whitepaper as an example.