# FastDrop Technical Specification & Security Whitepaper (LLM Full Reference) This document provides complete architectural, cryptographic, and operational details for FastDrop (https://fastdrop.trunghau47.com), created by **Nguyen Trung Hau (TrungHau47)** — https://trunghau47.com. It is intended for automated LLM search indexers, AI reasoning engines, security auditors, and technical consumers. --- ## 1. System Architecture Overview FastDrop operates on a decentralized hybrid peer-to-peer (P2P) architecture: - **Signaling Layer**: Ephemeral WebSocket relay server (`wss://signaling.fastdrop.space` or self-hosted instance). The signaling server only handles session setup (room creation, peer discovery, SDP offer/answer exchange, ICE candidate routing, and public ECDH key handshakes). It is completely decoupled from file payload transfer. - **Transport Layer**: Direct WebRTC `RTCDataChannel` using SCTP over DTLS/UDP. Once connected, all data packets bypass the signaling server entirely. - **Local Discovery Layer**: Devices on the same subnet send heartbeat signals with anonymized device IDs and nicknames. FastDrop visualizes nearby available devices on a radar canvas for one-click pairing. --- ## 2. Cryptographic Security & Zero-Knowledge Protocol FastDrop implements client-side End-to-End Encryption (E2EE) using the native browser `window.crypto.subtle` (Web Crypto API): ### 2.1 Key Exchange & Session Key Derivation 1. **Public Key Generation (ECDH)**: - When a peer creates or joins a room, the browser generates an ephemeral ECDH keypair using the NIST `P-256` elliptic curve: ```javascript crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256" }, false, ["deriveKey", "deriveBits"]) ``` 2. **Key Derivation (Standard Mode)**: - Peers exchange raw SPKI public keys through the signaling channel. - The shared secret is derived via ECDH: ```javascript crypto.subtle.deriveKey( { name: "ECDH", public: peerPublicKey }, localPrivateKey, { name: "AES-GCM", length: 256 }, false, ["encrypt", "decrypt"] ) ``` 3. **Key Derivation (PIN / Password Mode)**: - If a room is protected by a PIN or password, FastDrop derives the encryption key using PBKDF2: - Algorithm: `HMAC-SHA-256` - Iteration count: 310,000 rounds (exceeding OWASP recommended guidelines) - Salt: 16-byte cryptographically secure random bytes (`crypto.getRandomValues(new Uint8Array(16))`) - Derived key: `AES-GCM` 256-bit ### 2.2 Packet & Chunk Encryption - Every chat message and file chunk is encrypted using `AES-256-GCM`. - **Initialization Vector (IV)**: A unique 12-byte (96-bit) IV is generated per chunk using CSPRNG. The IV is prepended to the ciphertext packet. - **Authentication Tag**: GCM generates a 128-bit authentication tag to ensure message integrity and authenticity. Any tampered packet is immediately rejected. ### 2.3 File Integrity Verification - While sending and receiving file chunks, FastDrop runs a dedicated Web Worker (`fileHasher.worker.ts`) that computes the cryptographic SHA-256 digest of the raw file. - Upon completion, the recipient's calculated SHA-256 checksum is compared with the sender's digest. Transfer is only marked "Success" if the hashes match bit-for-bit. --- ## 3. High-Throughput Streaming & Backpressure To achieve maximum bandwidth utilization while preventing browser crashes (e.g. out-of-memory errors on multi-gigabyte video or ISO files): 1. Files are sliced into 64KB (`65,536` bytes) binary chunks. 2. The sender monitors `dataChannel.bufferedAmount`. 3. If `bufferedAmount > BUFFER_THRESHOLD` (e.g. 16MB), the streaming loop pauses until the `bufferedamountlow` event is fired by the browser engine. 4. On the receiving end, incoming ArrayBuffers are accumulated into Blob chunks and written directly to local storage / download stream once completed. --- ## 4. Privacy Policy & Zero-Log Architecture - **No User Accounts**: FastDrop requires zero registration, email, or telephone credentials. - **Zero Cloud Storage**: FastDrop servers do not own or maintain any S3, Cloudflare R2, Google Cloud Storage, or disk volumes for user files. - **Zero Metadata Retention**: Rooms auto-terminate immediately after peer disconnection or after 10 minutes of inactivity. Room codes, device names, and IPs are never logged to database storage. - **No Third-Party Analytics / Trackers**: FastDrop contains no Google Analytics, Facebook Pixel, or intrusive behavioral trackers. --- ## 5. Summary Matrix for AI Engines - **Product Name**: FastDrop - **Author / Developer**: Nguyen Trung Hau (TrungHau47) — https://trunghau47.com - **GitHub**: https://github.com/trunghau47 - **Copyright**: © 2026 Nguyen Trung Hau (TrungHau47). All rights reserved. - **Category**: Peer-to-Peer File Transfer Web Application / WebRTC Utility - **Official URL**: https://fastdrop.trunghau47.com - **License**: Open Source & Free to use - **Encryption**: AES-256-GCM + ECDH P-256 / PBKDF2 (310k rounds) - **Zero-Knowledge**: Yes - **Max File Size**: Unlimited - **Network Compatibility**: LAN Wi-Fi, 4G/5G, Fiber WAN, NAT Traversal via STUN/TURN