ArticleslgStudy

computer science

XTEA

XTEA is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand XTEA rather than just read about it. In short: In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA. 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).

XTEA — main illustration
XTEA — illustration

Key takeaways

  • XTEA belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect XTEA to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of XTEA from memory before moving on to harder problems.

Reference excerpt

In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA. 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). It is not subject to any patents. Like TEA, XTEA is a 64-bit block Feistel cipher with a 128-bit key and a suggested 64 rounds. Several differences from TEA are apparent, including a somewhat more complex key-schedule and a rearrangement of the shifts, XORs, and additions.

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:

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. 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[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. 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 differential attack on 27 out of 64 rounds of XTEA, requiring 220.5 chosen plaintexts and a time complexity 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.

See also Ascon — A NIST-select lightweight authenticated cipher. 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. TEA — Block TEA's precursor. XXTEA — Block TEA's successor.

References

Further reading Sekar, Gautham; Mouha, Nicky; Velichkov, Vesselin; Preneel, Bart (2011). "Meet-in-the-Middle Attacks on Reduced-Round XTEA". In Kiayias, A. (ed.). Topics in Cryptology – CT-RSA 2011. Lecture Notes in Computer Science. Vol. 6558. pp. 250–267. doi:10.1007/978-3-642-19074-2_17. ISBN 978-3-642-19073-5. Retrieved October 10, 2018. Moon, Dukjae; Hwang, Kyungdeok; Lee, Wonil; Lee, Sangjin; Lim, Jongin (2002). "Impossible Differential Cryptanalysis of Reduced Round XTEA and TEA". Fast Software Encryption. Lecture Notes in Computer Science. Vol. 2365. pp. 49–60. doi:10.1007/3-540-45661-9_4. ISBN 978-3-540-44009-3. Retrieved October 10, 2018. Andem, Vikram Reddy (2003). A cryptanalysis of the Tiny Encryption Algorithm (PDF) (Masters thesis). The University of Alabama, Tuscaloosa. Retrieved October 10, 2018.

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

Illustrations

XTEA illustration

Worked examples

Example 1 — a first encounter with XTEA

Start with the simplest possible case. Write down what XTEA claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to XTEA before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about XTEA ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of XTEA

In research
XTEA appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses XTEA in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
XTEA is common in secondary-school and first-year university syllabi. It links to neighbouring topics Block ciphers, Computer security in the United Kingdom, Feistel ciphers, so understanding it makes those chapters shorter.
In everyday life
Look for XTEA outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “XTEA” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study XTEA in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what XTEA means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain XTEA out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is XTEA in simple terms?

In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA. 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).

Why does XTEA matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study XTEA?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on XTEA.

Tags

  • Block ciphers
  • Computer security in the United Kingdom
  • Feistel ciphers
  • Free ciphers
  • History of computing in the United Kingdom
  • University of Cambridge Computer Laboratory

Keep exploring