Giter VIP home page Giter VIP logo

mucrypt's Introduction

muCrypt

μCrypt Messenger: A secure & simple end-to-end encrypted chat screenshot

µCrypt (or muCrypt) is a simple end-to-end encrypted chat. The server is written in Python and the client in JavaScript.

A goal when creating µCrypt was to enable the chat to be audited very easily, because of that the lines of code (minus HTML/CSS) was limited to <200 lines of code in total.

In an attempt to be fully transparent with the user, the client displays a "raw message" bar at the top, enabling the user to monitor exactly what data is being sent to/from the chat.

µCrypt is intended to act as a decentralised chat platform, with users setting up their own servers for their own use, however, a demo is provided here (Please don't abuse).

Requirements (Server)

  • Python 3
  • Python websockets
  • Python ssl
  • Python asyncio

Requirements (Client)

  • Any modern web browser

How to use

Setup and enter python virtual environment (optional)

This step isn't essential. If you've never used venv before, don't bother with this step.

  • python3 -m venv mucrypt
  • cd mucrypt
  • source ./bin/activate

Install dependencies

  • pip3 install websockets asyncio ssl

Grab the server script

  • wget https://raw.githubusercontent.com/connor-brooks/muCrypt/master/server/server.py

Edit the server script

Using a text editor to modify the following lines of server.py to reflect your servers certificate paths:

  • cert = "/path/to/ssl/cert.pem"
  • privKey = "/path/to/privkey.pem

Get the client files:

Enter the directory you wish to serve the HTML client from, in this example, the path /var/www/html/mucrypt is used.

  • cd /var/www/muCrypt
  • git clone https://github.com/connor-brooks/muCrypt
  • mv muCrypt/server/* .
  • rm -rfv muCrypt

Edit the client script:

Using a text editor modigy the following lines of script.js, changing example.com to your own domain:

  • var ws = new WebSocket("wss://your-domain.com:8765/");

Run the server

To run the server, simply run:

  • Run nohup /path/to/your_server_script/server.py &
  • if you are using the venv, remember to run source /path/to/your/venv/bin/activate first.
  • Setting up an init script would be an easy way to keep the server running automatically. For information on how to do this with a venv, see here

Notes

  • Currently, if your connection drops due to connectivity issues or a locked phone screen, you won't be able to send or recieve messages until the page is reloaded

mucrypt's People

Contributors

connor-brooks avatar noxcis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.