THOTH is a lightweight Python tool for secure file encryption and decryption.
- Automatic encryption/decryption: The tool detects whether a file is encrypted and acts accordingly.
- Strong key derivation: Uses Argon2id to derive keys from passwords, resisting brute-force and GPU attacks.
- Authenticated encryption: Encrypts data using AES-256-GCM, providing confidentiality and integrity.
- Self-describing encrypted files: Encrypted files contain authenticated metadata, including the original filename.
- Safe error handling: Detects incorrect passwords, corrupted files, or invalid input without data loss.
- Minimal and fast: Simple CLI interface with few dependencies.
Ensure you have Python 3 installed along with the required libraries:
pip install cryptography argon2-cffi- Clone the repository:
git clone https://github.com/stigsec/thoth.git- Navigate to the project directory:
cd thothpython3 main.py fileYou will then be prompted to input a password.
python3 main.py test.txtAfter inputting a password, a file 'test.txt.thoth' will be created and original 'test.txt' will be deleted.
python3 main.py test.txt.thothAfter inputting a password, a file 'test.txt' will be created and encrypted 'test.txt.thoth' will be deleted.
NOTE: Renaming the encrypted file does not affect decryption.
- Key Derivation: A cryptographic key is derived from the password using Argon2id with a random per-file salt.
- Encryption: File contents are encrypted using AES-256-GCM.
- Authenticated Header: The encrypted file includes authenticated metadata:
- Magic identifier
- Salt
- Nonce
- Original filename
- Any modification to the header or ciphertext is detected during decryption.
- Integrity Protection: Incorrect passwords or tampered files fail securely without producing corrupted output.
- Passwords are requested via secure prompt (not visible in process lists).
- Files are only deleted after successful encryption or decryption.
- No insecure algorithms are used.
- No user-configurable cryptographic parameters that could weaken security.
- THOTH is designed for local file encryption and does not attempt to manage key storage or recovery.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Developed by stigsec.