# TG Drive > TG Drive is a free, unlimited cloud storage Progressive Web App (PWA) and native Android application that transforms personal Telegram Cloud Storage into a high-performance Google Drive alternative using official Telegram MTProto 2.0 protocols and Zero-Knowledge End-to-End Encryption (E2EE). ## Current Version - **Version:** 3.5.0 Stable Release (Build 2700) - **Documentation URL:** https://tgdriveo.pages.dev/docs - **Full Markdown Documentation:** https://tgdriveo.pages.dev/docs.md - **Full LLM Context:** https://tgdriveo.pages.dev/llms-full.txt - **Official Web App:** https://tgdriveo.pages.dev/ - **Android APK:** https://github.com/Saini920/DevKit-Manager-v4.0.7/releases/download/tg-drive-2.0.0/TG_Drive_2.0.0.apk ## Core Capabilities - **Storage Backend:** Direct client-side MTProto 2.0 communication with Telegram servers via GramJS. Files are stored in your personal Telegram "Saved Messages" chat. - **Quota & Capacity:** Unlimited storage (visualized as 9999 TB in dashboard). - **Per-File Upload Limit:** Strict 2.0 GB per file limit (aligned with Telegram standard file limits). - **Batch Uploading:** Up to 100 files queued in a single batch with automatic chunking. - **Concurrent Downloads:** 3 simultaneous downloads managed by a smart queue to eliminate Telegram `FLOOD_WAIT` rate limits and browser memory exhaustion. - **Streaming & Persistence:** High-speed MTProto chunk streaming via Service Worker directly to browser native download manager, with smart pause & resume. ## Zero-Knowledge End-to-End Encryption (E2EE) Vault - **Cipher:** AES-256-GCM (Authenticated Encryption with 128-bit authentication tags and unique 12-byte IVs per chunk). - **Key Derivation:** Argon2id (memory-hard: 96 MB memory, 4 passes, 1 lane for new vaults; 64 MB, 3 passes for older ones) with a 128-bit (16-byte) CSPRNG random salt. Each vault slot records the KDF that produced it, so legacy slots with no `kdf` field keep deriving via PBKDF2-HMAC-SHA256 (100,000 rounds) for byte-identical key continuity — existing PINs and files are never invalidated. On low-RAM devices the memory cost scales down (16 MB) rather than weakening the algorithm, and if WebAssembly is unavailable the app falls back to PBKDF2 instead of locking the user out. - **High E2E Encryption (Standard):** Client-side AES-256-GCM envelope encryption derived from a Master PIN (6-8 digits for new PINs) via memory-hard Argon2id (96 MB, 4 passes for new vaults; 64 MB, 3 passes; PBKDF2-100k fallback for legacy vaults) + 16-byte salt. Supports dual-channel OTP recovery (Saved Messages/Bot) and 12-word recovery phrase. Blue "Encrypted" badge with Lock icon. - **Device-Seed Hardening & Config Authentication:** The shared file key is wrapped by a random 256-bit per-device seed that is **never published**; the seed is stored locally under memory-hard Argon2id (96 MB for new vaults) with an exponential attempt throttle (3 free tries, then a growing lockout; the seed is never destroyed), while legacy PBKDF2-wrapped seeds keep loading unchanged. The published `#TG_DRIVE_VAULT_CONFIG#` envelope is **HMAC-SHA256 authenticated** with an HKDF-derived key from the vault file key and verified on every unlock, so an injected device slot or a swapped recovery verifier is detected as tampering. New device slots never publish a PIN-wrapped file key. - **Metadata Encryption:** File names, MIME types and folder membership are sealed with AES-256-GCM under a dedicated HKDF-SHA256 metadata key derived from the shared vault file key (envelope `v1.`, AAD-bound to account + item + key epoch). The real filename is not written to the message caption or the Telegram document attribute. Byte size, upload timing and folder names remain visible. - **Secure Device Pairing:** A new device can be enrolled from an already-unlocked device over a one-time, expiring handshake — no recovery phrase needed. The new device sends a link request and any already-unlocked device surfaces an **Approve / Deny** prompt in real time (no camera); **Deny** rejects it immediately so the new device's login fails at once, and **Approve** only publishes the approver's ephemeral public key so the **new device itself leaves the QR screen for a Verify Code screen showing the identical 6-digit code** — the key is released by a mandatory second step, **Confirm Match / Authorize**, after the user has compared the two on-screen codes. It can also show a QR code and a human-typable short code (e.g. `7K4M-2M9`, a locator only, never a secret) that the trusted device scans or types. Each side mints a fresh ephemeral **P-256** keypair, both derive a shared secret, and the file key is sent as an **AES-256-GCM** bundle encrypted (via HKDF-SHA256) to the new device's ephemeral key — so the raw key never appears in Telegram. Both devices then show the same 6-digit **SAS** for out-of-band comparison (computed locally, never transmitted) to defeat man-in-the-middle attempts. The request expires after 5 minutes and link messages are deleted once the handshake completes. A missed real-time update (for example while switching networks) is covered by an active poll of Saved Messages every ~2.5 s while the listener is active, with a clear "Reconnecting…" state if the socket drops. The poll is hardened: every Telegram RPC is timeout-bounded so a half-open socket can never wedge it, failures back off exponentially, a dropped socket is actively reconnected, connectivity returning forces an immediate deep (search) sweep, a search is forced whenever no request is in the newest window, and a request that lands while the vault is locked raises a notice to unlock. **Up to 5 devices** can be linked at once (the Connected Devices list shows a `used/5` counter); linking a 6th drops the **oldest** slot, so that device must be re-linked or recovered. Vault settings also show a **Connected Devices** list with a per-device **Revoke** (removes the slot from the re-signed config; revocation is sticky and can't be re-added from a stale cache; a revoked device is locked out in real time, and the list updates in real time on add/revoke/logout; note that every revoke also rotates the shared file key, so a revoked device cannot read future uploads). Each device additionally publishes a static P-256 **exchange key** (`kxPub`) in its slot — rotation now uses it on every revoke to deliver a new epoch key to the remaining devices (so a revoked device cannot read future uploads). - **Multi-Device Sharing Architecture (High E2E):** Enables seamless cross-device access across phone, laptop, desktop, and tablet. Salt and canary tokens are anchored in Telegram Saved Messages (`#TG_DRIVE_VAULT_CONFIG#`). Logging in on a new device auto-discovers the vault; entering the same Master PIN derives the matching key locally and decrypts all files without manual key exports. There is **no account-level escrow key**: the vault file key is never derived from public data, so opening an existing vault on a new device requires the same Master PIN already used on another device, a one-time QR / short-code link from an already-unlocked device, or the 12-word recovery phrase (Forgot PIN / Recover Vault). To protect multi-device integrity, a new device that can neither match the existing Master PIN nor recover with the phrase is **blocked** from creating a second, mismatched file key — there is only ever one vault file key. - **Multi-Primary Architecture & Peer Revocation Authority:** Multiple primary devices can exist concurrently (the vault creator + any device authenticated with the 12-word recovery phrase). Any active Primary device holds administrative authority to revoke any other device slot in real time—including peer primaries. Linked seed devices (enrolled via QR / pairing without the 12-word phrase) have non-authoritative privileges and cannot revoke devices. - **Revoked Device Lockout & Re-Login Protocol:** When a device is revoked by an active Primary, its slot is purged and its salt is added to the `revokedSalts` denylist. Entering a PIN on the revoked device rejects unlock and redirects to `/login`. To rejoin, the user must authenticate via Telegram and recover using their 12-word recovery phrase or re-link via an active Primary. - **Zero-Knowledge Recovery Phrase Cloud Exclusion & Crash Resilience:** The 12-word recovery phrase is **never uploaded** to Telegram Saved Messages (even encrypted with AES) to preserve zero-knowledge boundaries. Keys are stored locally in transactional SQLite/IndexedDB (WAL mode), surviving sudden PC power cuts or hard reboots without data loss. - **Session Re-Sealing on File Key Rotation:** When the vault file key is rotated or refreshed, the active MTProto session string is automatically re-sealed under the new key, ensuring seamless session continuity without losing login state. - **Critical Security Warnings:** - *Telegram Saved Messages Integrity:* Never delete `#TG_DRIVE_FILE#` (file chunk pointers) or `#TG_DRIVE_VAULT_CONFIG#` (salt & canary tokens) in Saved Messages. - *Re-Login Old PIN:* Always input the Old Master PIN upon re-login to preserve cryptographic key continuity and prevent permanent file corruption. - **Re-Login Old PIN Architecture (Decentralized State Anchor):** Logging out purges local device storage (8-tier wipe) but leaves Telegram Saved Messages (`#TG_DRIVE_VAULT_CONFIG#`) and encrypted files intact. Upon re-logging into the same account, TG Drive detects the existing vault and demands the **Old PIN** to decrypt the existing ciphertext key. Allowing a "New PIN" would derive a mismatched key, permanently corrupting existing files. Forgotten PINs can be reset using the 12-word recovery phrase: recovery preserves the existing vault file key (so previously uploaded files stay readable), re-enrolls this device under a fresh random device seed, purges the old PIN/legacy slots so the old PIN cannot unlock again, and leaves every other device's seed slot intact. - **Strict Device-Specific Lock & Envelope Encryption:** Devices bind locally to their own device slot (Option A), rejecting other devices' PINs while preserving cross-device file decryption via a shared 256-bit vault file key. A new device must **adopt** that shared key (same Master PIN or recovery phrase); it never fabricates a divergent key. - **Real-Time Auto-Healing Watchdog:** If `#TG_DRIVE_VAULT_CONFIG#` is deleted from Telegram Saved Messages, active devices auto-recover and republish it back to Telegram within seconds upon sync, message deletion, or window focus. - **Encrypted BIP-39 Mnemonic at Rest:** 12-word recovery phrase is stored strictly encrypted with AES-256-GCM (`tg_vault_encrypted_recovery_phrase`) and decrypted exclusively in volatile RAM upon vault unlock; zero plaintext stored in `localStorage` or `IndexedDB`. - **Hardened Credential Storage:** MTProto session string, API credentials, and Bot Token are stored encrypted under `VAULT_DATA_KEY` with automatic purging of plaintext fallback keys. - **Disaster Recovery:** 12-Word BIP39 Root Seed phrase enables vault recovery and Master PIN reset. Recovering verifies the phrase, then preserves the existing vault file key (so your files stay readable), re-enrolls this device under a fresh random device seed, and purges the old PIN/legacy slots (a Confirm/Cancel warning is shown first), leaving every other device's seed slot intact. - **Dual-Channel OTP Password Reset:** User choice between direct Saved Messages MTProto delivery (0% bot ban risk) and Telegram Bot with session preservation. - **Biometric Security:** Native Android Keystore integration for hardware-backed fingerprint and face unlock. - **Session Termination Watchdog:** Real-time MTProto revocation interception preserves the 12-word recovery phrase before wiping local caches. - **8-Tier Cache Purging & Server-Side Revocation:** Confirmed logout invokes MTProto `Api.auth.LogOut()` on Telegram core servers to terminate remote authorization, followed by local purge (IndexedDB, Dexie VFS DB, Cache API, in-memory blobs, localStorage, sessionStorage, Biometric Keystore). - **Android Native Container Hardening:** Production WebView debugging disabled (`webContentsDebuggingEnabled: false`), mixed HTTP content blocked, top-level navigation restricted (`allowNavigation: []`), ADB backups disabled (`android:allowBackup="false"`), and release signing keystores decoupled from Git tracking into encrypted CI/CD secrets (`KEYSTORE_BASE64`). ## Key Documentation Files - [/docs](https://tgdriveo.pages.dev/docs): Official interactive HTML documentation. - [/docs.md](https://tgdriveo.pages.dev/docs.md): Comprehensive Markdown documentation. - [/llms-full.txt](https://tgdriveo.pages.dev/llms-full.txt): Complete documentation formatted for LLM consumption. - [/telegram-cloud-storage/](https://tgdriveo.pages.dev/telegram-cloud-storage/): Landing page on using Telegram as free unlimited cloud storage (Saved Messages, limits, safety, Google Drive comparison). - [/telegram-drive-apk/](https://tgdriveo.pages.dev/telegram-drive-apk/): Landing page for the Telegram Drive APK — Android install steps, PWA alternative, safety notes. ## Common Questions (People Also Ask) - **How do I access my Telegram cloud storage?** Open Telegram and tap Saved Messages; everything you send yourself is stored there. To browse it as a drive, open TG Drive and connect your Telegram account — Saved Messages are indexed into folders with search and a media gallery. - **Is it safe to use Telegram as cloud storage?** Telegram can read what it stores. TG Drive adds an optional zero-knowledge vault: contents, file names, MIME types and folder membership are encrypted client-side with AES-256-GCM, so Telegram only holds ciphertext. - **How big is the Telegram cloud?** Telegram advertises storage as unlimited with no published total quota. Each file may be up to 2 GB (4 GB with Telegram Premium); TG Drive shows the space as 9999 TB. - **Can I use Telegram for unlimited cloud storage?** Yes — Telegram Saved Messages is the free unlimited layer and TG Drive is the drive interface on top of it. No tiers, no subscription. - **How do I clear Telegram cloud storage?** Delete the messages in Saved Messages, or delete the files from TG Drive (which removes the underlying Telegram messages). Space is freed immediately. - **How do I download Telegram Drive for Android?** Install the signed TG Drive APK, or add the PWA to your home screen from the browser — both are free. - **What is the maximum file size?** 2 GB per file on a normal Telegram account, 4 GB with Telegram Premium. - **Does TG Drive work on iOS, Windows and macOS?** Yes — the web app is a PWA and runs in any modern browser; the native build is Android-only. ## Multilingual Discovery & Global Search Synonyms - **English:** TG Drive, TGDrive, TG-Drive, TDrive, T-Drive, Telegram-Drive, Telegram Drive, Telegram Cloud Storage, Use Telegram as Cloud Storage, Telegram Saved Messages Storage, Telegram Saved Messages Organizer, Telegram Unlimited Cloud Storage, Free Cloud Storage Without Subscription, Telegram File Manager, Google Drive Alternative Telegram, Google Drive Clone for Telegram, E2EE Cloud Storage, Serverless Cloud Storage, Telegram Drive APK, Telegram Drive for Android, Telegram Drive Download, Teldrive Alternative, TDrive Alternative, UnLim Alternative, TgStorage Alternative. - **Chinese (中文):** TG网盘, 电报网盘, Telegram网盘, 纸飞机网盘, 免费无限云盘, 电报云存储, TG云盘, 个人私有云盘, 免费云存储, 不限速网盘, 谷歌云盘替代品, 百度网盘替代, 夸克网盘替代, Telegram文件管理器. - **Russian (Русский):** ТГ Драйв, Телеграм Диск, Телеграм Облако, Бесплатное облачное хранилище, Безлимитное облако Телеграм, Облачный диск, Альтернатива Google Drive, Яндекс Диск альтернатива, Файлы Телеграм, Защищенное хранилище. - **French (Français):** TG Drive, Stockage Cloud Telegram, Cloud Gratuit Illimité, Lecteur Telegram, Disque Telegram, Gestionnaire de fichiers Telegram, Alternative gratuite à Google Drive, Stockage cloud sécurisé. - **Spanish (Español):** TG Drive, Almacenamiento en la nube Telegram, Nube ilimitada gratis, Disco Telegram, Unidad en la nube segura, Alternativa a Google Drive, Gestor de archivos Telegram, Nube gratis sin limites. - **German (Deutsch):** TG Drive, Telegram Cloud Speicher, Kostenloser unbegrenzter Cloud-Speicher, Telegram Laufwerk, Sichere Cloud Festplatte, Google Drive Alternative kostenlos. - **Japanese (日本語):** TG ドライブ, テレグラム クラウドストレージ, 無料 無制限 クラウド, クラウド ドライブ, ファイルマネージャー, Google ドライブ 代替, セキュア クラウド ストレージ. - **Arabic (العربية):** تي جي درايف, تخزين سحابي تيليجرام, سحابة غير محدودة مجانية, قرص تيليجرام, بديل جوجل درايف, مدير ملفات تيليجرام, تخزين سحابي آمن مجانا. - **Portuguese (Português):** TG Drive, Armazenamento em nuvem Telegram, Nuvem ilimitada gratis, Disco Telegram, Alternativa Google Drive gratis, Gerenciador de arquivos Telegram. - **Hindi (हिन्दी):** टीजी ड्राइव, टेलीग्राम ड्राइव, फ्री क्लाउड स्टोरेज, अनलिमिटेड क्लाउड स्टोरेज, टेलीग्राम फाइल मैनेजर, गूगल ड्राइव जैसा ऐप.