a p2p messenger that works
even when the internet doesn’t.

and uses whatever you happen to have — LAN, bluetooth, LoRa radio, SMS.

no accounts. no central servers. your identity is a keypair that lives on your device.

// part of project enclave · early development · gpl-3.0


what is this

// skip if you want to

enclave messenger is the first piece of project enclave — started because i live in Manipur, India, where internet shutdowns are real. when they happen, whatsapp, upi, telegram — all of it dies. they all depend on central servers that suddenly can't be reached.

that's a stupid design. so i'm trying to build something different — a messenger that finds peers directly over whatever medium is available. internet, LAN, bluetooth, LoRa radio. whatever works.

it’s not finished. it’s a hobby project. but i genuinely care about this one.


how it works (roughly)

// the architecture in a tree

transport layer
  ├── internet      → raw DHT (kademlia-based) — needs a bootstrap peer
  ├── local network → nmap-style peer discovery
  ├── sms           → via local or cloud sms api
  ├── bluetooth     → arduino / esp32 / device api
  └── lora          → arduino / esp32 (long range, low bandwidth)

identity layer
  ├── ed25519 keypair  → who you are (signing)
  └── x25519 prekeys  → how sessions start (key exchange)

crypto layer
  └── x25519 ecdh + aes-256-gcm → e2e encryption today (double ratchet in progress)

ui
  ├── flutter → desktop + android (main targets)
  ├── python + curses → terminal ui, vim-style keybindings
  └── python bridge → web ui

no accounts. no servers. user id is derived from your public key. nobody can take it from you.

// the DHT transport needs at least one already-reachable peer to bootstrap from — no public tracker exists yet, and it doesn’t get you through NAT by itself. details in the crypto section below.


current status

// early. like, really early.

done

identity system

LAN discovery

message format + delivery

bluetooth transport

plugin system

SMS transport

DHT node (internet transport)

terminal ui (tui)

multiple profiles — run several accounts at once

in progress

double ratchet sessions

flutter ui

LoRa transport

planned

mobile app

proper docs


transports

// how it finds peers

transportwhat it doesstatus
internetraw DHT, kademlia-based, no central tracker — needs a bootstrap peer, doesn’t traverse NAT by itselfdone
local networknmap-style peer discoverydone
smsvia local or cloud sms apidone
bluetootharduino / esp32 / device apidone
loraarduino / esp32, long range low bandwidthin progress

crypto

// how it stays private

ed25519

your identity keypair. used for signing. who you are on the network.

x25519

used to establish sessions. lets two devices agree on a shared secret without ever sending it.

x25519 ecdh + aes-256-gcm

what actually encrypts messages today: a fresh ephemeral key per message against the recipient’s static key, so forward secrecy applies per message. continuous double ratchet sessions (signal-style, one key schedule per conversation) are still in progress — not implemented yet.


tech stack

// it’s a mess but it’s my mess

python — backend / core python — cli / tui dart + flutter — desktop + mobile html / css / js — web ui c++ — arduino / esp32

running it

// early beta available.

one-liner (linux / macOS / fish / bash)

// this is the most tested and preferred method

curl -sL https://raw.githubusercontent.com/Project-Enclave/setup/main/messenger.sh -o /tmp/enclave-setup.sh && bash /tmp/enclave-setup.sh

or manually

git clone https://github.com/Project-Enclave/Enclave-Messenger
cd Enclave-Messenger
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python set.py
python tui.py

one-liner for windows (powershell)

irm https://raw.githubusercontent.com/Project-Enclave/setup/main/messenger.ps1 -OutFile $env:TEMPenclave-setup.ps1; & $env:TEMPenclave-setup.ps1

one-liner for windows (command prompt)

curl -sL https://raw.githubusercontent.com/Project-Enclave/setup/main/messenger.bat -o %TEMP%enclave-setup.bat
%TEMP%enclave-setup.bat

or manually

git clone https://github.com/Project-Enclave/Enclave-Messenger
cd Enclave-Messenger
py -3 -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python set.py
python tui.py

// umm, so i have NOT tested the windows stuff, because i dont have a windows pc/laptop...

prefer a browser over a terminal? same setup, then:

python3 web.py

// install scripts live in Project-Enclave/setup


acknowledgements

// people who actually helped