encyclopegia.org

Tiny Encryption Algorithm

In cryptography, the Tiny Encryption Algorithm (TEA) is a block cipher notable for its simplicity of description and implementation, typically a few lines of code. It was designed by David Wheeler and Roger Needham of the Cambridge Computer Laboratory; it was first presented at the Fast Software Encryption workshop in Leuven in 1994, and first published in the proceedings of that workshop. The cipher is not subject to any patents.

In cryptography, the Tiny Encryption Algorithm (TEA) is a block cipher notable for its simplicity of description and implementation, typically a few lines of code. It was designed by David Wheeler and Roger Needham of the Cambridge Computer Laboratory; it was first presented at the Fast Software Encryption workshop in Leuven in 1994, and first published in the proceedings of that workshop. The cipher is not subject to any patents. ==Properties== TEA operates on two 32-bit unsigned integers (could be derived from a 64-bit data block) and uses a 128-bit key. It has a Feistel structure with a suggested 64 rounds, typically implemented in pairs termed cycles. It has an extremely simple key schedule, mixing all of the key material in exactly the same way for each cycle. Different multiples of a magic constant are used to prevent simple attacks based on the symmetry of the rounds. The magic constant, 2654435769 or 0x9E3779B9 is chosen to be , where is the golden ratio (as a nothing-up-my-sleeve number). TEA has a few weaknesses. Most notably, it suffers from equivalent keys—each key is equivalent to three others, which means that the effective key size is only 126 bits. As a result, TEA is especially bad as a cryptographic hash function. This weakness led to a method for hacking Microsoft's Xbox game console, where the cipher was used as a hash function. TEA is also susceptible to a related-key attack which requires 2 23 chosen plaintexts under a related-key pair, with 2 32 time complexity. Because of these weaknesses, the XTEA cipher was designed. ==Versions== The first published version of TEA was supplemented by a second version that incorporated extensions to make it more secure. Block TEA (which was specified along with XTEA) operates on arbitrary-size blocks in place of the 64-bit blocks of the original. A third version (XXTEA), published in 1998, described further improvements for enhancing the security of the Block TEA algorithm. ==Reference code== Following is an adaptation of the reference encryption and decryption routines in C, released into the public domain by David Wheeler and Roger Needham: include void encrypt (uint32_t v[2], const uint32_t k[4]) { uint32_t v0=v[0], v1=v[1], sum=0, i; /* set up */ uint32_t delta=0x9E3779B9; /* a key schedule constant */ uint32_t k0=k[0], k1=k[1], k2=k[2], k3=k[3]; /* cache key */ for (i=0; i >5) + k1); v1 += ((v0 >5) + k3); } /* end cycle */ v[0]=v0; v[1]=v1; } void decrypt (uint32_t v[2], const uint32_t k[4]) { uint32_t v0=v[0], v1=v[1], sum=0xC6EF3720, i; /* set up; sum is (delta >5) + k3); v0 -= ((v1 >5) + k1); sum -= delta; } /* end cycle */ v[0]=v0; v[1]=v1; } Note that the reference implementation acts on multi-byte numeric values. The original paper does not specify how to derive the numbers it acts on from binary or other content. ==See also== RC4 – A stream cipher that, just like TEA, is designed to be very simple to implement. XTEA – First version of Block TEA's successor. XXTEA – Corrected Block TEA's successor. Treyfer – A simple and compact encryption algorithm with 64-bit key size and block size. ==Notes== ==References== ==External links== Test vectors for TEA JavaScript implementation of XXTEA with Base64 PHP implementation of XTEA (German language) JavaScript implementation of XXTEA JavaScript and PHP implementations of XTEA (Dutch text) AVR ASM implementation SEA Scalable Encryption Algorithm for Small Embedded Applications (Standaert, Piret, Gershenfeld, Quisquater - July 2005 UCL Belgium & MIT USA)

References

No reference rows published for this article.

Cite this article

MLA

"Tiny Encryption Algorithm." encyclopegia.org, 2026, https://encyclopegia.org/wiki/tiny-encryption-algorithm. Accessed 23 November 2026.

Chicago

"Tiny Encryption Algorithm." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/tiny-encryption-algorithm.

APA

encyclopegia.org. (2026). Tiny Encryption Algorithm. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/tiny-encryption-algorithm

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

Claims

PredicateValueSource
publication date1998Wikipedia

Related articles

Mekong Delta

enwiki · references available

Guru Gobind Singh

enwiki · references available

Herbert Samuel, 1st Viscount Samuel

enwiki · references available

Whole Earth Catalog

enwiki · references available

Eastern Front (World War II)

enwiki · references available

Donabe

enwiki · references available

World Dance Council

enwiki · references available

USS Tattnall (DDG-19)

enwiki · references available

USS Joseph Strauss

enwiki · references available

John Mason (governor)

enwiki · references available

Sui Sin Far

enwiki · references available

Scarba

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

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.