Skip to content

Latest commit

 

History

History

srv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Secure Messenger

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.

Build

sudo apt-get install make g++ libboost-dev libssl-dev libboost-system-dev libboost-thread-dev
make

Key generation

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.

Alice

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

Bob

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

Carol

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

Start server

./chat_server 8888

Start Clients

Alice

./chat_client alice 127.0.0.1 8888 alice_private_key.pem bob_public_key.pem carol_public_key.pem

Bob

./chat_client bob 127.0.0.1 8888 bob_private_key.pem alice_public_key.pem carol_public_key.pem

Carol

./chat_client carol 127.0.0.1 8888 carol_private_key.pem alice_public_key.pem bob_public_key.pem

Let`s chat

Enjoy

Todo List

  • autoupdate
  • screensharing
  • videochat
  • websocket
  • auth on server (avoid spam)