torchat/README.md
2025-06-23 15:08:10 +00:00

142 lines
No EOL
5.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TorChat - A completely decentralized P2P chat network operating over Tor
<p align="center">
<a href="https://haveno.com"><img src="https://foss.haveno.com/tor-project/torchat/raw/branch/main/assets/images/torchat-compressed-rounded.png" width=275 /></a>
</p>
----
**Decentralized. Private. Undeniable.**
TorChat is the anti-censorship chat layer for the underground internet. Secure, unstoppable, and anonymous — this is what messaging shouldve always been.
---
## 🌐 Overview
TorChat is a fully decentralized, Tor-based messaging protocol and chat client built for total freedom of speech and association.
There are no servers, no corporate intermediaries, no identity leaks — only encrypted peer-to-peer communication over the Tor network.
-**End-to-End Encryption** (ECC, ECDH + ChaCha20Poly1305)
-**gRPC over Onion**: High-performance communication via Tor
-**Offline Message Persistence** via trusted forwarders
-**Signed Identity Graphs** for trust bootstrapping
-**Federated Group Chats** with on-chain moderation rules
-**Forward secrecy, metadata protection**, and more...
---
## 📦 Features
| Feature | Status | Description |
|----------------------------------|-----------|-------------|
| 🔐 End-to-End Encryption | ✅ | Uses Ed25519 keys and modern AEAD for message security |
| 🧅 Onion Routed gRPC | ✅ | gRPC over SOCKS5 for strong anonymity and multiplexed streams |
| 📬 Asynchronous Delivery | 🛠️ | Store-and-forward routing via trusted nodes with spam prevention |
| 👥 Group Messaging | 🛠️ | Federated group identity, roles, voting, moderation |
| 🧠 Identity Reputation Layer | 🛠️ | Web-of-trust over signed attestations |
| 📜 Anti-Spam ZK Proofs | 💡 Idea | Messages must include ZK token to prove identity stake or PoW |
| 🧩 Modular Plugin System | 💡 Idea | Add bots, bridges (e.g., IRC, XMPP), file sharing, media channels |
| 💻 Cross-Platform Client | ✅ | Built in Dart/Flutter with native Rust crypto backend |
| 💾 IPFS-Backed Message Vault | 💡 Idea | Optionally enable message history vaulting in IPFS bundles |
| ⚙️ Scriptable Automation | 💡 Idea | Autoresponders, programmable agents, trading bots... |
---
## 🚀 Roadmap
### 🔹 Phase 1 Core Protocol (MVP)
- [x] Onion-based transport (Tor SOCKS5 support)
- [x] Peer discovery (via embedded seed node list + gossip)
- [x] Identity model (Ed25519 keys, signature attestations)
- [x] Chat session establishment (ECDH, gRPC)
- [ ] Forwarding protocol for offline delivery
- [ ] Basic CLI and Flutter-based UI client
- [ ] Minimal spam prevention via time-locked messaging
### 🔸 Phase 2 Social Layer
- [ ] Group chat architecture
- [ ] Group-level moderation: bans, mutes, admin rotation
- [ ] Identity trust graphs (signed attestations)
- [ ] Optional profile metadata (bio, avatar, etc.) stored off-chain
### 🔻 Phase 3 Extension & Hardening
- [ ] Native emoji, file attachments, stickers
- [ ] Message expiration & disappearing chats
- [ ] Optional censorship-resistant history via IPFS
- [ ] “Stealth” mode: make node unreachable except via invite
### 🔺 Phase 4 Plug-in & Monetization
- [ ] Plugin framework (Rust or Dart)
- [ ] Bot scripting: p2p trading, atomic swaps, moderation
- [ ] Integration with Monero-based payments
- [ ] Tokenless (or optional stake-based) spam control
---
## 🛠️ Tech Stack
- **Frontend:** Flutter (Dart)
- **Backend Protocol:** gRPC over Tor (SOCKS5 proxy)
- **Encryption:** Ed25519, ECDH, ChaCha20Poly1305
- **Persistence:** Dart/Rust hybrid binary
- **Decentralization:** Tor hidden services, optionally dHT or gossip relay
- **Identity Model:** Public keys signed by other peers in attestations
---
## 📁 Project Structure
```
TorChat/
├── lib/ # Flutter/Dart client
├── proto/ # gRPC protospecs
├── rust/ # Rust backend (crypto, networking, etc.)
├── tor/ # Tor bootstrapping and routing code
├── seednode/ # Optional seednode bootstrap peer (only required until network consensus is well established)
└── README.md
```
---
## 🔐 Security Philosophy
TorChat is designed for real-world censorship resistance.
That means:
- Metadata-resistant communication
- No third-party servers
- Forward secrecy
- Optional multi-device support via per-device keys
- Message padding / traffic obfuscation (future)
---
## 🌍 Vision
We want TorChat to become *the* base layer for p2p chat —
Something like if **Briar**, **Session**, and **Monero** had a privacy-focused lovechild.
No app store bans. No governments blocking traffic. No KYC. Just pure encrypted messages flying across an anonymous mesh of nodes.
---
## 🤝 Get Involved
- Open a [discussion](https://foss.haveno.com/haveno-network/haveno-core/discussions)
- Submit issues or ideas
- Contribute to the protocol spec or write plugins
- Help us build bridges to other networks
---
## 🧠 Inspired by
- [Tor Project](https://www.torproject.org/)
- [Monero](https://www.getmonero.org/)
- [Haveno](https://haveno.com)
- [Session](https://getsession.org/)
- [Nym](https://nymtech.net/)
- [Matrix](https://matrix.org/)
- [Briar](https://briarproject.org/)
## 📜 License
AGPLv3+ — because freedom is viral.