A CLI tool for key generation, file encryption and decryption.
This tool has NOT BEEN AUDITED.
It should NOT be used in production environments!
See the relevant section in ABOUT.md.
DenCrypter is capable of:
- Generating keys that are 16/24/32 bytes long
- Encrypting or decrypting files with AES-GCM 128/192/256 or ChaCha20-Poly1305, leveraging the integrity and confidentiality guarantees of AEAD (i.e. Authenticated Encryption with Associated Data)
First, clone the repo and navigate to dencrypter:
git clone https://github.com/AACioffi/dencrypter.git
cd dencrypterThen follow these steps:
- (Optional) create and activate a new venv
pip install .for regular installation, orpip install -e .for editable installationpip install ".[dev]"for test suite installation
Sanity check: open your favourite terminal and type
dencrypter --helpA usage guide should be printed.
Do note that this tool requires Python 3.11+, and that it was not published on PyPI!
dencrypter --generate-key --key-size <n> -o myKeyncan be one of {16, 24, 32}-ospecifies the path of the output file, which will receive a.keyextension
dencrypter --enc myFile.txt --cipher aes192 -k myKey.key -o myEncFile--encspecifies the path to the file to encrypt--cipherspecifies one of {aes128, aes192, aes256, chacha20poly1305}-kspecifies the path of the key file, which must have.keyextension-ospecifies the path of the output file, which will receive a.encextension
dencrypter --dec myEncFile.enc -k myKey.key -o myDecFile--decspecifies the path to the file to decrypt, which must have.encextension-khas the same function as in file encryption-ospecifies the path of the output (decrypted) file
--forcecan be used for file encryption and decryption to overwrite the content of the file specified by-o, if it exists--forceCANNOT be used with--generate-key
For more detailed explanations regarding extension requirements and --force restrictions, see the relevant section in ABOUT.md.
DenCrypter writes a special header to the files it encrypts. Any file that does not possess it will not be decrypted.
See the relevant section in ABOUT.md.
For more details about the project, you can consult:
This project is licensed under the MIT License - see LICENSE for details.