# TorChat - A completely decentralized P2P chat network operating over Tor

---- **Decentralized. Private. Undeniable.** TorChat is the anti-censorship chat layer for the underground internet. Secure, unstoppable, and anonymous β€” this is what messaging should’ve 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.