THE ONE-TIME PAD the only unbreakable cipher — a ciphertext that could mean anything
Take the XOR cipher and make the key truly random, as long as the message, and used once. Now the ciphertext carries zero information: for any ciphertext and any guessed plaintext, there exists a key that maps one to the other, so the ciphertext is consistent with every message of its length. Shannon proved this is perfect secrecy — provably, information-theoretically unbreakable, the only cipher that is. The price is the key: random, never reused, as big as everything you will ever send. Break any of those three rules and it collapses (dart 434).
THE TECHNIQUE perfect secrecy — every plaintext is possible for a given ciphertext
The demo shows one ciphertext (9) decrypting to two different plaintexts under two different keys — so the ciphertext alone reveals nothing: live demo
HISTORY & CREDIT Miller 1882 · Vernam 1917 · Shannon 1949
“Every cipher can be broken with enough compute.” — not the one-time pad: no amount of computation helps, because the ciphertext holds no information to find. cited
the construction · XOR with a random key as long as the message, used once. perfect secrecy · P(m | c) = P(m) — the ciphertext leaves the message’s odds unchanged (Shannon, 1949). 1882 / 1917 / 1949 · Frank Miller described a one-time pad in 1882 (rediscovered 2011); Gilbert Vernam built the XOR cipher (AT&T patent filed 1918), and Joseph Mauborgne added the random, one-use key (~1918); Claude Shannon proved perfect secrecy (1949).
A ciphertext consistent with every possible message — secrecy no computer can crack, bought with a one-time random key. information-theoretic
RECOMMEND FOR I-13 perfect secrecy, on the compiler
On the canonical compiler, ciphertext 9 decrypts to 5 under key 12 and to 12 under key 5 — both valid, so 9 could be anything:
$ i13 run zd_onetimepad.i13 # one ciphertext, two plaintexts
RUN OK · 30 step(s) · peak stack 3 · call depth 0
ct = 9
dec1 = 5 -- ct ^ key1(=12)
dec2 = 12 -- ct ^ key2(=5)
both_valid = 1 -- 9 is consistent with BOTH -> reveals nothing
Recommend as a NULL — information-theoretic, not a mechanism axis. Perfect secrecy is a property of the key distribution (random, one-time), not extra structure the output computation carries; and it needs true randomness, which i13 (deterministic f64) cannot supply — we ground the secrecy logic (one ciphertext, many plaintexts), not a random pad. The cipher itself is the self-inverse XOR (dart 422). NULL, but the batch’s deepest single idea: the one thing proven unbreakable.