Understanding Orb's security design and threat analysis.
Orb is designed to securely share files between two parties through an untrusted relay server. This document analyzes the threat model and security guarantees.
Client Endpoints:
- User's local machines are not compromised
- Operating system is trusted
- Go runtime is memory-safe
- Crypto libraries are correct
Users:
- Users protect their passcodes
- Users authenticate each other out-of-band
- Users follow security best practices
Relay Server:
- Considered "honest-but-curious"
- May log metadata
- May be compromised
- Cannot break encryption
Network:
- Passive eavesdroppers present
- Active attackers may inject/modify
- No assumptions about network security
Capabilities:
- Observe all network traffic
- Record encrypted sessions
- Passive monitoring only
Goals:
- Decrypt file contents
- Identify communicating parties
- Map file access patterns
Protections:
End-to-End Encryption:
All data encrypted with ChaCha20-Poly1305
Relay sees only ciphertext
Forward Secrecy:
Ephemeral keys per session
Past sessions secure even if passcode compromised later
Minimal Metadata:
Session IDs are random
No user identifiers transmitted
Remaining Risks:
- Traffic analysis (connection timing, sizes)
- Correlation attacks over time
Capabilities:
- Intercept network traffic
- Modify messages in transit
- Impersonate endpoints
- Block communication
Goals:
- Decrypt communications
- Inject malicious files
- Impersonate sharer or connector
Protections:
Mutual Authentication:
Noise Protocol handshake
Both parties prove knowledge of passcode
Cannot be impersonated without passcode
Authenticated Encryption:
Poly1305 MAC prevents tampering
Modified messages rejected
Replay Protection:
Nonce counter prevents replays
Each message is unique
Remaining Risks:
- If attacker obtains passcode (social engineering)
- Denial of service (blocking connections)
Capabilities:
- See all encrypted traffic
- Log session IDs
- Observe connection patterns
- Terminate connections
- Delay messages
Goals:
- Decrypt file contents
- Identify users
- Map social connections
- Disrupt service
Protections:
Blind Relay Design:
Relay has no decryption keys
Cannot see plaintext data
End-to-end encryption bypasses relay
No Authentication at Relay:
Relay doesn't know user identities
Session IDs are random
No persistent accounts
Tamper Detection:
Authentication tags detect modification
Encrypted handshake prevents impersonation
Remaining Risks:
- Metadata analysis (timing, size, patterns)
- Denial of service
- Traffic correlation attacks
- Logging session IDs for enumeration
Capabilities:
- Send crafted file requests
- Attempt path traversal
- Symlink exploitation
- Resource exhaustion
- Protocol abuse
Goals:
- Read files outside shared directory
- Escalate privileges
- Crash sharer
- Consume resources
Protections:
Path Sanitization:
// internal/filesystem/secure_fs.go
func sanitizePath(base, requested string) (string, error) {
// Resolve to absolute path
absRequested := filepath.Join(base, filepath.Clean(requested))
// Ensure within base directory
if !strings.HasPrefix(absRequested, base) {
return "", errors.New("path traversal detected")
}
return absRequested, nil
}Symlink Protection:
Symlinks resolved and validated
Cannot escape shared directory
Resource Limits:
Max file read: 10 MB per request
Max message size: 2 MB
Connection timeouts: 60 seconds
Read-Only Access:
No write operations supported
No file deletion
No remote execution
Remaining Risks:
- Authorized files may contain malware
- Resource consumption within limits
- Timing side channels
Capabilities:
- Guess session IDs
- Try multiple passcodes
- Automate connection attempts
- Use GPU/ASIC for cracking
Goals:
- Guess correct passcode
- Enumerate valid sessions
- Access unauthorized files
Protections:
Argon2id Key Derivation:
Time: 3 iterations (~100ms per attempt)
Memory: 64 MB per attempt
GPU/ASIC resistant
Rate Limiting:
5 failed attempts = session lockout
Generic error messages
No timing attacks
Strong Randomness:
Session IDs: 12 random characters (62^12 ≈ 3×10^21)
Passcodes: High entropy random strings
Remaining Risks:
- Weak user-chosen passcodes (if supported in future)
- Distributed attacks across many sessions
- Offline cracking if ciphertext captured (mitigated by Argon2id)
Attacker: Intelligence agency, ISP Goal: Identify who is sharing what with whom
Attack:
- Monitor all network traffic
- Record encrypted sessions
- Correlate connection patterns
- Perform traffic analysis
Orb Protection:
- Traffic encrypted end-to-end
- No plaintext metadata
- Connection timing visible
- Session IDs in WebSocket headers
Mitigation:
- Use TLS relay (wss://)
- Mix traffic with cover traffic
- Use Tor for anonymity (advanced)
Attacker: Untrusted relay server operator Goal: Decrypt shared files
Attack:
- Set up malicious relay
- Log all traffic
- Attempt to decrypt
- Break encryption
Orb Protection:
- End-to-end encryption
- Relay has no keys
- Perfect forward secrecy
- Cannot decrypt without passcode
Mitigation:
- Self-host relay
- Use trusted relay operators
- Regularly rotate sessions
Attacker: Malware on client machine Goal: Steal files or passcodes
Attack:
- Keylogger captures passcode
- Screen capture reveals session ID
- Memory dump extracts keys
- Direct file access
Orb Protection:
- Cannot protect against endpoint compromise
- If machine is pwned, game over
Mitigation:
- Keep systems patched
- Use antivirus/EDR
- Encrypt disk
- Physical security
Attacker: Phisher or impersonator Goal: Trick user into sharing passcode
Attack:
- Impersonate legitimate user
- Request session credentials
- Use credentials to access files
Orb Protection:
- Technical controls work correctly
- Cannot prevent user from sharing passcode
Mitigation:
- Verify identity out-of-band
- Use encrypted channels
- Never share passcodes publicly
- Security awareness training
Attacker: Authorized user with malicious intent Goal: Exfiltrate sensitive files
Attack:
- User has legitimate access
- Shares sensitive directory
- Downloads to unauthorized device
- Leaks or sells data
Orb Protection:
- Cannot prevent authorized access abuse
- Can log and audit activity
Mitigation:
- Principle of least privilege
- Audit sharing logs
- Monitor for anomalies
- Data loss prevention tools
| Threat | Protection |
|---|---|
| Network eavesdropping | End-to-end encryption |
| Man-in-the-middle | Mutual authentication |
| Malicious relay | Zero-knowledge design |
| Path traversal | Sandboxing |
| Replay attacks | Nonce counters |
| Brute force | Argon2id + rate limiting |
| Data tampering | Authentication tags |
| Session hijacking | Cryptographic binding |
| Threat | Reason |
|---|---|
| Endpoint compromise | Out of scope |
| Weak passcodes | User responsibility |
| Social engineering | User error |
| Malware in files | Content-agnostic |
| Quantum computers | Classical crypto only |
| Traffic analysis | Metadata leakage |
| Insider threats | Authorized access |
| Physical access | Out of scope |
Key Sizes:
- Argon2id: 256-bit output
- X25519: 128-bit security
- ChaCha20: 256-bit keys
- Poly1305: 128-bit security
Overall Security Level: ~128 bits
Equivalent to:
- RSA 3072-bit
- AES-128
- Sufficient for SECRET classification (NSA Suite B)
Not Quantum-Resistant:
- X25519 broken by Shor's algorithm
- ChaCha20 weakened by Grover's algorithm
- Post-quantum migration needed
Side-Channel Leakage:
- Timing attacks mitigated but not eliminated
- Cache timing possible on shared CPUs
- Power analysis on embedded devices
Implementation Bugs:
- Orb not formally verified
- Potential for subtle bugs
- Regular security audits recommended
GDPR:
- Encryption in transit
- Minimal data collection
- Right to erasure (stop sharing)
- Data minimization
HIPAA:
- Technical safeguards
- Organizational policies required
- Business associate agreements needed
CCPA:
- Consumer privacy
- Data security
- No sale of data
Encryption Strength:
- ChaCha20: 256-bit keys
- May be subject to export controls
- Check local regulations
Endpoint compromise → Complete system compromise Passcode phishing → Unauthorized access Physical device theft → Data exposure if disk not encrypted
Traffic analysis → Metadata leakage Malicious relay → DoS, traffic analysis Weak passcodes → Brute force possible
Network eavesdropping → Encrypted MITM attacks → Authenticated Path traversal → Mitigated
-
Post-Quantum Crypto:
- Add Kyber for key exchange
- Hybrid classical + PQ
-
Anonymity:
- Tor integration
- Mix networks
- Traffic padding
-
Metadata Protection:
- Onion routing
- Traffic obfuscation
- Timing randomization
-
Hardware Security:
- TPM integration
- HSM support
- Secure enclaves
Orb provides strong security against network attackers and malicious relays through:
- End-to-end encryption
- Mutual authentication
- Zero-knowledge relay design
- Filesystem sandboxing
However, users must:
- Protect passcodes
- Verify peer identity
- Secure endpoints
- Follow best practices
- Read Cryptography Details
- Review Best Practices
- Check Security Overview