Algorithm whitepaper
Version v1.0 · 2026-08
DiskTank uses widely validated modern cryptographic primitives to build end-to-end encrypted, auditable, censorship-resistant tunnels. This document explains the algorithm choices and protocol design for engineers and security researchers.
1. Cryptographic primitives
- Key exchange / handshake: Noise IKpsk2, providing identity hiding and mutual authentication.Key exchange / handshake: Noise IKpsk2, providing identity hiding and mutual authentication.Key exchange / handshake: Noise IKpsk2, providing identity hiding and mutual authentication.
- Symmetric encryption: AES-256-GCM / ChaCha20-Poly1305 (AEAD, security-equivalent, negotiated per device), ensuring confidentiality and integrity.Symmetric encryption: AES-256-GCM / ChaCha20-Poly1305 (AEAD, security-equivalent, negotiated per device), ensuring confidentiality and integrity.Symmetric encryption: AES-256-GCM / ChaCha20-Poly1305 (AEAD, security-equivalent, negotiated per device), ensuring confidentiality and integrity.
- Key derivation: HKDF (SHA-256) derives session keys from the shared secret.Key derivation: HKDF (SHA-256) derives session keys from the shared secret.Key derivation: HKDF (SHA-256) derives session keys from the shared secret.
- Forward secrecy: each session handshakes independently; long-term keys only authenticate identity.Forward secrecy: each session handshakes independently; long-term keys only authenticate identity.Forward secrecy: each session handshakes independently; long-term keys only authenticate identity.
2. Handshake and key exchange
IKpsk2 completes the handshake with a shared pre-shared key (PSK, issued by the control plane per group), verifying both the PSK and long-term identity keys. On success, both sides derive ephemeral session keys for the data plane.
3. Data-plane encryption
Packets are encrypted end-to-end, then carried by the underlying transport (UDP / DTLS / WSS). Relays forward ciphertext only and cannot decrypt or tamper. MACs ensure any tampering is detected and dropped immediately.
4. Anti-censorship transport
- De-fingerprinting: randomized handshakes and message formats avoid DPI signatures.De-fingerprinting: randomized handshakes and message formats avoid DPI signatures.De-fingerprinting: randomized handshakes and message formats avoid DPI signatures.
- Fallback chain: raw UDP → DTLS 1.3 → WSS (443, disguiseable as a normal site), degrading to stay connected.Fallback chain: raw UDP → DTLS 1.3 → WSS (443, disguiseable as a normal site), degrading to stay connected.Fallback chain: raw UDP → DTLS 1.3 → WSS (443, disguiseable as a normal site), degrading to stay connected.
- Port hopping: dynamically migrate ports to evade targeted blocking.Port hopping: dynamically migrate ports to evade targeted blocking.Port hopping: dynamically migrate ports to evade targeted blocking.
- Pluggable: support for Reality, uTLS and other anti-censorship protocols.Pluggable: support for Reality, uTLS and other anti-censorship protocols.Pluggable: support for Reality, uTLS and other anti-censorship protocols.
5. Key management
Group PSKs are generated by the control plane and delivered encrypted, with scheduled rotation. Device identity keys are generated locally and never leave the device. Relays hold no keys that can decrypt session traffic.