encyclopegia.org

XTEA

In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA.[src] The cipher's designers were David Wheeler and Roger Needham of the Cambridge Computer Laboratory, and the algorithm was presented in an unpublished technical report in 1997 (Needham and Wheeler, 1997).[src] It is not subject to any patents.[src] Like TEA, XTEA is a 64-bit block Feistel cipher with a 128-bit key and a suggested 64 rounds.[src] Several differences from TEA are apparent, including a somewhat more complex key-schedule and a rearrangement of the shifts, XORs, and additions.[src]

In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA.[src] The cipher's designers were David Wheeler and Roger Needham of the Cambridge Computer Laboratory, and the algorithm was presented in an unpublished technical report in 1997 (Needham and Wheeler, 1997).[src] It is not subject to any patents.[src] Like TEA, XTEA is a 64-bit block Feistel cipher with a 128-bit key and a suggested 64 rounds.[src] Several differences from TEA are apparent, including a somewhat more complex key-schedule and a rearrangement of the shifts, XORs, and additions.[src] ==Implementations== This standard C source code, adapted from the reference code released into the public domain by David Wheeler and Roger Needham, encrypts and decrypts using XTEA: include /* take 64 bits of data in v[0] and v[1] and 128 bits of key[0] - key[3] */ void encipher(unsigned int num_rounds, uint32_t v[2], uint32_t const key[4]) { unsigned int i; uint32_t v0=v[0], v1=v[1], sum=0, delta=0x9E3779B9; for (i=0; i > 5)) + v1) ^ (sum + key[sum & 3]); sum += delta; v1 += (((v0 > 5)) + v0) ^ (sum + key[(sum>>11) & 3]); } v[0]=v0; v[1]=v1; } void decipher(unsigned int num_rounds, uint32_t v[2], uint32_t const key[4]) { unsigned int i; uint32_t v0=v[0], v1=v[1], delta=0x9E3779B9, sum=delta*num_rounds; for (i=0; i > 5)) + v0) ^ (sum + key[(sum>>11) & 3]); sum -= delta; v0 -= (((v1 > 5)) + v1) ^ (sum + key[sum & 3]); } v[0]=v0; v[1]=v1; } The changes from the reference source code are minor: The reference source code used the unsigned long type rather than the 64-bit clean uint32_t .[src] The reference source code did not use const types.[src] The reference source code omitted redundant parentheses, using C precedence to write the round function as e.g.[src] v1 += (v0 >5) + v0 ^ sum + k[sum>>11 & 3] ; The recommended value for the "num_rounds" parameter is 32, not 64, as each iteration of the loop does two Feistel-cipher rounds.[src] To additionally improve speed, the loop can be unrolled by pre-computing the values of sum+key[].[src] ==Cryptanalysis== In 2004, Ko et al.[src] presented a related-key differential attack on 27 out of 64 rounds of XTEA, requiring 2 20.5 chosen plaintexts and a time complexity of 2 115.15 .[src] 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.[src] The paper presents two attacks, one without and with a weak key assumption, which corresponds to 2 64.98 bytes of data and 2 126.44 operations, and 2 63.83 bytes of data and 2 104.33 operations respectively.[src] ==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.[src] Because it operates on the entire message, Block TEA has the property that it does not need a mode of operation.[src] An attack on the full Block TEA was described by Saarinen, which also details a weakness in Block TEA's successor, XXTEA.[src] ==See also== Ascon — A NIST-select lightweight authenticated cipher.[src] PRESENT — an ISO-standardized lightweight 64-bit block cipher RC4 — A stream cipher that, just like XTEA, is designed to be very simple to implement.[src] TEA — Block TEA's precursor.[src] XXTEA — Block TEA's successor.[src] ==References== ===Further reading=== ==External links== DataFlow Diagram A web page advocating TEA and XTEA and providing a variety of implementations Test vectors for TEA and XTEA 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 Smalltalk implementation of XTEA PostgreSQL implementation of XTEA[src]

27 sentences · 27 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"XTEA." encyclopegia.org, 2026, https://encyclopegia.org/wiki/xtea. Accessed 26 November 2026.

Chicago

"XTEA." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/xtea.

APA

encyclopegia.org. (2026). XTEA. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/xtea

Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1341321528 · 0.5 · snapshot enwiki-001341321528

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.