A chat app for the end of the world.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Noise

A chat app for the end of the world.

Build Status

What's wrong with chat today

On traditional chat platforms, mobile devices connect over the Internet to a central server which is responsible for relaying messages to their destinations. This has a few problems:

  • Cell phone towers and the servers implementing chat services are single points of failure.
  • Natural disasters can easily wipe out infrastructure. In Puerto Rico, it took months to restore cell phone service after Hurricane Maria.
  • Cell phone service tends to be unreliable in sparsely populated areas.
  • At concerts, conventions, protests, or similar situations, cell phone towers can be overloaded making it difficult to get packets through.
  • In China, North Korea, Turkey, and anywhere else that freedom of speech is not respected, existing communications infrastructure is monitored and censored.

How Noise will fix this

A formal paper describing Noise could be titled: "Adapting epidemic routing for commodity phones in adversarial conditions". Let's unwrap this:

  • Epidemic routing is a store-and-forward protocol that allows messages to travel long distances over random connections between any two nodes. These connections can happen if two Noise users enter each other's vicinity. When this happens, the app will automatically connect and sync messages as long as they are close enough.
  • To enable this as a plug-and-play solution, I implemented a battery-efficient way for Android apps to automatically discover and connect to nearby devices over Bluetooth. Once you install Noise, your phone is part of the network and can send and receive messages. No extra hardware is needed.
  • To prevent spam and jamming, individual messages require a proof-of-work. This makes it computationally difficult to create new messages but easy to verify them while syncing. Messages that fail this check are discarded.
  • The proof-of-work is also used to assign importance to an individual message. While syncing, more recent and more important messages are sent first, and less important messages are deleted first when the database exceeds its preset size limit. In this way, the proof-of-work also establishes a pseudo-TTL.

This provides a prioritized flat database of cleartext messages. Two-way chat can be implemented on top of this:

  • Identity announcement can just be a message with high importance. By including a public key here, others will be able to send messages to this identity.
  • The Signal protocol was originally designed to provide end-to-end encrypted chat on top of SMS. As a result, it works on top of asynchronous links.
  • When syncing, Noise can check if any of its private keys can decrypt the message. If it can, then the message has reached its destination.

I also plan on making this database available as a local API to allow developers to build robust communications into their apps.

What works so far

  • Epidemic routing over Bluetooth
  • Proof-of-work for message validation