Cryptoolsec is a versatile tool providing both a Command-Line Interface (CLI) and a Graphical User Interface (GUI) for strong file and data stream encryption/decryption on Windows, macOS, and Linux.
It leverages the robust AES-256-GCM authenticated encryption standard, ensuring confidentiality, integrity, and authenticity. For password-based operations, keys are securely derived using Argon2id with unique salts per encryption. Alternatively, raw 32-byte AES keys can be used directly via key files.
The application is built with Python and PySide6 (for the GUI), featuring streaming I/O for handling large files efficiently and a threaded GUI for a responsive user experience.
- Dual Interface: Functional CLI (
cryptoolsec) and modern GUI (cryptoolsec-gui). - Strong Encryption: AES-256-GCM standard.
- Secure Key Derivation: Argon2id with unique salts for passwords.
- Flexible Secret Handling: Supports interactive passwords, password files, password via stdin, and raw key files.
- Large File Support: Uses streaming I/O (chunked processing) for low memory usage.
- Responsive GUI: Background threading prevents UI freezing during operations.
- GUI Enhancements: Progress bar, status messages, platform icon, intelligent output filename suggestion, automatic field clearing.
- Cross-Platform: Python codebase designed for Windows, macOS, and Linux. Packaged builds available (starting with Windows).
- 1. Description
- 2. Key Features
- 3. Index
- 4. Installation
- 5. Usage
- 6. File Format
- 7. Technologies Used
- 8. License
- 9. Project Status
- 10. Contribution
- 11. Contact
-
Prerequisites:
- Python (>= 3.10 recommended, as specified in
pyproject.toml). pip(Python package installer).
- Python (>= 3.10 recommended, as specified in
-
Clone or Download:
- Obtain the project source code.
# Example using Git git clone https://github.com/victorvernier/Cryptoolsec.git # cd Cryptoolsec
-
Create & Activate Virtual Environment (Recommended):
- Navigate to the project root directory in your terminal.
# Create venv python -m venv .venv # Activate venv # Windows: .\.venv\Scripts\activate # Linux/macOS: source .venv/bin/activate
-
Install Project and Dependencies:
- With the virtual environment activated, install
Cryptoolsecand its dependencies usingpipand thepyproject.tomlfile. Using the editable (-e) flag is recommended for development.
# Installs dependencies and creates the 'cryptoolsec' and 'cryptoolsec-gui' commands pip install -e .
- This command reads
pyproject.toml, installs the packages listed underdependencies(PySide6,pycryptodome,argon2-cffi), and makes the entry points available.
- With the virtual environment activated, install
After installation (pip install -e .), the following commands become available in your terminal (while the virtual environment is active):
- Launch GUI:
cryptoolsec-gui
- Use CLI:
cryptoolsec <command> [options...]
cryptoolsec <command> [options...]encrypt: Encrypt input file/stream to output file/stream.decrypt: Decrypt input file/stream to output file/stream.
-i FILE,--input FILE: Input file path. Reads from stdin if omitted.-o FILE,--output FILE: Output file path. Writes to stdout if omitted.--verbose: Show detailed debug messages.-q,--quiet: Show only error messages.-V,--version: Show program version.-h,--help: Show help message (use after command for specific help, e.g.,cryptoolsec encrypt -h).
One of these mutually exclusive options is required for both encrypt and decrypt:
--password-interactive: Securely prompts for password entry.--password-file FILE: Reads password from the first line ofFILE.--password-stdin: Reads password from the first line of stdin (for piping).--keyfile FILE: Uses the raw 32-byte AES key fromFILE.
- Encrypt
doc.txttodoc.encusing interactive password:
cryptoolsec encrypt -i doc.txt -o doc.enc --password-interactive- Decrypt
pic.jpg.enctopic.jpgusing password fromkey.txt:
cryptoolsec decrypt -i pic.jpg.enc -o pic.jpg --password-file key.txt- Encrypt large
archive.zipusingsecret.keyfile, show verbose logs:
cryptoolsec --verbose encrypt --keyfile secret.key -i archive.zip -o archive.zip.enc- Compress, encrypt, and upload a folder using pipes:
tar czf - /my/folder | cryptoolsec encrypt --keyfile secret.key > backup.tar.gz.enc
# (Upload backup.tar.gz.enc)- Download, decrypt, and extract using pipes:
# (Download backup.tar.gz.enc first)
cat backup.tar.gz.enc | cryptoolsec decrypt --keyfile secret.key | tar xzf - -C /restore/here-
Launch: Run
cryptoolsec-guiin your terminal (after installation and with venv active). -
Select Files: Use the "Select..." buttons to choose your Input File and define your Output File path. The output filename will be suggested automatically based on the input file (adding/removing
.enc). -
** Secret Method:** Select either "Use Password" or "Use Key File".
-
Enter Secret:
- If "Use Password", type the password in both fields (input is masked).
- If "Use Key File", click "Select Key File..." and choose your raw 32-byte key file.
-
Click Action: Click "Encrypt" or "Decrypt".
-
Monitor: The UI will disable, and the progress bar will show activity (it might be indeterminate if reading from stdin, not yet implemented in GUI). A success or error message will appear upon completion.
-
Repeat: Input fields will clear automatically after the operation finishes.
The encrypted output (.enc file) format depends on the secret method used:
-
Password Mode:
[16-byte Salt][12-byte IV][Ciphertext][16-byte GCM Tag] -
Key File Mode:
[12-byte IV][Ciphertext][16-byte GCM Tag](No Salt is stored as none was needed for key derivation)
- Python (>= 3.10)
- PySide6 (for the GUI)
- pycryptodome (for AES-GCM implementation)
- argon2-cffi (for Argon2id key derivation)
- PyInstaller (for packaging)
Distributed under the GPL-3.0 license. See LICENSE file or LICENSE for more information.
v0.2.0 - Beta / Pre-release: Core functionality for both CLI and GUI is implemented. Successfully passed initial manual tests and a core suite of automated end-to-end CLI tests covering main encryption/decryption workflows (password file, keyfile) and common error conditions (wrong password, file not found). Comprehensive automated test coverage (more CLI scenarios, unit tests, GUI tests) is pending. Not recommended for production use with critical data until further testing.
Contributions, bug reports, and feature requests are welcome! Please open an issues to discuss changes or report problems.
Victor Oliveira (L0g0rhythm) - Connect via the links on the profile site: l0g0rhythm.github.io
