Work in progress. PyriteChat is in early testing on Android. Features, and this site, will change. Do not rely on it for anything important yet.

How PyriteChat works

What PyriteChat does, and briefly how.

Your identity

When you first open PyriteChat, it creates a cryptographic key on your phone. That key is your identity. There is no sign-up, and no phone number, email address or password. You choose a display name, which the people you pair with and message can see.

The app shows you a 12-word recovery phrase. Write it down: it restores the same identity if you lose your phone or reinstall the app. Anyone who has the phrase can use your identity, so keep it private.

Pairing in person

Stand next to the other person, open Add on both phones and tap Start. Each phone shows six digits. If both show the same six digits, tap Same digits on both. A scanned code alone does not connect two phones. Pairing turns off after 5 minutes or 5 unfinished tries.

On Bluetooth, only people you paired with can message you. On XMTP's internet network (Settings → Network), you add people by QR code instead, and people you have not added can message you; their messages go to Requests, where you can accept, ignore or block them.

Messaging over Bluetooth

Phones connect over Bluetooth Low Energy and exchange messages directly; by default the app contacts no servers. Your phone does not advertise your identity: it sends a short code that changes every 15 minutes, made from a discovery key it gives only to the people it pairs with.

A message to someone out of range waits on your phone as queued until their phone, or a phone that can carry it, comes into range.

Relaying through other phones

Phones running PyriteChat help each other reach further, contacts or not. If your contact is a few phones away, your message is passed from phone to phone, usually within seconds. A phone that meets you can also carry your message for up to 10 minutes and hand it over when it meets your contact.

A relayed message is sealed. The phones that pass it along cannot read it or tell who sent it, who it is for, or which conversation it belongs to. A connection with a phone that is not your contact carries only these sealed messages and closes after 10 minutes at most. Some things still show, such as roughly how far away the sender is; the privacy page lists them.

Messages to a contact travel through other phones only after you have met them in person once with relay on.

Relaying for others is on by default, uses some battery, and pauses below 15% battery. You can turn it off in Settings → Network → Relay for others. While it is off, your messages reach only contacts in direct Bluetooth range, and only they can reach you.

Removing contacts and restoring

Encryption

Messages use XMTP, an open protocol that encrypts each conversation end to end with MLS (an IETF standard). Only the two people in it can read it.

Each Bluetooth link is also encrypted with the Noise protocol framework before either phone says anything. Between contacts, only the phone being called learns which contact is calling. Between strangers, neither phone is named. When pairing, the six digits come from the handshake, so a device in the middle would make the two phones show different digits.

Signed message order

With no server to order a chat's messages, one phone in each chat does it and signs every message. Every phone checks the signature before saving a message, so a device in the middle cannot reorder, renumber or change messages without being caught. It can still drop or delay them.

XMTP's network

Settings → Network also offers XMTP's own network, which uses the internet and sends your encrypted messages through XMTP's servers.

The Settings, Network screen: Bluetooth mesh selected, XMTP network as the internet option, and the Relay for others switch turned on.
Settings → Network

Updating from an older test build

Phones on older test builds cannot see phones on the current one. Update, then pair again in person with each contact. Your chats and their history stay.

Limits

Open source

PyriteChat is built on XMTP and these PyriteShip libraries:

Protocol details are in DESIGN.md in libxmtp-mesh. Upstream: xmtp/libxmtp and xmtp/xmtp-react-native.