Skip to main content

A simple ChaCha20 encryption/decryption utility.

Project description

ChaCha20 Utils

A simple ChaCha20 encryption/decryption utility for Python.

PyPI Python Version License


Features

✔ Simple API for encryption and decryption
✔ Uses ChaCha20 for fast, secure encryption
Automatic nonce handling (prepended to ciphertext)
✔ Requires a 32-byte key for security


Installation

Install the package using pip:

pip install chacha20-utils

Usage

from chacha20_utils import ChaCha20Cipher

# Use a 32-byte secret key
key = b'your_32_byte_secret_key_________________'

cipher = ChaCha20Cipher(key)

# Encrypt
plaintext = b"Hello, ChaCha20!"
encrypted = cipher.encrypt(plaintext)
print("Encrypted:", encrypted)

# Decrypt
decrypted = cipher.decrypt(encrypted)
print("Decrypted:", decrypted)

Notes

  • The key must be exactly 32 bytes (256 bits).
  • The nonce is randomly generated and prepended to the ciphertext for decryption.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Author

Developed by Sakib Salim
GitHub: sakib-salim

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chacha20_utils-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chacha20_utils-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file chacha20_utils-0.1.1.tar.gz.

File metadata

  • Download URL: chacha20_utils-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chacha20_utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 25e4c3d492284254942cde5a9fec1a62eea9ff3f114ac9ace4dd1fde9dcedac4
MD5 d794740e0236ab86814ccff61ae0ae42
BLAKE2b-256 2d2cada20b39e2b5f2d9c6110b1e23e397f6f4f5e3fd511e53cda3ef31a97a88

See more details on using hashes here.

File details

Details for the file chacha20_utils-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chacha20_utils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chacha20_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 87dcd0598a8b4f5fea6fb14f2defe662f5cccf812adf6c88dc5367f8680944d9
MD5 8706a2fee5257212d63e6cc0e954eefe
BLAKE2b-256 5026ab17072ed8e17e377a1f7cb03ad026e8bae1107c71215e174ca4da596861

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page