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
- Settings → Bluetooth contacts lists the people you paired with. Remove stops your phone connecting to theirs; your chat stays. They can still recognise your phone until you tap Change discovery key. Your other contacts get the new key when you next meet.
- If two contacts both change their keys before they meet again, they need to pair again in person.
- If a pairing is refused because your phone already has that person's key saved for someone else, one of the two is not who they seem. Forget the earlier contact only if you are sure the person in front of you is the real one, then pair again and change your discovery key.
- After a restore from your recovery phrase, or Reset local data, your contacts can reconnect by themselves for 72 hours. A restore forgets who you removed, so review Settings → Bluetooth contacts afterwards and change your discovery key. If you had changed your key before the restore, pair with each contact again in person.
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.
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
- Bluetooth range is short, and walls reduce it. Delivery is not guaranteed.
- Private discovery does not hide everything: people you paired with, and people you removed until you change your discovery key, can recognise your phone. A phone relaying for you can recognise yours by the sealed messages you carry. A phone that connects to yours can read your phone's Bluetooth name. Radio fingerprinting, signal strength and timing are unchanged, and the Bluetooth signal still says a PyriteChat phone is here. The privacy page has the full list.
- Relaying through three or more phones in a row has been tested only in a simulator so far.
- Android only for now. One identity works on one phone at a time.
Open source
PyriteChat is built on XMTP and these PyriteShip libraries:
- libxmtp-mesh: XMTP's core library, forked to run over a Bluetooth mesh (Rust core and Android radio)
- xmtp-react-native-mesh: XMTP's React Native SDK with a
meshnetwork option - xmtp-chat-rn: one-to-one XMTP chat screens and hooks for React Native
Protocol details are in DESIGN.md in libxmtp-mesh. Upstream: xmtp/libxmtp and xmtp/xmtp-react-native.