A safe secure chat room built on asymmetric cryptography.
All messages sent are encrypted with the recipient’s public key and can only be encrypted with the recipient’s private key.
All messages are signed with the sender’s private key and the signature is verified with the sender’s public key at the moment the message is received
The server does not know anything about the content of the message, its task is only to forward messages to everyone who has connected to the chat room.
sudo apt-get install make g++ libboost-dev libssl-dev libboost-system-dev libboost-thread-dev
make
First, you should generate the keys. We use keys of size 4096 because this affects the size of the message block that can be encrypted in one go.
Of course you should use a stronger password for the key.
openssl genpkey -algorithm RSA -out alice_private_key.pem -pkeyopt rsa_keygen_bits:4096 -aes256 -pass pass:qwe123
openssl rsa -pubout -in alice_private_key.pem -out alice_public_key.pem -passin pass:qwe123
openssl genpkey -algorithm RSA -out bob_private_key.pem -pkeyopt rsa_keygen_bits:4096 -aes256 -pass pass:qwe123
openssl rsa -pubout -in bob_private_key.pem -out bob_public_key.pem -passin pass:qwe123
openssl genpkey -algorithm RSA -out carol_private_key.pem -pkeyopt rsa_keygen_bits:4096 -aes256 -pass pass:qwe123
openssl rsa -pubout -in carol_private_key.pem -out carol_public_key.pem -passin pass:qwe123
./chat_server 8888
./chat_client alice 127.0.0.1 8888 alice_private_key.pem bob_public_key.pem carol_public_key.pem
./chat_client bob 127.0.0.1 8888 bob_private_key.pem alice_public_key.pem carol_public_key.pem
./chat_client carol 127.0.0.1 8888 carol_private_key.pem alice_public_key.pem bob_public_key.pem
Enjoy
- autoupdate
- screensharing
- videochat
- websocket
- auth on server (avoid spam)