Veilid and Tor
I'm been following the Veilid project since their announcement at DefCon in 2023. I've been excited by the possiblities and the technology. A quote from The Register nails it:
"The idea being here that apps – mobile, desktop, web, and headless – can find and talk to each other across the internet privately and securely without having to go through centralized and often corporate-owned systems. Veilid provides code for app developers to drop into their software so that their clients can join and communicate in a peer-to-peer community."
For an overview of what it is and how it works, the team put together a video introduction you can find on YouTube or the or the free server of your choice.
I'm been playing around with their chat app for Android, VeilidChat, with middling success -- it is still a work in progress but one can easily see the potential here. And with the release of a new file transfer program called distrans, the future of DHT-based peer-to-peer communcation is coming in to focus.
For my own edification, I started to put together some notes on the key differences between Tor and Veilid. I will note here that I am no expert, and if I get something wrong, I am more than happy to be corrected and will post edits to this article as needed.
Tor vs Veilid: Some Notes
Veilid vs. Tor: Key Differences and Use Cases
Both Veilid and Tor are privacy-focused, decentralized networks, but they serve different purposes and operate in distinct ways. Below is a breakdown of how they compare.
1. Primary Purpose
- Tor: Designed for anonymous web browsing.
- Veilid: Designed for secure peer-to-peer (P2P) application development.
2. Network Architecture
- Tor: Uses a circuit-based onion routing system with centralized directory authorities to manage relays.
- Veilid: Uses a peer-to-peer (P2P) distributed network where all nodes contribute directly.
Comparison:
Feature | Tor | Veilid |
---|---|---|
Type of network | Onion routing | Peer-to-peer (P2P) |
Central authority | Has directory authorities | Fully decentralized |
Routing | Multi-hop (3+ nodes, fixed circuit) | Dynamic routing between nodes |
Primary function | Anonymized browsing | Secure P2P app development |
3. Routing Mechanism
- Tor: Uses onion routing, where traffic is encrypted in layers and passes through 3 or more random relays before reaching its destination.
- Veilid: Uses a Kademlia-like distributed hash table (DHT) for routing, dynamically choosing the best node.
How They Route Data:
Feature | Tor | Veilid |
---|---|---|
Routing style | Fixed circuits | Adaptive, node-based |
Encrypted layers | Onion routing (multi-layer) | End-to-end encryption |
Exit nodes required? | Yes | No |
Latency | Higher (multi-hop relays) | Lower (direct routing) |
4. Data Storage & Use Cases
- Tor: Used mainly for web traffic (browsing .onion sites, sending data anonymously).
- Veilid: Can store and sync encrypted data across nodes, allowing decentralized apps.
Key Use Cases:
Use Case | Tor | Veilid |
---|---|---|
Anonymous browsing | Yes | No |
Hosting hidden services | Yes | Possible (not the main use case) |
P2P file storage | No | Yes |
Decentralized messaging | No | Yes |
Social media apps | No | Yes |
5. Privacy & Security Model
- Tor: Anonymizes who you are and where you are connecting from.
- Veilid: Encrypts what you are doing, but doesn’t focus on making you untraceable.
Comparison:
Feature | Tor | Veilid |
---|---|---|
Anonymity | Strong | Moderate |
Encryption | Multi-layered | End-to-end |
Can mask IP? | Yes | No |
Metadata leaks | Low | Very low |
6. Speed & Latency
- Tor: Slow due to multi-hop relays.
- Veilid: Faster, since it uses direct connections when possible.
Performance:
Feature | Tor | Veilid |
---|---|---|
Speed | Slower (multi-hop relays) | Faster (direct P2P) |
Bandwidth | Limited | Scalable |
Exit nodes | Required | Not needed |
7. Resistance to Censorship
- Tor: Can be blocked if exit nodes are banned.
- Veilid: Harder to block because it’s fully decentralized.
Comparison:
Feature | Tor | Veilid |
---|---|---|
Can be blocked? | Yes (by blocking Tor nodes) | No (no fixed servers) |
Requires relays? | Yes | No |
Hard to detect? | No | Yes |
Final Notes
Scenario | Probable Best Choice |
---|---|
Browsing the internet anonymously? | Tor |
Accessing .onion sites? | Tor |
Building a secure P2P chat app? | Veilid |
Hosting a censorship-resistant website? | Tor |
Storing decentralized files? | Veilid |