TEA
The Tiny Encryption Algorithm: a minimal 64-bit Feistel cipher in a few lines of code
Overview
TEA is a 64-bit block cipher with a 128-bit key designed by David Wheeler and Roger Needham in 1994. Its appeal was its tiny code size, but it has serious key-schedule weaknesses.
TEA is a Feistel network of 64 rounds, usually described as 32 cycles. Each round updates one 32-bit half with a combination of shifts, additions with key words, XOR and a multiple of the golden-ratio constant 0x9E3779B9. There are no S-boxes and no real key schedule: key words are used directly in a fixed pattern.
NextSSL includes TEA for research and legacy interoperability. TEA's tiny code size still makes it attractive in embedded firmware, which is why it continues to appear in reverse-engineering work. Its weaknesses are well documented, and its successors XTEA and XXTEA were designed to address them, with mixed success. Its 64-bit block means that no more than a few gigabytes should be encrypted under a single key, since block collisions become likely around 2^32 blocks.
History
1994–1994TEA published by David Wheeler, Roger Needham
Security notes
TEA has equivalent keys, so its effective key length is 126 bits, and it is vulnerable to related-key attacks. This weakness was exploited to break the Xbox's TEA-based boot integrity check. XTEA fixes some issues; neither should be used in new designs.
Typical uses
Variants in NextSSL
1| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| TEA tea |
research | key 16 · block 8 | — | root |
Frequently asked questions
Which TEA variants does NextSSL include?
NextSSL registers 1 TEA variant: tea.