Repository navigation
3 Security and Cryptography
Your Name edited this page Aug 26, 2026
·
1 revision
Tincan is engineered to guarantee privacy, zero-knowledge authentication, and transport confidentiality.
Security is enforced at two distinct layers:
- Transport Layer Encryption: End-to-End Encryption (E2EE) over QUIC TLS 1.3.
- Admission Control: Zero-knowledge challenge-response password authentication.
When joining a password-protected room:
Joining Peer Coordinator (Host)
│ │
├───────────── QUIC TLS 1.3 Connect ──────────────►│
│ │
│◄───────────── 32-Byte Nonce N ──────────────────┤
│ │
Compute Proof: │
K = Argon2id(password, N) │
│ │
├───────────── Proof Key K ──────────────────────►│
Verify Proof:
Expected = Argon2id(password, N)
Match -> Grant Entry
- Zero Password Transmission: The plain-text password is never sent over the wire.
-
Replay Attack Defense: Because the host generates a cryptographically random 32-byte nonce
$N$ for every join attempt, a captured proof cannot be replayed by eavesdroppers. - Argon2id Memory Hardness: Protects against GPU/ASIC brute-force dictionary attacks.
-
QUIC TLS 1.3: Every connection is encrypted using QUIC TLS 1.3 backed by Ed25519 public key pairs via Iroh (
src/net/endpoint.rs). - Invite Code = Public Key: The 63-character invite code is the Base32 representation of the coordinator's public key.
- DERP Relay Privacy: When direct P2P hole punching fails, traffic flows through encrypted DERP relays. Relays cannot read audio or text payloads because they lack decryption keys.
| Threat | Risk Level | Defense Mechanism |
|---|---|---|
| Password Interception | Low | Zero-knowledge Argon2id nonce challenge |
| Replay Attacks | Low | Fresh host nonce on every connection attempt |
| Wire Eavesdropping | Low | QUIC TLS 1.3 encryption for streams & datagrams |
| Man-in-the-Middle | Low | Iroh Ed25519 public key verification |
| Relay Tampering | Low | E2E encrypted QUIC payload |