From 701e120e9ad48867b28bdd8267e56a034f966aa4 Mon Sep 17 00:00:00 2001 From: Mark Aleksander Hil <32651095+markaleksanderh@users.noreply.github.com> Date: Thu, 6 May 2021 18:37:47 +0100 Subject: [PATCH] edit readme, add images and table of contents (#52) * Edited text, added images and table of contents * readme corrections * change win command to forward slashes * readme corrections Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com> --- README.md | 135 +++++++++++++++++++++------------- images/how-to-use-simplex.svg | 32 ++++++++ images/logo.svg | 12 +++ images/strapline.svg | 3 + 4 files changed, 129 insertions(+), 53 deletions(-) create mode 100644 images/how-to-use-simplex.svg create mode 100644 images/logo.svg create mode 100644 images/strapline.svg diff --git a/README.md b/README.md index 4c1d38d92d..f1e1ce2fc7 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,70 @@ +SimpleX logo + # SimpleX chat +## Federated, private, secure, decentralized + [![GitHub build](https://github.com/simplex-chat/simplex-chat/workflows/build/badge.svg)](https://github.com/simplex-chat/simplex-chat/actions?query=workflow%3Abuild) [![GitHub release](https://img.shields.io/github/v/release/simplex-chat/simplex-chat)](https://github.com/simplex-chat/simplex-chat/releases) -## Federated chat - private, secure, decentralized +SimpleX chat prototype is a thin terminal UI on top of [SimpleXMQ](https://github.com/simplex-chat/simplexmq) message broker that uses [SMP protocol](https://github.com/simplex-chat/simplexmq/blob/master/protocol/simplex-messaging.md) and [SMP agent protocol](https://github.com/simplex-chat/simplexmq/blob/master/protocol/agent-protocol.md). See [simplex.chat](https://simplex.chat) website for chat demo and the explanations of the system and how SMP protocol works. -SimpleX chat prototype is a "thin" terminal UI on top of [SimpleXMQ](https://github.com/simplex-chat/simplexmq) message broker, that uses [SMP protocol](https://github.com/simplex-chat/simplexmq/tree/master/protocol) and SMP agent protocol. +## Table of contents + +- [Features](#features) +- [Installation](#installation) + - [Download chat client](#download-chat-client) + - [Build from source](#build-from-source) + - [Using Docker](#using-docker) + - [Using Haskell stack](#using-haskell-stack) +- [Usage](#usage) + - [Running the chat client](#running-the-chat-client) + - [How to use SimpleX chat](#how-to-use-simplex-chat) + - [Access chat history](#access-chat-history) +- [Roadmap](#roadmap) +- [Disclaimer](#disclaimer) +- [License](#license) + +## Features -These features are implemented: - 1-to-1 chat with multiple people in the same terminal window. -- auto-populated recipient name - just type your messages to reply to the sender. -- default server is available to use - `smp1.simplex.im:5223` - you can deploy your own server (`smp-server` executable in [simplexmq](https://github.com/simplex-chat/simplexmq) repo). -- no global identity or any names visible to the server(s) - for the full privacy of your contacts and conversations. -- E2E encryption, with RSA public key that has to be passed out-of-band (see below). -- message signing and verification with automatically generated RSA keys. -- message integrity validation (via including the digests of the previous messages). -- authentication of each command/message by SMP servers with automatically generated RSA key pairs. +- Auto-populated recipient name - just type your messages to reply to the sender once the connection is established. +- Demo SMP server available at `smp1.simplex.im:5223` - you can deploy your own server (`smp-server` executable in [simplexmq](https://github.com/simplex-chat/simplexmq) repo). +- No global identity or any names visible to the server(s), ensuring full privacy of your contacts and conversations. +- E2E encryption, with RSA public key that has to be passed out-of-band (see [How to use SimpleX chat](#how-to-use-simplex-chat)). +- Message signing and verification with automatically generated RSA keys. +- Message integrity validation (via including the digests of the previous messages). +- Authentication of each command/message by SMP servers with automatically generated RSA key pairs. - TCP transport encryption using SMP transport protocol. RSA keys are not used as identity, they are randomly generated for each contact. 2048 bit keys are used, it can be changed to 4096-bit in code via [rsaKeySize setting](https://github.com/simplex-chat/simplex-chat/blob/master/apps/dog-food/Main.hs). -The chat client is stable, but it is quite new and unaudited, so you probably should NOT use it yet for high security communications - unless you know what you are doing. +## Installation -## SimpleX chat roadmap for 2021-22 +### Download chat client -1. Switch to application level chat protocol. This will allow to separate physical server connection management from logical chat contacts, and to support all common chat functions. -2. SMP queue redundancy and rotation in SMP agent protocol. -3. Symmetric groups support in SMP agent protocol, as a foundation for chat groups. -4. Delivery confirmation in SMP agent protocol. -5. Multi-agent/device data synchronisation - to use chat on multiple devices. -6. Synchronous streams support in SMP and SMP agent protocols, to support file transfer. -7. Terminal chat UI and mobile apps. -8. Scripts for simple SMP server deployment to hosting providers: Linode, Digital Ocean and Heroku. -9. Public broadcast channels. -10. Optional public contact/group addresses using DNS to establish connections, but not using it to send and receive messages - in this way you will keep all your contacts and groups even if you lose the control of the domain. +Download the chat binary for your system from the [latest stable release](https://github.com/simplex-chat/simplex-chat/releases) and make it executable as shown below. -## Installing the chat client +#### Linux and MacOS -You can: -- download the executable file built on Github CI -- build it from source +```sh +chmod +x +mv ~/.local/bin/dog-food +``` -### Downloading the executable chat client +(or any other preferred location on PATH). -You can download the executable binary file for your platform from the [latest stable release](https://github.com/simplex-chat/simplex-chat/releases) and make it executable: +On MacOS you also need to [allow Gatekeeper to run it](https://support.apple.com/en-us/HT202491). - - Linux and MacOS: `chmod +x ; mv ~/.local/bin/dog-food` (or any other preferred location on PATH). On MacOS you need to [allow Gatekeeper to run it](https://support.apple.com/en-us/HT202491). - - Windows: `move %APPDATA%\local\bin\dog-food.exe`. +#### Windows -### Building from source +```sh +move %APPDATA%/local/bin/dog-food.exe +``` + +### Build from source #### Using Docker @@ -60,7 +74,6 @@ On Linux, you can build the chat executable using [docker build with custom outp $ git clone git@github.com:simplex-chat/simplex-chat.git $ cd simplex-chat $ DOCKER_BUILDKIT=1 docker build --output ~/.local/bin . -$ dog-food ``` > **Please note:** If you encounter ``version `GLIBC_2.28' not found`` error, rebuild it with `haskell:8.8.4-stretch` base image (change it in your local [Dockerfile](Dockerfile)). @@ -79,14 +92,17 @@ and build the project: $ git clone git@github.com:simplex-chat/simplex-chat.git $ cd simplex-chat $ stack install -$ dog-food ``` -## Running the chat client +## Usage -Run `dog-food` (as in "eating your own dog food"), or the downloaded file (if you did not move it to bin folder), to start the chat client. +### Running the chat client -By default, app data directory is created in the home directory (`~/.simplex`, or `%APPDATA%/simplex` on Windows), and SQLite database file `smp-chat.db` is initialized in it. The default SMP server is `smp1.simplex.im:5223#pLdiGvm0jD1CMblnov6Edd/391OrYsShw+RgdfR0ChA=` (base-64 encoded string after server port is the transport key digest) - it is pre-configured in the app. +To start the chat client, run `dog-food` (as in [eating your own dog food](https://en.wikipedia.org/wiki/Eating_your_own_dog_food)) from the terminal. + +By default, app data directory is created in the home directory (`~/.simplex`, or `%APPDATA%/simplex` on Windows), and SQLite database file `smp-chat.db` is initialized in it. + +The default SMP server is `smp1.simplex.im#pLdiGvm0jD1CMblnov6Edd/391OrYsShw+RgdfR0ChA=` (base-64 encoded string after server host is the transport key digest) - it is pre-configured in the app. To specify a different file path for the chat database use `-d` command line option: @@ -94,7 +110,7 @@ To specify a different file path for the chat database use `-d` command line opt $ dog-food -d my-chat.db ``` -If you deployed your own SMP server you can set client to use it via `-s` option: +If you deployed your own SMP server(s) you can configure client via `-s` option: ```shell $ dog-food -s smp.example.com:5223#KXNE1m2E1m0lm92WGKet9CL6+lO742Vy5G6nsrkvgs8= @@ -102,29 +118,25 @@ $ dog-food -s smp.example.com:5223#KXNE1m2E1m0lm92WGKet9CL6+lO742Vy5G6nsrkvgs8= The base-64 encoded string in server address is the digest of RSA transport handshake key that the server will generate on the first run and output its digest. -You can still talk to people using default or any other server, it only affects the location of the message queue when you initiate the connection (and the reply queue can be on another server, as set by the other party's client). +You can still talk to people using default or any other server - it only affects the location of the message queue when you initiate the connection (and the reply queue can be on another server, as set by the other party's client). Run `dog-food --help` to see all available options. -## Using chat client +### How to use SimpleX chat -Once chat client is started, use `/add ` to create a new connection and generate an invitation to send to your contact via any other communication channel (`` - is any name you want to use for that contact). +This diagram shows how to connect and message a contact: -Invitation has format `smp::::::` - this needs to be shared with another party, via any other channel. This invitation can only be used once - even if this is intercepted, the attacker would not be able to use it to send you the messages via this queue once your contact confirms that the connection is established. +
+ +
-The party that received the invitation should use `/connect ` to accept the connection (`` is any name that the accepting party wants to use for you). +Once you have started the chat, use `/add ` to create a new connection and generate an invitation (`` is any name you want to use for that contact). The add command will output an invitation. Send this invitation to your contact via any other channel. -For example, if Alice and Bob want to chat, with Alice initiating, Alice would use [in her chat client]: +The invitation has the format `smp::::::`. The invitation can only be used once and even if this is intercepted, the attacker would not be able to use it to send you the messages via this queue once your contact confirms that the connection is established. -``` -/add bob -``` +The contact who received the invitation should use `/connect ` to accept the connection (`` is any name that the accepting contact wants to use for you). -And then send the generated invitation to Bob out-of-band. Bob then would use [in his chat client]: - -``` -/connect alice -``` +Once the contact has used the `/connect` command, a connection is established and both parties are notified. They would then use `@ ` commands to send messages. One may also press Space or just start typing a message to send a message to the contact that was the last. @@ -132,9 +144,9 @@ If your contact is disconnected, restart the chat client - it may happen if you Use `/help` in chat to see the list of available commands. -## Accessing chat history +### Access chat history -SimpleX chat stores all your contacts and conversations in the local database file, making it private and portable by design, fully owned and controlled by you. +SimpleX chat stores all your contacts and conversations in a local database file, making it private and portable by design, fully owned and controlled by you. You can search your chat history via SQLite database file: @@ -153,6 +165,23 @@ order by internal_id desc; > **Please note:** SQLite foreign key constraints are disabled by default, and must be **[enabled separately for each database connection](https://sqlite.org/foreignkeys.html#fk_enable)**. The latter can be achieved by running `PRAGMA foreign_keys = ON;` command on an open database connection. By running data altering queries without enabling foreign keys prior to that, you may risk putting your database in an inconsistent state. +## Roadmap + +1. Switch to application level chat protocol. This will allow to separate physical server connection management from logical chat contacts, and to support all common chat functions. +2. SMP queue redundancy and rotation in SMP agent protocol. +3. Symmetric groups support in SMP agent protocol, as a foundation for chat groups. +4. Delivery confirmation in SMP agent protocol. +5. Multi-agent/device data synchronisation - to use chat on multiple devices. +6. Synchronous streams support in SMP and SMP agent protocols, to support file transfer. +7. Terminal chat UI and mobile apps. +8. Scripts for simple SMP server deployment to hosting providers: Linode, Digital Ocean and Heroku. +9. Public broadcast channels. +10. Optional public contact/group addresses using DNS to establish connections, but not using it to send and receive messages - in this way you will keep all your contacts and groups even if you lose the control of the domain. + +## Disclaimer + +System and protocol security have not been audited yet. As such, it is not advised to use SimpleX chat for high security communications. + ## License [AGPL v3](./LICENSE) diff --git a/images/how-to-use-simplex.svg b/images/how-to-use-simplex.svg new file mode 100644 index 0000000000..f7d3cd7f93 --- /dev/null +++ b/images/how-to-use-simplex.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/logo.svg b/images/logo.svg new file mode 100644 index 0000000000..bb4e50787a --- /dev/null +++ b/images/logo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/images/strapline.svg b/images/strapline.svg new file mode 100644 index 0000000000..20ab82b015 --- /dev/null +++ b/images/strapline.svg @@ -0,0 +1,3 @@ + + +