Add optional encrypted Vault Mode for private storage#39
Draft
imissapixel wants to merge 1 commit intocaamer20:mainfrom
Draft
Add optional encrypted Vault Mode for private storage#39imissapixel wants to merge 1 commit intocaamer20:mainfrom
imissapixel wants to merge 1 commit intocaamer20:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds an optional client-side encrypted Vault Mode alongside the existing Telegram Drive storage flow.
Normal Drive remains the default behavior. It continues to use Saved Messages and
[TD]Telegram channel folders, and its existing command path is unchanged.Vault Mode introduces a separate encrypted storage backend selected after Telegram login. It stores encrypted file blobs and encrypted manifest snapshots in a private Telegram channel named
TelegramVault, while keeping vault metadata and folder structure inside the encrypted manifest.Technical Changes
Storage Mode Selection
[TD]channel-based storage flow.Vault Backend
Adds a Rust vault backend with:
TelegramVault.Vault Commands
Adds a separate vault command path:
cmd_vault_createcmd_vault_unlockcmd_vault_lockcmd_vault_get_filescmd_vault_upload_filecmd_vault_download_filecmd_vault_delete_filecmd_vault_move_filescmd_vault_create_foldercmd_vault_delete_foldercmd_vault_scan_folderscmd_vault_search_globalcmd_vault_get_previewcmd_vault_get_thumbnailDashboard Routing
Makes the existing dashboard mode-aware:
Local Stream Server
Extends the local stream server:
/stream/{folder_id}/{message_id}behavior remains unchanged for Normal Drive.mode=vault.Documentation
Security Notes
Out of Scope
Verification
cargo checkcargo testnpm run buildManual smoke tests: