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 xtea4 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
Note
I do NOT guarantee that this implementation (or the base cipher) is secure. If you find bugs, please report them at https://github.com/tgates42/xtea/issues .
Changelog
(dev) Version 0.6.1; …
Improved tests
PEP8-style formatting
Unittests: Counter, modes (but not results of them!), test vectors
[BREAKING CHANGE] Counter class is now in xtea4.counter
(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)
Version 0.2.1 - dev; Jul 10, 2014
Never released…
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
Added a test feature
Raises warning on CTR, added a handler that CTR will not crash anymore ;)
Version 0.1.1; Jul 9, 2014
[0.1.1] NotImplementedError on CFB
Module raises a NotImplementedError on CFB
Minor changes
Version 0.1; Jun 22, 2014
[0.1] Initial release
Supports all mode except CFB
Buggy CTR ( “ß” = “\xc3\x9f” )
Working with PEP 272, default mode is ECB
Metadata
Release files for xtea4 0.6.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 | |
|---|---|---|---|---|
| xtea4-0.6.1.tar.gz | 6.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xtea4-0.6.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / xtea4-0.6.1.tar.gz
| Download URL | xtea4-0.6.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ba3dbb847d58551601b1d70c0ca9e7c4944dee7c9fe3e2624ed1196407b7d3
|
|
BLAKE2b-256 checksum How to use checksums |
50bcd15313dd592a0d352899ed52ebbe00a1092afde69c05077e435ed523f8ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7
|
Release files / xtea4-0.6.1-py2.py3-none-any.whl
| Download URL | xtea4-0.6.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b05efcf3907b7f3706928a1b34452843d10e0c133a20ee318b34713bfa23c102
|
|
BLAKE2b-256 checksum How to use checksums |
dd84a234b43f7a255314aeab1a567ec951636b2f2fef2c8160e1570cb6bb964a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7
|
Security for xtea4 0.6.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.