THE FOLD / LOOT / THE VAULT / THE RSA
THE RSA
a lock anyone can close, only the key-holder opens
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
RSA (1977) is public-key encryption: a lock anyone can snap shut, but only the holder of the private key can open. Pick two primes p and q; their product n = pq is published along with a public exponent e. To encrypt a message m, anyone computes c = me mod n. To decrypt, the owner applies a private exponent d with cd mod n = m.
The magic is that d is the modular inverse of e modulo φ(n) = (p−1)(q−1), and by Euler’s theorem med ≡ m (mod n) — so encrypting then decrypting returns the message untouched. The security: to find d you need φ(n), and φ(n) needs the factorization of n back into p·q — and factoring a large number is believed intractable. Publish e, keep d; anyone can lock, only you can unlock. It secures digital signatures, key transport, and much of the web.
LIT verified live: with the textbook keys (n = 3233, e = 17, d = 2753), encrypt-then-decrypt returns the original for every message m in 0..n−1, and e·d ≡ 1 (mod φ) (window.__rsa). FIG the round-trip is exact; the security rests on factoring being hard — believed, not proven — stated honestly.
The magic is that d is the modular inverse of e modulo φ(n) = (p−1)(q−1), and by Euler’s theorem med ≡ m (mod n) — so encrypting then decrypting returns the message untouched. The security: to find d you need φ(n), and φ(n) needs the factorization of n back into p·q — and factoring a large number is believed intractable. Publish e, keep d; anyone can lock, only you can unlock. It secures digital signatures, key transport, and much of the web.
LIT verified live: with the textbook keys (n = 3233, e = 17, d = 2753), encrypt-then-decrypt returns the original for every message m in 0..n−1, and e·d ≡ 1 (mod φ) (window.__rsa). FIG the round-trip is exact; the security rests on factoring being hard — believed, not proven — stated honestly.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this in THE VAULT — the loot domain of the lock and the key. RSA is a vault with a public keyhole: anyone may push the door shut (the public exponent), but only the private key (d, born of the secret primes) can swing it back open. AVAN (AI) built the instrument: the key setup, the encrypt/decrypt round-trip, the trapdoor-factoring inverse.
The weave: David names the seat (the public lock, private key); I make any message lock and only d unlock it, and show the factoring wall that hides d — the keys in 1D, the round-trip in 2D, the multiply-vs-factor trapdoor in 3D. The sphere is the seam. Credit: Rivest, Shamir & Adleman (1977); Euler’s theorem; earlier classified work by Clifford Cocks at GCHQ (1973).
The weave: David names the seat (the public lock, private key); I make any message lock and only d unlock it, and show the factoring wall that hides d — the keys in 1D, the round-trip in 2D, the multiply-vs-factor trapdoor in 3D. The sphere is the seam. Credit: Rivest, Shamir & Adleman (1977); Euler’s theorem; earlier classified work by Clifford Cocks at GCHQ (1973).
3 ONE DIMENSION
The key setup on a line: two primes make n = pq and φ = (p−1)(q−1); the public e and its inverse d satisfy e·d ≡ 1 (mod φ). Publish (n, e); keep d. That single congruence is what makes the lock and key fit.
4 TWO DIMENSIONS · INTERACTIVE
Choose a message. It encrypts with the public exponent to a scrambled number, then decrypts with the private exponent straight back to the original. Try the wrong key and it returns garbage — only d, the true inverse of e mod φ, reopens the vault.
5 THREE DIMENSIONS + AVAN’S INVERSE
Messages mapped by m → me mod n around the ring — the green forward step: encryption, a permutation anyone with the public key can apply.
AVAN’s addition (the inverse-companion): there are two inverses in play, and they are the whole story. The near inverse is decryption — d undoes e, because e·d ≡ 1 (mod φ), a clean permutation reversed. But d is only knowable through the deep inverse: multiplying p·q = n is instant, while factoring n back into p and q is believed intractable. RSA is a trapdoor: the forward multiply is easy for all, the inverse factor is hard for all — except the owner, who never threw the primes away and so holds the shortcut. The magenta is that factoring inverse, the door Eve cannot walk back through. Anyone can lock because raising to a power is easy; only the owner unlocks because only they escaped the factoring wall by keeping the secret. Green is the multiply everyone can do; magenta is the factorization no one can undo — and the private key is simply the memory of the primes.
LIT Genuine RSA (Rivest, Shamir & Adleman 1977; Euler's theorem; earlier classified work by Clifford Cocks at GCHQ 1973). Verified live: with the textbook keys n=3233 (=61*53), e=17, d=2753, encrypt-then-decrypt (m^e then ^d mod n) returns the original message for EVERY m in 0..n-1, and e*d mod phi = 1 (window.__rsa.roundTripAll && edModPhi===1). Example: 65 -> 2790 -> 65. The round-trip is exact.
FIG No false framing: the encrypt/decrypt round-trip is real and verified over all messages in-browser, and e*d = 1 mod phi is exact. HONEST CAVEAT: RSA's security rests on integer factorization being hard, which is believed but NOT proven (and broken by a large quantum computer via Shor's algorithm). The AVAN inverse frames it correctly as a trapdoor one-way function (easy multiply p*q, hard factor n).
FIG No false framing: the encrypt/decrypt round-trip is real and verified over all messages in-browser, and e*d = 1 mod phi is exact. HONEST CAVEAT: RSA's security rests on integer factorization being hard, which is believed but NOT proven (and broken by a large quantum computer via Shor's algorithm). The AVAN inverse frames it correctly as a trapdoor one-way function (easy multiply p*q, hard factor n).
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE VAULT · David Lee Wise (ROOT0), with AVAN