🕵️‍♂️ Private by design. Peer-to-peer. Tor-native.

Zero-trust messaging for people who actually care.

TanMesh is a free Tor-routed, peer-to-peer messenger that never relies on a central server. Each node is its own onion service. Sessions use X25519 + HKDF + AES-GCM with per-message keys and forward secrecy.

Tor v3 onion routing, out-of-the-box
Static identity keys + ephemeral session keys
CLI & desktop GUI in one binary
TanMesh session snapshot
End-to-end encrypted
$ tanmesh --name Alice
[i] Starting embedded Tor (SOCKS 127.0.0.1:59xxx)...
[i] Tor hidden service is ready:
  nz6kflc…yhiad.onion

======================================================
 TanMesh secure P2P messenger (Tor + PFS)
======================================================
 Name        : Alice
 Node ID     : 65d391db…
 Local bind  : ('127.0.0.1', 9999)
 Onion addr  : nz6kflc…yhiad.onion
   → Share this .onion + your Node ID with friends.

Commands:
  /contacts      - manage contacts (onion + node_id)
  /connect-id    - connect using saved contact
  /msg           - send encrypted message
  /rekey         - force PFS rekey on demand

Why TanMesh

Built for threat-model-heavy conversations.

TanMesh is not “just another chat app.” It’s designed for people who understand threat models, who don’t trust central servers, and who want verifiable, inspectable security properties.

🧩

No central server, ever.

TanMesh runs as a local node on your machine. Each node exposes a Tor v3 onion service. Messages never transit through a proprietary cloud backend – they go directly peer-to-peer over Tor.

Tor v3 onion services
🔐

Modern cryptography inside.

Static X25519 keys define your long-term identity. For each session, TanMesh generates fresh ephemeral keys and performs a 4-way DH (ss, se, es, ee) which feeds into HKDF. Message keys are derived per-message and used with AES-GCM.

X25519 • HKDF-SHA256 • AES-GCM
🧯

Forward secrecy & rekeying.

Each message ratchets the chain key. On top of that, you can trigger an on-demand rekey that rotates the ephemeral keypair and salts a new root key. Past messages remain confidential even if a key is compromised later.

Session & message PFS
🖥

GUI & CLI in the same app.

Prefer terminals? Run TanMesh in full CLI mode. Prefer a desktop app? Launch the Qt-based GUI with live peers list, per-peer timelines, and broadcast controls – powered by the same secure backend.

PySide6 desktop UI
📒

Identity-aware contacts.

Each contact entry binds an alias to both an onion address and a hashed node_id. When you connect, TanMesh verifies that the remote key matches the stored identity to mitigate accidental mis-dial and simple MITM attempts.

Identity binding checks
🧊

Traffic shape & padding.

Each encrypted frame pads its payload to 256-byte boundaries before AES-GCM, making message sizes less informative to an observer watching packet lengths.

Length-hiding padding

Use cases

Where TanMesh feels at home.

  • High-risk personal communications where you can’t rely on mainstream messengers.
  • Red-team & research setups where you want a controllable, inspectable codebase instead of a black box.
  • Air-gapped bridges via Tor gateways and hardened endpoints.
  • Developers & students learning how real world secure protocols are composed.

TanMesh is provided for legitimate, lawful use only. You are responsible for complying with local laws and regulations in your jurisdiction.

# start your node tanmesh --name "Alice" # share with a friend: # onion address + node_id (identity hash) # add them as a contact /add-contact bob 65d391dba5… nz6kflcryrmhdsyc….onion 9999 # connect via Tor /connect-id bob # send end-to-end encrypted chat /msg 0 hey, this session is fully over Tor 👋
TanMesh runs as a local process, so it fits nicely into hardened OS setups, sandboxes, and VPN layers on top of Tor.