Inspiration

In regions with limited or compromised internet connectivity, access to information and secure communication remains a critical challenge. Traditional messaging apps and file transfer solutions rely entirely on centralized servers—a single point of failure that can be disabled or surveilled. We envisioned a world where people could communicate and share files freely, even without internet access.

What We Learned

Building a truly decentralized system taught us the fundamentals of distributed systems:

  • Kademlia DHT for peer discovery without trackers
  • BitTorrent-style chunking for efficient file distribution
  • Double Ratchet algorithm for end-to-end encryption with forward secrecy
  • NAT traversal techniques for P2P connectivity
  • Local AI inference with Ollama for offline assistance

How We Built It

Archipel Protocol implements a complete peer-to-peer architecture:

  1. P2P Networking: Custom node implementation with UDP/TCP transport
  2. DHT: Kademlia-based distributed hash table for peer discovery
  3. File Transfer: BitTorrent-style chunking with Merkle tree verification
  4. Encryption: X25519 key exchange + AES-256-GCM + Double Ratchet
  5. AI Integration: Ollama local LLM for contextual assistance via @ai tag
  6. CLI Interface: User-friendly command-line interface for all operations

Challenges We Faced

  • NAT traversal and firewall traversal without central STUN servers
  • Implementing reliable message delivery in an offline-first environment
  • Optimizing file chunking for various network conditions
  • Ensuring forward secrecy without relying on external key servers
  • Running local AI inference efficiently on consumer hardware

Future Improvements

  • Mobile app for iOS/Android
  • Voice and video calling
  • File streaming with adaptive chunking
  • Tor/I2P integration for enhanced anonymity
Share this project:

Updates