XTEA, XXTEA and Rabbit Cipher Tool

Work with the lightweight ciphers still found in embedded devices, games and older protocols, with correct byte order, padding and modes.

在您的浏览器中运行。您的文件不会离开设备。 了解如何验证

…

使用方法

  1. 1
    Choose the cipher

    XTEA, XXTEA or Rabbit.

  2. 2
    Choose the direction

    Encrypt or decrypt.

  3. 3
    Enter the key

    32 hex digits is best.

  4. 4
    Set mode and IV

    For XTEA CBC or CTR and Rabbit.

  5. 5
    Enter the data

    Text, hex or Base64.

  6. 6
    Copy the output

    In the format you need.

关于此工具

XTEA, XXTEA and Rabbit are small, fast ciphers designed for devices with little memory. XTEA, the extended Tiny Encryption Algorithm by Needham and Wheeler, encrypts 64-bit blocks with a 128-bit key in a few lines of code. XXTEA, or Corrected Block TEA, encrypts a whole buffer of 32-bit words at once. Rabbit is a stream cipher from the eSTREAM portfolio, published as RFC 4503, with a 128-bit key and an optional 64-bit IV. They still turn up in microcontroller firmware, game save files, IoT protocols and older mobile apps, and developers and security researchers regularly need to reproduce exactly what a device does. This tool implements all three in the browser and is checked against published test vectors: the XTEA vector used by Go and Botan, the XXTEA all-zero vector from the original paper and the Rabbit zero-key stream from eSTREAM. It accepts keys and data in hex, Base64 or text, supports ECB, CBC and CTR for XTEA with optional PKCS#7 padding, and gives the output in hex, Base64 or text.

Byte order matters

Different libraries read bytes into words differently, which is the most common reason two implementations disagree. XTEA here uses big-endian words, as in the reference code and the Go and Botan libraries. XXTEA uses little-endian words, as in most XXTEA libraries. Rabbit follows the little-endian layout of RFC 4503, and its output matches the eSTREAM test vectors.

Modes and padding

XTEA encrypts 8-byte blocks. ECB encrypts each block separately and leaks patterns, CBC chains blocks with an IV, and CTR turns the cipher into a stream so no padding is needed. PKCS#7 padding adds 1 to 8 bytes so the data fills whole blocks. XXTEA here pads to a multiple of 8 bytes with PKCS#7; turn padding off to match libraries that require exact word multiples.

Security today

None of these ciphers authenticates data, so an attacker can modify ciphertext without detection. XXTEA has known related-key and chosen-plaintext weaknesses, and 64-bit blocks wear out after a few gigabytes under one key. For new systems use AES-GCM or ChaCha20-Poly1305, which are available in every modern platform, including the Web Crypto API.

Keys

Keys are 16 bytes. A text key is copied as UTF-8 and padded with zero bytes, which is only for compatibility with systems that do this; a real key should be random.

Limits

Processing happens in memory, so very large files are slow. This is a compatibility and learning tool, not a secure messaging system.

计算示例

Encrypting the 8-byte block 4142434445464748 with key 000102030405060708090a0b0c0d0e0f in XTEA ECB without padding gives 497df3d072612cb5, the published test vector, and Rabbit with an all-zero key produces the keystream starting 02f74a1c26456bf5.

要点

常见问题

Is XTEA secure?

It has no practical break, but 64-bit blocks and no authentication make it unsuitable for new designs.

Why does my result differ from another library?

Usually byte order, padding, mode or IV. Try the other options.

What is XXTEA used for?

Small devices and some game and app data formats that encrypt whole buffers.

Does Rabbit need an IV?

It is optional, but reusing a key without a fresh IV is unsafe.

What should I use instead?

AES-GCM or ChaCha20-Poly1305.

Are my keys sent anywhere?

No. Everything runs in your browser and keys are never saved.

完全免费无费用,无需注册
文件保持私密一切都在您的浏览器中运行
用您的语言轻松使用提供多种语言