Giter VIP home page Giter VIP logo

decentralized-chat's Introduction

Decentralized chat with trash traffic

Idea: every peer gets all messages from her connectivity component. Belonging to a chat room is equivalent to knowing the chat room secret key the messages are encrypted with.

Scenario:

  1. User, who knows at least one peer address, starts a server and sends the peer his address
  2. The peer broadcasts new user address to all known peers
  3. Every chat has its secret key, which should be known by participants (by some reliable channel, not the chat)
  4. When a user sends a message to a chat, she encrypts it via the secret key and broadcasts the encrypted message
  5. Everyone who knows the secret key (therefore belongs to the chat room) can decrypt the message
  6. A user can belong to several chats (know several secret keys)

Broadcast algorithm:

  • Gossip
  • When a peer gets a broadcast message, she checks if the message was received earlier (via Bloom filter)

Persistence:

  • Store chat history locally
  • To recover chat history it should be stored at least one peer
  • Chat history is encrypted with the chat secret key

Total order is not guaranteed.

Menu options (press Ctrl+C):

  • print 'chat CHAT_NAME' to change chat name
  • print 'exit' to exit
  • print 'load history' to send request for receiving chat history
  • print 'show history' to output chat history

How to run:

python3 main.py --config config_examples/alice.json

decentralized-chat's People

Contributors

yutsareva 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.