<h1 align="center">
Herbal TEA
[![Gitlab](https://img.shields.io/badge/gitlab-%23181717.svg?logo=gitlab)](https://gitlab.com/lunardev/herbal)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.com/lunardev/herbal/-/blob/main/LICENSE)
[![Python Version](https://img.shields.io/badge/cpython-3.9%20|%203.10%20|%203.11%20|%203.12-blue.svg)](https://python.org)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Pipeline](https://gitlab.com/lunardev/herbal/badges/main/pipeline.svg)](https://gitlab.com/lunardev/herbal/-/pipelines)
[![Code Coverage](https://gitlab.com/lunardev/herbal/badges/main/coverage.svg)](https://gitlab.com/lunardev/herbal/-/commits/main)
</h1>
### 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](https://wikipedia.org/wiki/Scrypt) to derive encryption keys.
- Allow for input text of any length with PKCS#7 padding.
## Installation
```shell
# Latest stable release.
pip install herbal
# Most recent (unstable) release.
pip install git+https://gitlab.com/lunardev/herbal.git
```
## Usage
```python
from herbal.tea import encrypt, decrypt
password = "secret"
cipher = encrypt("example message!", password=password)
plain = decrypt(cipher, password=password)
print(plain) # example message!
```
## To-Do
- [x] Implement the Tiny Encryption Algorithm.
- [x] Add padding to plaintext input.
- [~] ISO 10126
- [x] PKCS#7
- [ ] Implement extended algorithms.
- [ ] XTEA
- [ ] XXTEA
- [ ] Add different block ciper modes.
- [ ] Electronic Code Book (ECB)
- [ ] Cipher Block Chaining (CBC)
- [ ] Cipher Feedback Mode (CFB)
- [ ] Output Feedback Mode (OFB)
- [ ] Counter Mode (CTR)
- [ ] Add error handling for bad data.
- [x] Add unit tests.
- [x] Local pytest cases
- [x] GitLab CI pipeline
- [x] Code coverage
- [ ] Write documentation.
- [x] Publish project to the [Python Package Index](https://pypi.org/project/herbal).
## 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](https://gitlab.com/lunardev/herbal/-/blob/main/LICENSE). Copyright (c) 2024.
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/lunardev/herbal",
"name": "herbal",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "python,python3,block cipher,cryptography,tiny encryption algorithm,tea",
"author": "T. Rodriguez",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/87/7c/be895195c1eb2695950b0ade65a042617f7f1cce7757cdaa7f9c5ba0191e/herbal-0.1.3.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">\nHerbal TEA\n\n[![Gitlab](https://img.shields.io/badge/gitlab-%23181717.svg?logo=gitlab)](https://gitlab.com/lunardev/herbal)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.com/lunardev/herbal/-/blob/main/LICENSE)\n[![Python Version](https://img.shields.io/badge/cpython-3.9%20|%203.10%20|%203.11%20|%203.12-blue.svg)](https://python.org)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Pipeline](https://gitlab.com/lunardev/herbal/badges/main/pipeline.svg)](https://gitlab.com/lunardev/herbal/-/pipelines)\n[![Code Coverage](https://gitlab.com/lunardev/herbal/badges/main/coverage.svg)](https://gitlab.com/lunardev/herbal/-/commits/main)\n</h1>\n\n### Python package for the Tiny Encryption Algorithm (TEA).\n> The Tiny Encryption Algorithm (TEA) is a simple and efficient block cipher algorithm.\n\n## Features\n- Supports Python 3.9+.\n- Simple typed Python API.\n- No third-party dependencies.\n- Uses [scrypt](https://wikipedia.org/wiki/Scrypt) to derive encryption keys.\n- Allow for input text of any length with PKCS#7 padding.\n\n## Installation\n```shell\n# Latest stable release.\npip install herbal\n# Most recent (unstable) release.\npip install git+https://gitlab.com/lunardev/herbal.git\n```\n\n## Usage\n```python\nfrom herbal.tea import encrypt, decrypt\n\npassword = \"secret\"\ncipher = encrypt(\"example message!\", password=password)\nplain = decrypt(cipher, password=password)\nprint(plain) # example message!\n```\n\n## To-Do\n- [x] Implement the Tiny Encryption Algorithm.\n- [x] Add padding to plaintext input.\n - [~] ISO 10126\n - [x] PKCS#7\n- [ ] Implement extended algorithms.\n - [ ] XTEA\n - [ ] XXTEA\n- [ ] Add different block ciper modes.\n - [ ] Electronic Code Book (ECB)\n - [ ] Cipher Block Chaining (CBC)\n - [ ] Cipher Feedback Mode (CFB)\n - [ ] Output Feedback Mode (OFB)\n - [ ] Counter Mode (CTR)\n- [ ] Add error handling for bad data.\n- [x] Add unit tests.\n - [x] Local pytest cases\n - [x] GitLab CI pipeline\n - [x] Code coverage\n- [ ] Write documentation.\n- [x] Publish project to the [Python Package Index](https://pypi.org/project/herbal).\n\n## References\n\n1. 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.\n2. Shepherd, Simon. *The Tiny Encryption Algorithm (TEA)*. https://www.tayloredge.com/reference/Mathematics/TEA-XTEA.pdf.\n3. Andem, Vikram Reddy. *A Cryptanalysis of the Tiny Encryption Algorithm*, 2003, https://tayloredge.com/reference/Mathematics/VRAndem.pdf.\n4. Wikipedia. *Tiny Encryption Algorithm*, 6 Nov. 2023, https://wikipedia.org/wiki/Tiny_Encryption_Algorithm.\n5. Fandom. *Tiny Encryption Algorithm*, 24 Sept. 2010, https://antifandom.com/cryptography/wiki/Tiny_Encryption_Algorithm.\n\n## License\n\nThis project is licensed under the [MIT License](https://gitlab.com/lunardev/herbal/-/blob/main/LICENSE). Copyright (c) 2024.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package for the Tiny Encryption Algorithm (TEA).",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://gitlab.com/lunardev/herbal",
"Repository": "https://gitlab.com/lunardev/herbal"
},
"split_keywords": [
"python",
"python3",
"block cipher",
"cryptography",
"tiny encryption algorithm",
"tea"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eecc0d3ac5b6ede396ba9752270c7f88db4d5e15addca4fdf3a4e0a479e1217e",
"md5": "4a13f21f6f444491dfbe6302b194c9ca",
"sha256": "d709f4fe2d606329b1863723010e0e8f083a1362c2c63e75d2efb01b87dcd712"
},
"downloads": -1,
"filename": "herbal-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4a13f21f6f444491dfbe6302b194c9ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 7369,
"upload_time": "2024-01-16T19:33:22",
"upload_time_iso_8601": "2024-01-16T19:33:22.555682Z",
"url": "https://files.pythonhosted.org/packages/ee/cc/0d3ac5b6ede396ba9752270c7f88db4d5e15addca4fdf3a4e0a479e1217e/herbal-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "877cbe895195c1eb2695950b0ade65a042617f7f1cce7757cdaa7f9c5ba0191e",
"md5": "e2a926282b2792d0f65ef2ec5d9a0dee",
"sha256": "82b78a9e649d57f53c3f33c420f575d06720044fdfbfe1406455f81598da75f5"
},
"downloads": -1,
"filename": "herbal-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "e2a926282b2792d0f65ef2ec5d9a0dee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 6140,
"upload_time": "2024-01-16T19:33:23",
"upload_time_iso_8601": "2024-01-16T19:33:23.848491Z",
"url": "https://files.pythonhosted.org/packages/87/7c/be895195c1eb2695950b0ade65a042617f7f1cce7757cdaa7f9c5ba0191e/herbal-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-16 19:33:23",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "lunardev",
"gitlab_project": "herbal",
"lcname": "herbal"
}