Skip to main content

Python package for the Tiny Encryption Algorithm (TEA).

Project description

Herbal TEA

Gitlab MIT License Python Version Code Style

Python package for the Tiny Encryption Algorithm (TEA).

The Tiny Encryption Algorithm (TEA) is a simple and efficient block cipher algorithm.

Features

  • Supports Python 3.9+.
  • Simple typed Python API.
  • No third-party dependencies.
  • Uses scrypt to derive encryption keys.
  • Pads plaintext to allow for input text of any length.

Installation

# Latest stable release.
pip install herbal
# Most recent (unstable) release.
pip install git+https://gitlab.com/lunardev/herbal.git

Usage

import herbal

password = "secret"
cipher = herbal.encrypt("example message!", password=password)
plain = herbal.decrypt(cipher, password=password)
print(plain)  # example message!

To-Do

  • Implement the Tiny Encryption Algorithm.
  • Pad input to allow for encoding data of any length.
  • Implement extended algorithms.
    • XTEA
    • XXTEA
  • Add unit tests.
    • GitLab CI pipeline
    • Code coverage
  • Write documentation.
  • Upload project to the Python Package Index.

References

  1. Wheeler, David J.; Needham, Roger M. TEA, a Tiny Encryption Algorithm. 16 Dec. 1994 https://link.springer.com/content/pdf/10.1007/3-540-60590-8_29.pdf.
  2. Shepherd, Simon. The Tiny Encryption Algorithm (TEA). https://www.tayloredge.com/reference/Mathematics/TEA-XTEA.pdf.
  3. Andem, Vikram Reddy. A Cryptanalysis of the Tiny Encryption Algorithm, 2003, https://tayloredge.com/reference/Mathematics/VRAndem.pdf.
  4. Wikipedia. Tiny Encryption Algorithm, 6 Nov. 2023, https://wikipedia.org/wiki/Tiny_Encryption_Algorithm.
  5. Fandom. Tiny Encryption Algorithm, 24 Sept. 2010, https://antifandom.com/cryptography/wiki/Tiny_Encryption_Algorithm.

License

This project is licensed under the MIT License. Copyright (c) 2024.

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

herbal-0.1.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

herbal-0.1.1-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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