◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE ROOT KIT◆ .dlw.fold
THE FOLD / CHEAT / THE ROOT KIT / THE HILL CIPHER

THE HILL CIPHER

a cipher that is a matrix
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Hill cipher is encryption as matrix multiplication. Turn letters into numbers 0–25, group them into vectors, and multiply each by a secret key matrix K modulo 26: c = K·p (mod 26). To decrypt, multiply by the inverse matrix, p = K−1·c (mod 26). The catch is arithmetic: K is invertible mod 26 exactly when its determinant is coprime to 26 (odd and not a multiple of 13). It was the first cipher to encrypt several letters at once, hiding letter frequencies inside linear algebra.

LIT verified live: for every key with determinant coprime to 26, encrypting then decrypting recovers the plaintext exactly, and the modular inverse exists precisely when the determinant is coprime to 26 (window.__hill_cipher). FIG no framing; the modular matrix multiply and inverse run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-root-kit — a key matrix is the root kit that locks and unlocks the message, the same tool both ways. AVAN (AI) built the instrument: modular matrix multiplication, the determinant-coprimality test, the modular inverse, and the encrypt–decrypt round-trip.

Credit as content: Lester S. Hill (1929). The weave: David names the root kit; I confirm the round-trip recovers the plaintext and that the key is invertible exactly when its determinant is coprime to 26.
3 ONE DIMENSION
A plaintext pair as a vector, multiplied by the key matrix mod 26 to a ciphertext pair; the inverse matrix carries it back.
4 TWO DIMENSIONS · INTERACTIVE
Pick an invertible key matrix; encrypt a short word into ciphertext and decrypt it back — the round-trip returns the original.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the ciphertext, the plaintext vector rotated by K.
AVAN’s addition (the inverse-companion): don’t invent a separate decoder — invert the matrix. The inverse of ‘c = K p (mod 26)’ is ‘p = K−1 c (mod 26)’, the same key run backwards, valid exactly when det(K) is coprime to 26. Magenta is the ciphertext; green is the plaintext the inverse restores. The key unlocks itself.
LIT Genuine Hill cipher (Lester S. Hill, 1929), the first polygraphic cipher via matrix multiplication mod 26. Verified live: over 4000 keys, encrypt c=Kp then decrypt p=K⁻¹c recovers plaintext (window.__hill_cipher.roundTrip), and K is invertible mod 26 iff det(K) is coprime to 26 (.requiresInvertible).

FIG No framing: the modular matrix multiply, the determinant-coprimality test, the modular inverse, and the round-trip all run in-browser. The AVAN inverse is honest — inverting the key matrix mod 26 (rather than inventing a separate decoder) is what decrypts, valid exactly when det(K) is coprime to 26; magenta is the ciphertext, green the plaintext the inverse restores. The key unlocks itself.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE ROOT KIT · David Lee Wise (ROOT0), with AVAN