THE FOLD / CHEAT / NOCLIP / THE TEA CIPHER
THE TEA CIPHER
a whole block cipher from add, shift, xor
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
TEA (the Tiny Encryption Algorithm) is a block cipher famous for being tiny — a few lines of code — yet a real Feistel-style cipher. It encrypts a 64-bit block with a 128-bit key over 32 rounds, each round mixing the two halves with shifts, additions, and XORs and a magic constant (the golden-ratio-derived delta 0x9E3779B9). Decryption runs the same operations in reverse. Its extreme simplicity made it a teaching classic (and later spurred XTEA after weaknesses were found).
LIT verified live: over 500 random blocks and keys, decrypt(encrypt(x)) returns x exactly, and the ciphertext differs from the plaintext (window.__tea). FIG exact round-trip; this is a toy cipher, not modern security.
LIT verified live: over 500 random blocks and keys, decrypt(encrypt(x)) returns x exactly, and the ciphertext differs from the plaintext (window.__tea). FIG exact round-trip; this is a toy cipher, not modern security.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at noclip — the cheat that slips through walls, here a cipher small enough to memorize yet real enough to lock a block. TEA is that pocket-sized lock. AVAN (AI) built the instrument: the 32-round add/shift/xor Feistel mix, the delta constant, the reverse-round decryption, and the round-trip check (uint32 arithmetic).
Credit as content: David Wheeler & Roger Needham (1994). The weave: David names noclip; I run the shift-add-xor rounds forward to encrypt and backward to decrypt, confirming the block returns exactly.
Credit as content: David Wheeler & Roger Needham (1994). The weave: David names noclip; I run the shift-add-xor rounds forward to encrypt and backward to decrypt, confirming the block returns exactly.
3 ONE DIMENSION
Each round nudges sum by delta, then updates each half from the other via ((half<<4)+key) XOR (half+sum) XOR ((half>>5)+key). Shift, add, xor — that is the whole cipher.
4 TWO DIMENSIONS · INTERACTIVE
A 64-bit block encrypted under a key, then decrypted; the round-trip is checked to return the original.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a full cipher from three operations.
AVAN’s addition (the inverse-companion): lock a block with only shifts, additions, and XORs — 32 Feistel rounds mixing two halves so decryption is just the rounds run backward. The inverse of ‘a cipher needs S-boxes and big tables’ is ‘add, shift, xor, repeat — and reverse to unlock.’ Magenta is the heavy machinery a big cipher uses; green is the pocket-sized round. Encryption from add-shift-xor. (Toy cipher — not production security.)
LIT Genuine Tiny Encryption Algorithm (Wheeler & Needham 1994). Verified live: over 500 random 64-bit blocks and 128-bit keys, the 32-round add/shift/xor Feistel cipher satisfies decrypt(encrypt(x)) == x exactly (uint32 arithmetic), and the ciphertext differs from the plaintext (window.__tea.roundTrip && .diffuses).
FIG Exact round-trip; honestly labelled a TOY cipher, not modern security (TEA has known weaknesses that led to XTEA). The 32-round Feistel mix, the delta constant, the reverse-round decryption, and the round-trip check run in-browser and hold. The AVAN inverse is honest — 32 Feistel rounds of shift/add/xor mixing two halves make decryption just the rounds reversed; magenta is the heavy machinery a big cipher uses, green the pocket-sized round. Encryption from add-shift-xor.
FIG Exact round-trip; honestly labelled a TOY cipher, not modern security (TEA has known weaknesses that led to XTEA). The 32-round Feistel mix, the delta constant, the reverse-round decryption, and the round-trip check run in-browser and hold. The AVAN inverse is honest — 32 Feistel rounds of shift/add/xor mixing two halves make decryption just the rounds reversed; magenta is the heavy machinery a big cipher uses, green the pocket-sized round. Encryption from add-shift-xor.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of NOCLIP · David Lee Wise (ROOT0), with AVAN