1

How can I safely encrypt a messenger application that sends data over the Internet via TCP?

I've already taken a look at Salsa20, but I don't know if that's a good algorithm to use for this.

What algorithms can I use for this and how secure are they?

thebear8
  • 123
  • 5
  • See the end of my answer to https://crypto.stackexchange.com/questions/70633/will-publishing-two-or-more-public-keys-of-the-same-rsa-private-key-cause-a-secu – Ilmari Karonen Jun 16 '19 at 13:40

1 Answers1

5

Writing a secure messenger application is difficult, and vulnerabilities have been found, and keep being found in all of them.

This requires far more than just a stream cipher such as Salsa20. An entire protocol has to be designed for user registration, key exchange, group invites and more.

The MLS working group is currently designing a reference protocol to do group messaging.

Meanwhile, Signal has opensourced their core library (https://github.com/signalapp/libsignal-protocol-c), and this is something you may want to look at.

Wire, another popular application with fairly decent security, has also opensourced most of its components: https://github.com/wireapp

But I wouldn't recommend starting from scratch, especially if you are new to cryptography.

Frank Denis
  • 2,964
  • 15
  • 17