Rsa Messenger
What is it?
It is a anonymous secure messaging server and client that are secured with a RSA implementation all built from scratch with minimal dependencies. Made as an exercise in lower level protocol networking and as a cryptographic exercise.
Built in Rust using the bigint crate for a arbitrarily large sized integer, the server uses tokio to handle multiple concurrent connections efficiently and the clients use multiple OS threads to do the same
Heres the Code
Hows it work?
The client has the ability to encrypt and decrypt any given message (using its own native key format), as well as generate RSA key pairs and connect to the server for encrypted messaging.
The server accept tcp connections and requires the client to present a RSA public key which the server issues a challenge to prove the client has access to the private part (this is our method for identification). Then the server puts the client into a map of authenticated clients and allows anyone to send them a message. The messages are sent with a receiver (which are identified by their public key) followed by the encrypted message. The server does not advertise clients who are connected to it and will not tell you if a message fails. You need prior knowledge that someone is connected and you need their public key to send messages to them.
The server has no way to decrypt the messages (and doesn't try), it simply passes messages from one socket to another. All the encrypting and decrypting happens on the clients.
Heres a small video showing it off