Skip to content
cipher-d-devPublic

About

Encrypted messaging transfer over local mesh network discovery

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Aetheris

Offline messaging that hops from phone to phone.

No internet, no cell signal, no servers, no accounts. Every phone running Aetheris is also a relay: your message jumps across nearby phones until it reaches the person you sent it to, by the shortest path available.

How it works

  1. Finding people. Phones find each other over Bluetooth and connect automatically. When it can, the link upgrades itself to Wi‑Fi for speed. This uses Google's Nearby Connections, so it needs no internet.
  2. Finding the route. Every few seconds each phone tells its neighbours who it can reach and in how many hops. From that, every phone works out the next hop on the shortest path to everyone in the mesh. If a phone walks away, the routes heal around it.
  3. When there's no route yet. The message waits on your phone, and a few copies are handed to people you meet. It's delivered when a route appears or when someone carrying it walks into range of the recipient.
  4. Privacy. Messages are end-to-end encrypted. The phones relaying them can't read them. Your identity is a key pair stored on your device; there's no phone number or email.
  5. Trust. Each phone signs its own route announcements and display name, so another phone can't fake a route to steal someone's messages or pretend to be someone else.

You get a delivery receipt (double tick ✓✓) when the message arrives. Long-press a message to see the route it took.

Features

  • Open the app, type your name, and you're in. No phone number, no account.
  • Add a profile photo if you like. It's shrunk to a small thumbnail and shared with people you're near or chat with.
  • People tab: everyone nearby with Aetheris, by name. Tap someone to chat.
  • Chats that feel like any modern messenger: ✓ sent, ✓✓ delivered, photos, voice messages, group chats
  • If someone has walked away, your message waits and is delivered when they're back nearby
  • Light and dark mode, plus a "Save battery" switch
  • Settings → Help → "Send a problem report" when something doesn't connect

Run it

You need Android Studio (SDK + NDK), Node 18+, and 2 or more Android phones with Google Play Services (Android 7+). The Android emulator can't do Bluetooth.

npm install
npx react-native run-android

Install it on each phone, open it, enter a name and tap Allow and continue.

Release build

Create a signing key once:

keytool -genkeypair -v -keystore aetheris-release.keystore -alias aetheris -keyalg RSA -keysize 2048 -validity 10000

Then add these lines to ~/.gradle/gradle.properties, outside the repo (never commit them):

AETHERIS_UPLOAD_STORE_FILE=/absolute/path/to/aetheris-release.keystore
AETHERIS_UPLOAD_STORE_PASSWORD=...
AETHERIS_UPLOAD_KEY_ALIAS=aetheris
AETHERIS_UPLOAD_KEY_PASSWORD=...

Build the APK:

cd android && ./gradlew assembleRelease

Install it on every test phone. All phones need a build from the same key, or Android won't update over an existing install.

Test the multi-hop relay

  1. Put phone A and phone C far apart, out of range of each other (different floors or ~100 m+), with phone B in between.
  2. Wait for C to appear in A's People tab.
  3. Send a message from A to C. It should show ✓✓. Long-press it and tap Info: it says it reached C through 1 other phone.
  4. Store-carry-forward: turn C off, send from A, carry B over to C, and turn C on. The message is delivered and the receipt comes back the same way.

Limits

  • Android only for now. iPhones don't support Nearby Connections. An iOS version would need Apple's Multipeer Connectivity and would only talk to other iPhones.
  • Range: about 30–100 m per hop, depending on walls and phones.
  • Mesh size: built for a few to a few dozen phones. Routes are capped at 16 hops.
  • Attachments are capped at ~300 KB, because every relay has to carry them.
  • Names are chosen by each person. Another phone can't fake someone else's name for the same person, but two people can pick the same name; when that happens a short code is shown next to it. You can rename anyone (only you see it).

Code map

Path What's there
src/mesh/ The mesh brain: routing table, forwarding, receipts. Plain TypeScript, fully simulated in tests
src/store/meshService.ts Connects the radio, the mesh, the database and the UI
src/crypto/ Ed25519 identity and signatures, X25519 + XSalsa20‑Poly1305 encryption (libsodium)
src/db/ SQLite storage
src/screens/ UI
android/.../NearbyMeshManager.kt Radio: discovery, connections, sending bytes
android/.../MediaHelper.kt Photo compression, voice recording and playback

Tests

npm test
npm run typecheck
npm run lint

GitHub Actions runs these on every pull request and builds a ready-to-install APK (aetheris-apk), which you can download from the run's artifacts.

The tests simulate meshes of up to 14 phones (including random layouts checked against true shortest paths), links breaking, offline carry-and-deliver, lost receipts and forged messages. They also run one relay end to end with real libsodium, and the app's service layer against real SQLite.


MIT License · Built by cipher-d-dev

About

Encrypted messaging transfer over local mesh network discovery

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages