Python XTEA
This is an XTEA-Cipher implementation in Python (eXtended Tiny Encryption Algorithm).
XTEA is a blockcipher with 8 bytes blocksize and 16 bytes Keysize (128-Bit). The algorithm is secure at 2014 with the recommend 64 rounds (32 cycles). This implementation supports following modes of operation: ECB, CBC, CFB, OFB, CTR
Example:
>>> from xtea import * >>> key = " "*16 # Never use this >>> text = "This is a text. "*8 >>> x = new(key, mode=MODE_OFB, IV="12345678") >>> c = x.encrypt(text) >>> text == x.decrypt(c) True
Resources
Source code: https://github.com/varbin/xtea
Issue tracker: https://github.com/varbin/xtea/issues
Changelog
Version 0.7.1, former 0.6.1 / 0.7.0; Jun 16, 2018
Improved tests
PEP8-style formatting
Unittests: Counter, modes (but not results of them!), test vectors
[BREAKING CHANGE] Counter class is now in xtea.counter
Python 3.3 is not tested anymore on Travis CI
[BREAKING CHANGE] CFB mode is now correctly implemented. By setting partition_size it is possible to set the internal partition size (in bits) as per PEP-272.
Python 3: An optional C extension improves speed upto a factor of 10.
[BREAKING CHANGE] block_size and key_size is now in bytes.
Skipped 0.7.0 with
(unreleased) Version 0.6.0; Oct 16, 2016
Python 3 does work now
[BREAKING CHANGE] counters cannot return numbers any more, they must return bytestrings now
[BREAKING CHANGE] Cipher objects remember state, so two consecutive calls to XTEACipher.encrypt should not return the same
improved documentation
(unreleased) Version 0.5.0; Oct 15, 2016
Removed CBCMAC
Version 0.4.1; Jul 30, 2015
Fixed installer
Version 0.4.0; Jul 12, 2014
Buggless & PEP compliant CTR
CTR mode works with strings now
raises DeprecatedWarning if a number is returned
CBCMAC class added (use static method CBCMAC.new(args) to create)
Version 0.3.2; Jul 11, 2014
Minor Fixes
Version 0.3.1; Jul 11, 2014
Minor Fixes
Fixed that the length of data will not be checked
Version 0.3.0; Jul 11, 2014
Added CFB mode
Fully working with PEP 272
Raising NotImplementedError only on PGP-CFB (OpenPGP) mode
Wheel support and changelog (0.2.1)
(unreleased) Version 0.2.1 - dev; Jul 10, 2014
Added better wheel support for uploading (just for me) with a setup.cfg
Added this file (auto uploading on pypi/warehouse and github)
(upload.py for github)
Version 0.2.0; Jul 9, 2014
Added a test feature; warning in CTR
Raises warning on CTR, added a handler that CTR will not crash anymore ;)
Version 0.1.1; Jul 9, 2014
Module raises a NotImplementedError on CFB
Minor changes
Version 0.1; Jun 22, 2014
Initial release
Supports all mode except CFB
Buggy CTR ( “ß” = “\xc3\x9f” )
Working with PEP 272, default mode is ECB
Metadata
Release files for xtea 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xtea-0.7.1.tar.gz | 7.8 kB | Without provenance | Details for xtea-0.7.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| xtea-0.7.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for xtea-0.7.1-py2.py3-none-any.whl |
| xtea-0.7.1-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details for xtea-0.7.1-cp37-cp37m-win_amd64.whl |
| xtea-0.7.1-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details for xtea-0.7.1-cp37-cp37m-win32.whl |
| xtea-0.7.1-cp36-cp36m-win_amd64.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-64 | Details for xtea-0.7.1-cp36-cp36m-win_amd64.whl |
| xtea-0.7.1-cp36-cp36m-win32.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-32 | Details for xtea-0.7.1-cp36-cp36m-win32.whl |
| xtea-0.7.1-cp35-cp35m-win_amd64.whl | CPython 3.5 | CPython 3.5 pymalloc | Windows x86-64 | Details for xtea-0.7.1-cp35-cp35m-win_amd64.whl |
| xtea-0.7.1-cp35-cp35m-win32.whl | CPython 3.5 | CPython 3.5 pymalloc | Windows x86-32 | Details for xtea-0.7.1-cp35-cp35m-win32.whl |
Total release size: 86.5 kB
Release files / xtea-0.7.1.tar.gz
| Download URL | xtea-0.7.1.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61f770d4d089f2aba42d4dc888fde98688b7d76af5ae50116b9ec53161e160ab
|
|
BLAKE2b-256 checksum How to use checksums |
50f5834b9ee6ce7b2c53ff058a19029510cf5420585b3b1ae6fe8b6b0146a84f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-py2.py3-none-any.whl
| Download URL | xtea-0.7.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f2d02406d375faa57f6bd017c17aa70e02cfbd565f9060e44bfe8cb4cbfec7e2
|
|
BLAKE2b-256 checksum How to use checksums |
9ea29c1af8d6b2636888ee26d7292aa97ea7ad83d45da81d386817eacebbac09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp37-cp37m-win_amd64.whl
| Download URL | xtea-0.7.1-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 12.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a24c1aa4bed085d9b35b75ee31790ec71ef2992b8007f7203c0da4911fd31c34
|
|
BLAKE2b-256 checksum How to use checksums |
ce7404336e26549ca8457947273aeb22d12225141fe2175678fb089b0986c2b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp37-cp37m-win32.whl
| Download URL | xtea-0.7.1-cp37-cp37m-win32.whl |
|---|---|
| Size | 11.6 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
3a591c8b19732004f8dddafb0dc9d5098d3f650de2df1f2bcf56c0a93e451a96
|
|
BLAKE2b-256 checksum How to use checksums |
491d671ba3b9988c8d65cf8e23a5a013b5a83fcd2955789c70668de6557e0af3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp36-cp36m-win_amd64.whl
| Download URL | xtea-0.7.1-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 12.3 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
27b0c0a242318cf72fdc9fc2a257e60bf75ba075861b77fcb7f80e8381615c70
|
|
BLAKE2b-256 checksum How to use checksums |
ef332abea3ac604f109cb16a25befd52504cdf4ad84360e872b7a3531ef271c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp36-cp36m-win32.whl
| Download URL | xtea-0.7.1-cp36-cp36m-win32.whl |
|---|---|
| Size | 11.6 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
876e6af9ba01805c08bd4b8ad6346c08889fe6727506f17de15b390e18042ffc
|
|
BLAKE2b-256 checksum How to use checksums |
c900d9bc84b9a08b610fbae6cc76e9dfecfcc408f387271c46998b3165ef424b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp35-cp35m-win_amd64.whl
| Download URL | xtea-0.7.1-cp35-cp35m-win_amd64.whl |
|---|---|
| Size | 12.3 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
56a6b60898648e27a8c7b2f698672807c9ddd6f22f06915bc459f2de465f1aaa
|
|
BLAKE2b-256 checksum How to use checksums |
0248875c211a9c878d3c8bca93ef937f2e3e060270dc99fbbe903ed969ff6109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Release files / xtea-0.7.1-cp35-cp35m-win32.whl
| Download URL | xtea-0.7.1-cp35-cp35m-win32.whl |
|---|---|
| Size | 11.6 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
59d00e875ccb441b153e9e9dbcf63421bfb87b8417816a8229936a8f21a4beeb
|
|
BLAKE2b-256 checksum How to use checksums |
8f1ffc70cd46e54de7724603e9f874f85c60789e6248ce31695483ce6db4d2fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.4 CPython/3.7.3
|
Security for xtea 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.