Block ciphers

XTEA

The 1997 revision of TEA that fixes its equivalent-key and related-key weaknesses

research Root API only
Research tier.

Experimental or unclassified. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About XTEA

XTEA is a block cipher. It uses a 16-byte (128-bit) key and an 8-byte (64-bit) block. NextSSL lists it in the research tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

XTEA is a 64-bit block cipher with a 128-bit key published by David Wheeler and Roger Needham in 1997 to correct weaknesses found in TEA. It remains popular in embedded code because of its small size.

XTEA keeps TEA's Feistel structure and golden-ratio constant but changes the key schedule: the key word used in each half-round is selected from bits of the running sum, and the order of shifts, XORs and additions is rearranged. The standard version uses 64 Feistel rounds. It remains a common teaching example.

NextSSL includes XTEA for research and legacy interoperability. XXTEA, a later variable-block variant, has published attacks and is not included here. XTEA's main use today is in small legacy firmware, where its minimal code size outweighs its limitations. 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

1997–1997
  1. XTEA published by David Wheeler, Roger Needham

Security notes

Related-key attacks on reduced-round XTEA are known, but none threatens the full cipher in normal use. Its 64-bit block limits data per key, and it lacks the analysis of modern ciphers.

Typical uses

Small embedded firmwareLegacy interoperability

Sizes

FieldBytesMeaning
key16Secret key
block8Block

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'research' is reachable from the root API only
block = root.call("blockcipher_encrypt", "xtea", None, key, plaintext_block)[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Similar names

Looking for something else?

Frequently asked questions

What is XTEA?

XTEA is a block cipher in the XTEA family. XTEA is a 64-bit block cipher with a 128-bit key published by David Wheeler and Roger Needham in 1997 to correct weaknesses found in TEA.

What are the XTEA sizes?

In NextSSL, XTEA uses: key 16 bytes, block 8 bytes.

Who designed XTEA and when?

XTEA belongs to the XTEA family, first published in 1997 by David Wheeler, Roger Needham.

Is XTEA safe to use?

XTEA is in the research tier. Experimental or unclassified. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).