Skip to content

Varbin/xtea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d633e9b · Jun 24, 2022
Jun 24, 2022
Jun 15, 2019
Jun 16, 2019
Jun 24, 2022
Jun 24, 2022
Jun 16, 2019
Jun 24, 2022
Jun 16, 2019
Sep 18, 2020
Oct 11, 2017
Jun 24, 2022
Jun 15, 2019

Repository files navigation

Python XTEA

Github Actions: QA Maintainability Test Coverage Documentation Status

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 = b" "*16  # Never use this key
>>> text = b"This is a text. "*8
>>> x = new(key, mode=MODE_OFB, IV=b"12345678")  # IV's must be unpredictable
>>> c = x.encrypt(text)
>>> text == new(key, mode=MODE_OFB, IV=b"12345678").decrypt(c)
True

Resources