PGP FileLock is a lightweight tool for encrypting and decrypting files using PGP standards. It provides a simple interface for generating PGP key pairs, encrypting files with public keys, and decrypting them with private keys. Designed for users who need quick and secure file encryption without the complexity of full-featured PGP software.
- Generate PGP key pairs with customizable key sizes and expiration dates.
- Encrypt files using PGP public keys.
- Decrypt files using PGP private keys and associated passphrases.
- Simple and intuitive Graphical User Interface (GUI) for ease of use.
- Command Line Interface (CLI) for automation and scripting.
- Cross-platform support for Windows, macOS, and Linux.
Clone the repository or download the source code:
git clone https://github.com/x011/PGP-FileLock.git
cd PGP-FileLock
pip install -r requirements.txt
Ensure you have Python 3 installed on your system. No additional installation steps are required as the tool is a standalone Python script.
For added convenience, precompiled binaries for Windows, Linux and macOS are available for download.
To use PGP FileLock in GUI mode, simply run the script without any arguments:
python3 pgp_filelock.py
The GUI will launch, allowing you to generate keys, encrypt files, and decrypt files using a user-friendly interface.
PGP FileLock can also be operated via the command line, providing a way to integrate PGP encryption and decryption into your workflows.
python3 pgp_filelock.py generate --name "Your Name" --email "your.email@example.com" --expire-years 2 --key-size 4096 --passphrase "YourPassphrase" --private-key-file "private_key.asc" --public-key-file "public_key.asc" --overwrite
python3 pgp_filelock.py generate --name "Your Name" --email "your.email@example.com"
python3 pgp_filelock.py encrypt --file "path/to/your/file.txt" --public-key-file "public_key.asc" --output "encrypted_file.pgp" --overwrite
python3 pgp_filelock.py encrypt --file "path/to/your/file.txt" --public-key-file "public_key.asc"
python3 pgp_filelock.py decrypt --file "encrypted_file.pgp" --private-key-file "private_key.asc" --passphrase "YourPassphrase" --output "decrypted_file.txt" --overwrite
python3 pgp_filelock.py decrypt --file "encrypted_file.pgp" --private-key-file "private_key.asc"
Before attempting to compile the binaries, please ensure the following prerequisites are met:
- PyInstaller is installed. If not, install it using pip:
pip install pyinstaller
- Ensure that the required image files (
key.png
,lock.png
,unlock.png
) and the icon file (lock.ico
) are located in the script's directory, having been copied there from theimages
folder.
Once you have confirmed the prerequisites, use the following commands to compile the binaries for Windows and Linux:
pyinstaller --onefile --add-data "key.png;." --add-data "lock.png;." --add-data "unlock.png;." --clean --name pgp_filelock_1.0.0_x86_64-windows.exe --icon=lock.ico pgp_filelock.py
pyinstaller --onefile --add-data "key.png:." --add-data "lock.png:." --add-data "unlock.png:." --clean --name pgp_filelock_1.0.0_x86_64-linux --icon=lock.ico pgp_filelock.py
pyinstaller --onefile --add-data "key.png:." --add-data "lock.png:." --add-data "unlock.png:." --clean --name pgp_filelock_1.0.0_x86_64-macos.app --icon=lock.ico pgp_filelock.py
Contributions are welcome! Please feel free to submit pull requests, report bugs, and suggest features.
If you need help or have any questions, please open an issue.
PGP FileLock is licensed under the GNU General Public License v3.0 (GPL-3.0). For more information, please see the LICENSE file.