Git Product home page Git Product logo

chatdemo's Introduction

Chat Demo

A live demonstration of private communication on a public channel.

How it Works

We utilize simple web sockets via socket.io to create a central chat room that broadcasts all messages to all members and RSA for message encryption/decryption.

Before joining the chat room, the user generates a public key [e,n] and private key [d,n]. After generating the keys, the client Registers with the chat server by sending its public key which is broadcasted to all users.

Once the user has joined they can send unencrypted or encrypted messages. To send encrypted messages, they can click on a joined user's public key which will be filled into the encrypt field and write the message they want to encrypt in the send field. After clicking the encrypt button, their message will be encrypted and replace the plaintext in the send field.

Messages are filtered by each client. When a client receives a message with it's public key as the header, it will automatically decrypt the message and alert the user that a message was received.

Prerequisites

  • A recent version of node/npm (probably node 8+ should be fine)
  • Nightly Rust (we use the latest and greatest)

How to Use?

Setup

git clone https://github.com/robertDurst/ChatDemo.git
cd ChatDemo
npm install
npm run build-debug // or npm run build-release

Start Client

npm run client

Start Server

npm run server

Test

cargo test

Cryptography Dependencies

The underlying crypto makes heavy use of the crates in rust-num, specifically num-bigint and num-trait crates.

The randomness for the crypto uses the rust rand crate.

chatdemo's People

Contributors

daubaris avatar

Watchers

 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.