Skip to main content


Last updated on 09/03/2022.

Sichat stands for Sovereign Individual (SI) Chat. It provides self identity and secure chat in an internet of P2P networks. The requirements of "bring your own device" and "bring your own server" create a fully decentralized ecosystem that enables many secure and individual-centric applications.

The project's Chinese name is "私信" - 主权个人通信.

1 Motivation

1.1 Sovereign Individual

The main idea of "sovereign individual" came from the book The Sovereign Individual: Mastering the Transition to the Information Age. It predicts that the domainant institution in the digital age is sovereign individual. As was in the case that gunpowder, capital and printing press brought the institution transition from religion/feudalism to nation-state, the information revolution is bringing the institution transition from nation-state to soverign individual(SI). Ideally, an SI is someone who

  • has necessary mental capital that plays crucial role in digital economy -- where unskilled workers make much less contributions.
  • has self-sovereign identity, or self identity for short.
  • owns self-sovereign digital assets (bitcoin, NFT, private data).
  • pays tax to autonomous SI organizations.
  • creates and shares narrow-casting (not broadcasting) information.
  • chooses anywhere to live and usually works remotely for self-chosen tasks.

1.2 SI Organization (Siorg)

The human nature of SI searches for meaning in social life. SIs with a common interest form an SI organization, Siorg for short, that can bring the collective morality, a sense of purpose, and a coherent set of orders, primarily in a digital manner. As Siorg unlocks the potential of SIs and minimize the collaboration cost, it will be much more productive than the nation-state. Siorgs, not information-based aggregators (like Google) will be the dominant institution in digital age. Siorg has the following characteristics:

  • it is formed by SIs who share a common interest for a purpose.
  • its creation and operation are decentralized.
  • its autonomous government is mostly based on transparent software contracts.

The Siorg here is a general term: a family, two persons chit-chatting with each other, and an institution with 1,000,000 SIs working/living together are all examples of Siorg. In a chat application context, the chat Siorg is called a group.

2 Sichat Features

Following the "keep it simple stupid" principle, Sichat provides two essential building blocks and a secure chat application for SI and Siorg. The two building blocks are self identity and an internet of P2P networks. More applications can be built on top of self identity and the P2P networks.

2.1 Self Identity

To truly own and control computation and data, SIs in digital age bring their own devices and servers. Individuals create and control their digital identities and related information in their own computers. The core of a self identity is a pair of randomly generated private and public keys. An individual may have multiple identities used in different interaction contexts. There are many challenges to implement this conceptually simple capability because of its crucial role and two often conflicting requirements - easy to use and safe to use. It has the following functions:

  • id creation and storage
  • authentication
  • lost id recovery
  • stolen id revoke
  • id and alias binding
  • data encryption and decryption
  • message signature and verification

We put authentication, encryption and signature as part of self identity module to let the individual to have full control of the cryptography algorithms used in online interactions.

2.2 Private P2P Network

One SI brings at least one computer to create/join a private P2P network. The network is fully decentralized in the sense that it is a P2P network whose only nodes are SIs' computers. Every SI may join one or more Siorg, and one Siorg owns at least one P2P network. Every P2P network runs independently as an VPN and may or may not communicate with other P2P networks.

The P2P network is an overlay network based on one or more of the following networks:

The direct connections use a device's built-in communication technologies such as Wi-Fi or Bluetooth. It is useful in P2P network creation and situations where Internet and mobile network are not available.

Because the P2P network's applications implement end-to-end (E2E) encryption at the application layer, the network makes no assumptions about the security of the underlying network. Additionally, one P2P network may provide add-on services such as VPN or Tor routing functions to its nodes.

2.3 Secure Chat

Individuals form groups that create and use dedicated P2P networks to sent E2E encrypted chat messages to each other. A distinctive feature of Sichat is that each group owns one dedicated P2P network whose nodes are computers from its members. The group-network binding provides many benefits.

  • each group operates independently and autonomously.
  • the performance and scalability are good for most groups.
  • an SI can use different ids/aliases and other settings in different group.

The downside is that an individual usually have many ids and many networks to manage.

2.4 More Applications

With self identity and private P2P network as the foundation, it is straightforward to provide basic decentralized applications as the following:

  • digital wallet and payment
  • group event/calendar management
  • individual/group microblogs or blogs
  • audio/video channels
  • search and index of individuals and/or groups

Following applications requires more efforts but they are good fits for the self-id and private network.

  • all kinds of decentralized autonomous organization (DAO)
  • Web integration
    • self-hosting email server
    • self-hosting web server
    • e-commerce server
  • Blockchain integration
    • public permanent data in block chain
    • world facts from Oracles
    • name server in block chain
  • app store: more applications can be installed on demand

3 System Design

This is a draft design that may change significantly during prototype and following development.

3.1 guiding principles

  • It is fully decentralized by nature, as the way of SIs' life. No one owns the code and the system.
  • In code we trust. Sichat is open source in both the free beer and free speech meanings. It uses a dual license of MIT + Apache 2.
  • It is an open, modularized, customizable, and extensible system that is permanently built by collective effort of SIs.

3.2 System Architecture

Sichat assumes that An SI has the following digital resources:

  • a computer in hand/home that is at least as capable as iPhone 7 (released on 09/16/2016). This computer is called an SI client or client for short.
  • a more reliable and more powerful cloud computer, called An SI server or server for short.

The assumption of bringing your own client and server plays a crucial role to create a fully decentralized network. The reliable connection, computation and storage are important to many non-trivial applications. It also simplifies the implementation because servers have reliable connection, computation and storage.

In future implementation, we may remove the server requirement because many applications don't need the reliability for every SI. In an extreme case, a P2P network only has clients and the network is still useful when Internet and mobile net are not available, and clients can directly connect to each other.

We use the term node to refer either a client or a server when there is no need to distinguish them. An implementation principle is to treat all nodes as much equally as possible to simplify the development.

When two or more SIs form a group, Sichat creates a P2P network. The network is called an orgnet because a chat group is an specific instance of Siorg.

An SI's clients and server are synchronized as soon as possible. Because an server is more reliable than a client, the server's data is used as the source of truth when there is a conflicting between a client and its server.

4 Prototype Plan

The prototype scope is to implement an orgnet consisting of two FSIs.

  • Two SIs create self identifiers and stored both in client and in servers.
  • Two SIs create a group manually using their clients.
  • They send/receive message routed/stored in their servers.

The closest open-source chat protocol is Matrix Protocol. There are many client and sever implementations. Jobs to be done are:

  • implement the self identity.
  • change Matrix federation network into one decentralized orgnet.
  • combine the Matrix client and server to make it a P2P application.
  • create and setup server in cloud.
  • sync data between client and server.

After some explorations, we decide to use the Rust programming language for the server and flutter+ Rust for client.

We use SQLite in both client and server for its simplicity and maturity.

Let's do it.