Implementations
This standard C source code, adapted from the reference code released into theunsigned long
type rather than the uint32_t
.
* The reference source code did not use const
types.
* The reference source code omitted redundant parentheses, using C precedence to write the round function as e.g. v1 += (v0<<4 ^ v0>>5) + v0 ^ sum + k >11 & 3">um>>11 & 3/code>;
The recommended value for the "num_rounds" parameter is 32, not 64, as each iteration of the loop does two Feistel-cipher rounds. To additionally improve speed, the loop can be unrolled by pre-computing the values of sum+key[].
Cryptanalysis
In 2004, Ko et al. presented a related-key attack, related-key differential attack on 27 out of 64 rounds of XTEA, requiring 220.5 chosen plaintexts and a time complexity
In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations ...
of 2115.15.
In 2009, Lu presented a related-key rectangle attack on 36 rounds of XTEA, breaking more rounds than any previously published cryptanalytic results for XTEA. The paper presents two attacks, one without and with a weak key assumption, which corresponds to 264.98 bytes of data and 2126.44 operations, and 263.83 bytes of data and 2104.33 operations respectively.
Block TEA
Presented along with XTEA was a variable-width block cipher termed Block TEA, which uses the XTEA round function, but Block TEA applies it cyclically across an entire message for several iterations. Because it operates on the entire message, Block TEA has the property that it does not need a mode of operation. An attack on the full Block TEA was described by Saarinen, which also details a weakness in Block TEA's successor, XXTEA
In cryptography, Corrected Block TEA (often referred to as XXTEA) is a block cipher designed to correct weaknesses in the original Block TEA.
XXTEA is vulnerable to a chosen-plaintext attack requiring 259 queries and negligible work. See crypta ...
.
See also
* Ascon Ascon and ASCON may refer to:
* Ascon (cipher), a lightweight cipher
* Asconoid, a wall structure of sponges
* The original name of Ascaron
Ascaron Entertainment was a video game developer based in Germany. Founded as Ascon by Holger Flöttmann ...
— A NIST
The National Institute of Standards and Technology (NIST) is an agency of the United States Department of Commerce whose mission is to promote American innovation and industrial competitiveness. NIST's activities are organized into physical s ...
-select lightweight authenticated cipher.
* RC4
In cryptography, RC4 (Rivest Cipher 4, also known as ARC4 or ARCFOUR, meaning Alleged RC4, see below) is a stream cipher. While it is remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, ren ...
— A stream cipher
stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream ( keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystrea ...
that, just like XTEA, is designed to be very simple to implement.
* TEA
Tea is an aromatic beverage prepared by pouring hot or boiling water over cured or fresh leaves of '' Camellia sinensis'', an evergreen shrub native to East Asia which probably originated in the borderlands of south-western China and nor ...
— Block TEA's precursor.
* XXTEA
In cryptography, Corrected Block TEA (often referred to as XXTEA) is a block cipher designed to correct weaknesses in the original Block TEA.
XXTEA is vulnerable to a chosen-plaintext attack requiring 259 queries and negligible work. See crypta ...
— Block TEA's successor.
References
Further reading
*
*
*
External links
DataFlow Diagram
* ttp://www.cix.co.uk/~klockstone/teavect.htm Test vectors for TEA and XTEAbr>A Cryptanalysis of the Tiny Encryption Algorithm
PHP implementation of XTEA
Pascal/Delphi implementation of XTEA
JavaScript implementation of XTEA (32 rounds)
Linden Scripting Language (LSL) implementation of XTEA for Second Life scripting
PostgreSQL implementation of XTEA
{{Cryptography navbox , block
Computer security in the United Kingdom
Feistel ciphers
Free ciphers
History of computing in the United Kingdom
University of Cambridge Computer Laboratory
Articles with example C code