Git Product home page Git Product logo

signal-rs's Introduction

signal-rs

A Rust implementation of the Signal Protocol. Quite rough around the edges, and no security guarantees given. Just for curiosity.

  • Overview
  • Quick Start
  • Components
  • Road Map
  • More Information

Overview

The Signal Protocol is at the heart of all mainstream end-to-end encrypted messaging these days: in addition to Signal, both Whats App and Facebook Messenger use it (along with a lot of other messaging apps). It is composed of two main parts: the X3DH key exchange protocol, and the Double Ratchet algorithm.

Quick Start

Run cargo test --all. Among others, this runs the test in crates/signal/src/lib.rs, which is a mockup of a complete end-to-end conversation including both key exchange and several iterations of the ratchet, however, it is entirely in-process.

Then try make server, followed by (in another tab) make. This runs the multi-process example. The first command starts the server, which provides key & message relay. The second command starts the two client processes, which communicate with one another via the server.

Components

The two key crates are x3dh, which implements the key exchange algorithm, and double-ratchet, which implements the session key ratcheting algorithm.

x3dh

The main entity is the Participant, which manages generating and storing the various keys in play. In addition, you can create a local Keyserver to simulate the key relay functions in-process.

double-ratchet

The main entity is the Session, which can be created with a SessionBuilder. Initialize it with the shared session key, begin a connection, and then use the Session to encrypt and decrypt messages.

Road Map

  • Clean up x3dh and double-ratchet public APIs & docs.
  • Get rid of any unwrap or panic!
  • Use the log crate for logging.
  • Use a more curated set of crypto implementations.
  • Implement the encrypted headers extension.
  • Complete client and server example implementations.
  • Make a little interactive chat client example.
  • Make Keyserver trait asyncable so we can use it with a remote server?
  • Make a Relayserver trait for double-ratchet that corresponds to the Keyserver trait for x3dh?

More Information

signal-rs's People

Contributors

couchand avatar agrinman avatar xobs avatar

Watchers

James Cloos avatar  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.