Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A python version of XTEA

Project Description

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

It also supports CBC-MAC.

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

Note

I does NOT guarantee that this implementation (or the base cipher) is secure. If there are bugs, tell me them please.

Changelog

Version 0.4.1; Jul 30, 2015

[0.4.1] Fixed installer

Version 0.4.0; Jul 12, 2014

[0.4.0] Buggless & PEP compliant CTR | added CBCMAC

  • CTR mode works with strings now
  • raises DeprecatedWarning if a number is returned
  • CBCMAC class added (use static method CBCMAC.new(args) to generate)

Version 0.3.2; Jul 11, 2014

[0.3.2] Minor Fixes

Version 0.3.1; Jul 11, 2014

[0.3.1] Minor Fixes

  • Fixed that the length of data will not be checked

Version 0.3.0; Jul 11, 2014

[0.3.0] Added CFB mode

  • 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

[0.2.0] 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
Release History

Release History

This version
History Node

0.4.1

History Node

0.4.0

History Node

0.3.2

History Node

0.3.1

History Node

0.2.0

History Node

0.1.1

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
xtea-0.4.1-py2.py3-none-any.whl (7.1 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Jul 30, 2015
xtea-0.4.1.tar.bz2 (5.9 kB) Copy SHA256 Checksum SHA256 Source Jul 30, 2015
xtea-0.4.1.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Jul 30, 2015
xtea-0.4.1.zip (8.1 kB) Copy SHA256 Checksum SHA256 Source Jul 30, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting