A portable, cross-PC USB encryption utility that automatically encrypts/decrypts files stored on your USB drive using a password prompt. Built with Python, PyInstaller, and packaged with a professional Windows installer using Inno Setup.
🛡️ Lock and unlock sensitive files seamlessly — just plug in your USB and go!
- 🔒 AES Encryption with password protection
- 🔁 Auto-lock on unplug, unlock on reinsert
- 💡 Graphical Password Dialog (no command-line)
- ☁️ Unlimited password attempts
- 💼 Portable — runs directly from the USB
- 🧳 Minimizes to tray with quit option
- 🎨 Custom icon support
- 📦 Windows installer included
- On first run, you’re prompted to set a password.
- All files inside
secure_files/will be encrypted. - When plugged back in, it prompts for your password and decrypts everything upon success.
Clone this repo or download the latest release.
Or compile it yourself:
git clone https://github.com/your-username/usb-encryption-tool.git
cd usb-encryption-tool- Python 3.x
- cryptography
- pystray
- Pillow
Install with:
pip install cryptography pystray pillowpyinstaller --onefile --noconsole --icon=usb_lock.ico usb_lock.pyUSB/
├── usb_lock_win.exe ← compiled app
├── run_usb_lock.bat ← auto launcher
├── secure_files/ ← encrypted file folder
├── usb_lock.ico ← optional custom icon
Use Inno Setup and run usb_lock_installer.iss.
✅ It will generate a .exe installer that installs directly to your USB.
The app minimizes to the system tray on Windows. Right-click the icon to quit the app.
The installer looks for a USB drive containing a file named usb_target_marker to install files to that drive automatically.
MIT License. Feel free to fork, customize, and distribute.
Pull requests and improvements are welcome!
- Fork the repo
- Create your feature branch:
git checkout -b cool-feature - Commit changes
- Push to the branch
- Open a PR!
- Auto-run setup via USB (cross-platform)
- Hidden file system or vault mode
- OTP/2FA login integration
- Mac/Linux compatibility (basic support already possible)
- Encryption:
cryptography - GUI and Tray:
tkinter,pystray,Pillow - Installer: Inno Setup
🔗 Stay safe, and encrypt smart. 💾🔐