Secure File Sharing
June 17, 2025โข195 words
๐ Secure File Sharing in
k4li-chat-cli to support encrypted file sharing while preserving end-to-end encryption.
๐ How it Works
The system uses ntfy's built-in support for attachments combined with symmetric AES encryption between peers.
- The file is encrypted with a shared key.
- The encrypted file is uploaded as an ntfy attachment.
- A message is sent with the download URL (optionally encrypted).
- Peers can download and decrypt the file locally.
๐ CLI Usage Example
Sending a File
/sendfile path/to/document.pdf
- Encrypts the file with AES (shared secret with peer)
Receiving and Decrypting
- Downloads the encrypted file
- Decrypts it using the shared AES key
- Saves it as the original filename
๐ Security Notes
- Files are encrypted client-side using the same AES-256 key used for messages.
- The ntfy server only stores ciphertext, with no knowledge of the contents.
- Metadata (like the original filename) is encrypted as well.
โ Ideal For
- Sharing notes, photos, PDFs between trusted peers
- Secure collaboration while traveling or on untrusted networks
- Anonymous dropboxes (when combined with anonymous usernames)