Skip to content

Repository files navigation

DenCrypter

A CLI tool for key generation, file encryption and decryption.


Disclaimer

This tool has NOT BEEN AUDITED.

It should NOT be used in production environments!

See the relevant section in ABOUT.md.


Features

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)

Installation

First, clone the repo and navigate to dencrypter:

git clone https://github.com/AACioffi/dencrypter.git
cd dencrypter

Then follow these steps:

  1. (Optional) create and activate a new venv
  2. pip install . for regular installation, or pip install -e . for editable installation
  3. pip install ".[dev]" for test suite installation

Sanity check: open your favourite terminal and type

dencrypter --help

A usage guide should be printed.

Do note that this tool requires Python 3.11+, and that it was not published on PyPI!


Usage

Key generation

dencrypter --generate-key --key-size <n> -o myKey
  • n can be one of {16, 24, 32}
  • -o specifies the path of the output file, which will receive a .key extension

File encryption

dencrypter --enc myFile.txt --cipher aes192 -k myKey.key -o myEncFile
  • --enc specifies the path to the file to encrypt
  • --cipher specifies one of {aes128, aes192, aes256, chacha20poly1305}
  • -k specifies the path of the key file, which must have .key extension
  • -o specifies the path of the output file, which will receive a .enc extension

File decryption

dencrypter --dec myEncFile.enc -k myKey.key -o myDecFile
  • --dec specifies the path to the file to decrypt, which must have .enc extension
  • -k has the same function as in file encryption
  • -o specifies the path of the output (decrypted) file

Optional parameters

  • --force can be used for file encryption and decryption to overwrite the content of the file specified by -o, if it exists
  • --force CANNOT be used with --generate-key

For more detailed explanations regarding extension requirements and --force restrictions, see the relevant section in ABOUT.md.


File format

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.


Documentation

For more details about the project, you can consult:

  1. About DenCrypter
  2. Testing in Detail

License

This project is licensed under the MIT License - see LICENSE for details.


About

CLI file encryption tool in Python using AES-GCM and ChaCha20-Poly1305 (Personal project, 2026).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages