This is a simple implementation of an encrypted chat. It uses end-to-end AES 128 encryption.
Keys (passwords) are never sent to the server, so the system is immune to man-in-the-middle attacks. This, however, requires that a password be transmitted via a different channel.
Cryptoch contains two main modules: a client using jquery-mobile and angularJS and a server using node.js.
Cryptoch also works perfectly on mobile.
I assume you are using a Debian VPS.
If you have node.js installed, skip this step. If you don't have node.js installed, I recommend using https://github.com/creationix/nvm to install it:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bashThen do:
source ~/.bashrcThen install latest node.js and use it:
nvm install node
nvm use nodeNow open .bashrc file in nano:
nano ~/.bashrcAnd add this line at the end of this file:
nvm use nodeThen use F3 to save and Ctrl+X to leave nano. Now node.js is installed.
First of all, clone git repository (If you don't have git installed do sudo apt-get install git):
git clone https://github.com/aikei/cryptochThen go into the created directory:
cd cryptochNow install an http-server module globally:
npm install -g http-serverLaunch http-server which will serve the client:
http-server app
Install dependencies:
cd server
npm install
Then launch the server:
node srv.jsIf you want to use SSL, change config.js file in the following way:
- set
SSLtotrueinstead offalse - set the
keyPathstring to the path to your key file - set the
certPathstring to the path to your cert file
SSL, however, is not requiered for security, since chat password is never tramsmitted anyway, and all text is transmitted in encrypted form. This way, you don't need to trust the server.