Skip to content

triforce/shhchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shhchat

SHHH! It's a secret!

A Linux command-line multi-user chat program using SSL.

Project Status

Current: Beta

Next Milestone: 0.1 release

Build Status

Release Schedule

0.1

  • A secure encrypted message stream between client, server and other clients.
  • A key file will containing encryption key used for messages.
  • A <username>:md5<password> file managed by the server.
  • SSL support.

Environment Setup

Both openssl devel and websocket libraries are required to compile shhchat.

Debian
sudo apt-get install libssl-dev libwebsockets-dev

Setting up SSL

shhchat supports SSL that requires a certificate and private key for both client and server.

Bare minimal setup without SSL

git clone https://github.com/triforce/shhchat
cd shhchat
make
cd build

The build directory contains a bare bones deployment with some example config. You can change the simple key in build/conf/key and the user's db in /build/conf/users.

Start the server:

./shhchatd

Connect with a client:

./shhclient 127.0.0.1

Login with one of the users specified in the example 'users' db file.

Once you are connected typing '??' will display a list of available chat commands.

Full setup with SSL

As above however you will need a key/certificate pair for the client and server.

There is now a script (certs/create_certs.sh) to automatically generate a server and client key pair:

cd certs
./create_certs.sh

The locations of these certificates can be set via a shhchat.conf file in /etc/shhchat/shhchat.conf. If running shhchat from source you will obviously need to create the shhchat directory.

mkdir /etc/shhchat
cp shhchat.conf /etc/shhchat/

The server will read the certificate locations from the /etc/shhchat directory by default:

Simple key: /etc/shhchat/key

SSL key: /etc/shhchat/shh_key.pem

SSL cert: /etc/shhchat/shh_certificate.pem

Here are some commands to quickly copy the certs generated by create_certs.sh:

cp certs/server/server.pem /etc/shhchat/shh_certificate.pem
cp certs/server/server.key /etc/shhchat/shh_key.pem

The client will look for them in the current user's $HOME directory by default.

Simple key: $HOME/.key

SSL key: $HOME/.shh_key

SSL cert: $HOME/.shh_certificate

Here are some commands to quickly copy the certs generated by create_certs.sh:

cp certs/client/client.pem ~/shh_certificate
cp certs/client/client.key ~/shh_key

Contributing

I am on the lookout for people to test shhchat so give it a go and if necessary raise issues!

Pull requests are welcome.