Exhibit 36 of 174 1882 · Theoretical

One-Time Pad

A canonical cipher with proven perfect secrecy — and nearly impossible to use correctly

Perfect secrecy requires an independent, uniformly random secret pad at least as long as the message, used once. No authentication.

InventorMiller’s 1882 proposal; Vernam’s teleprinter work; Shannon’s 1949 theory
Year1882 / 1917
Key TypeRandom key same length as message (used once)
Broken ByNever — if rules followed. VENONA: key reuse exploitation
Modern LessonInformation-theoretic security (Shannon, 1949)

Can an attacker change what you read?

Perfect secrecy protects confidentiality. It does not authenticate the message. In this letter-based model, adding a shift Δ to one ciphertext letter changes the receiver’s corresponding plaintext letter by the same Δ modulo 26. The attacker needs neither the pad nor the original letter to make that change.

Intercepted ciphertext
Altered ciphertext
Sender’s plaintext
Receiver’s plaintext


    

Reveal the sender data to inspect the result. A predictable letter shift does not mean the attacker can create a meaningful sentence without knowing the original text. There is no authentication check in this toy, so the receiver accepts the modified letters. A real system needs message authentication in addition to encryption.

Teaching limits: This is an original fixed example with a displayed, non-secret pad, not a secure communication tool or a randomness demonstration. Hiding fields only changes the view; the values remain available to this browser. The attack works even with a truly random, secret, single-use pad.

Reading: Jonathan Katz and Yehuda Lindell, Introduction to Modern Cryptography, revised third edition, §4.1.2, “Encryption vs. Message Authentication”; Niels Ferguson, Bruce Schneier and Tadayoshi Kohno, Cryptography Engineering (2010), Chapters 2 and 6. See modern cryptography for the wider transition from historical ciphers to secure systems.

Does a flat ciphertext histogram prove secrecy?

Choose a source distribution, then encrypt one bit with an independent pad bit: C = M XOR K. This table enumerates the declared model; it does not estimate randomness from a sample. Values are rounded to five decimal places.

All four plaintext/pad outcomes
MKCProbability

Try uniform messages and a biased pad. The ciphertext histogram stays flat, yet the two possible messages produce different ciphertext distributions. The pairwise total-variation distance compares encrypting a chosen M = 0 with encrypting a chosen M = 1; it remains defined even when your selected prior never produces one of them. Mutual information is measured in bits and depends on the chosen prior. With a constant plaintext, it is zero even for identity encryption. That says nothing about other possible messages.

Individually hidden, jointly revealing

Now take two independent uniform 2-bit messages and a uniform 2-bit pad. Reusing that pad reveals C₁ XOR C₂ = M₁ XOR M₂, although each message viewed with its own ciphertext has zero mutual information.

A perfect, zero-error guarantee for every sequence of T messages requires a key space at least as large as the whole message space: |K| ≥ |M|T, in the cited information-theoretic model. This is a key-resource bound, not an attack runtime. Pseudorandom expansion changes the guarantee to a computational one. The paper starts with an authenticated communication resource; raw OTP does not supply that authentication.

Source: Junji Shikata, Formalization of Information-Theoretic Security for Encryption and Key Agreement, Revisited, revised 4 September 2012, PDF pp. 7–16 and 24–31. These are our finite worked examples of its distinctions. Its strong definitions have specified stand-alone/composable relationships; this is not a claim that secrecy never composes.

Teaching limits: These are small declared probability models, not a secure communication tool, an entropy-source test or a certification of browser randomness. Decryption correctness, secrecy and authentication are separate questions.

Secrecy, useful changes and rejection

The tampering experiment above asks whether an attacker can change what arrives. Two further questions matter: did the message stay secret, and could the receiver reject a forgery? A single “secure” label cannot answer all three.

Different promises in explicitly bounded models
ConstructionMessage secrecyControlled changesForgery rejection
Ideal fixed-length OTPPerfect for one message under its assumptionsA ciphertext delta causes the same plaintext deltaNone
Secret affine permutation over GF(q), q > 2The cited paper's secrecy for two distinct messagesMeets that paper's perfect non-malleability definitionNone: every ciphertext decrypts
Message plus an information-theoretic authentication tagNone: the message is sent openlyApproximate non-malleability follows under the cited definition and error boundBounded forgery probability under the stated key/use conditions
The model behind the affine row

Choose uniform a ≠ 0 and b in GF(q), encrypt C = aM + b, and decrypt M = a−1(C − b). The paper studies deterministic injective secret-key encodings with one observed ciphertext. For equal message/ciphertext alphabets of size greater than 2, its perfect non-malleability is equivalent to uniform mapping of ordered distinct message pairs. Equal-message repetition still leaks equality. This is not ordinary unrestricted multi-message secrecy, a reusable-key transport guarantee or message authentication. With q = 5 there are 20 keys; every ciphertext is valid, so there is no rejection. The approximate definition also treats invalid outcomes explicitly. Short authentication keys do not provide n-bit plaintext confidentiality.

Perfect secrecy can coexist with frequent forgeries

Paterson and Stinson's tiny five-key splitting code uses randomized encodings for two sources. Every transmitted symbol has probability 1/5 regardless of the source, but an optimal substitution succeeds 1/2 of the time and impersonation 4/5. “Optimal” means optimal for these deliberately weak toy parameters. Uniform independent keys, equiprobable encoding and one observed message are part of the model. Their bare algebraic manipulation detection (AMD) code instead assumes a blind additive offset; it is not a general MAC for a visible message. The keyed group-development construction adds secret translation and additional conditions.

Sources: Kawachi, Portmann and Tanaka, Characterization of the relations between information-theoretic non-malleability, secrecy, and authenticity, full version revised 15 August 2012, §§2–6 and Appendix B. Section 6 and Appendices A/B extend the ICITS 2011 published version. Paterson and Stinson, Splitting authentication codes with perfect secrecy, manuscript 24 August 2021, PDF pp. 3–7, 10–15 and 22. Archive posting alone does not establish peer review of an uploaded version.

Why This Matters

The one-time pad is a canonical example of perfect secrecy when its assumptions hold. Claude Shannon’s 1949 proof of its perfect secrecy is a cornerstone of information theory — and the VENONA project showed exactly what happens when its rules are violated.

Historical Context

Frank Miller described a one-time pad system in 1882. Gilbert Vernam developed a teleprinter system in 1917 and received its patent in 1919. But it was Claude Shannon who proved in 1949 that the OTP achieves perfect secrecy — ciphertext reveals absolutely nothing about the plaintext to an attacker with unlimited computing power.

The VENONA opening came from duplicated pad pages at manufacture, not simply from signals officers deciding to reuse pages. Recovery was partial and laborious. Readings supplied espionage leads, including leads concerning Julius Rosenberg and Klaus Fuchs; identifying people required investigative corroboration. Compare the VENONA exhibit with Cecil Phillips’s “What Made VENONA Possible?” in the CIA/NSA documentary collection and the FBI’s account of the investigations.

How It Works
Binary OTP: C = P XOR K; P = C XOR K
Letter OTP used below: C = (P + K) mod 26
                       P = (C − K) mod 26

Example:
Plain:  H  E  L  L  O  = 07 04 11 11 14
Key:    X  M  C  K  L  = 23 12 02 10 11 (illustrative pad)
Cipher: 30 16 13 21 25 mod 26 = E Q N V Z

Four requirements for perfect secrecy:
1. Key must be uniformly random and independent of the message (not pseudorandom)
2. Key must be as long as the message
3. Key must never be reused
4. Key must be kept secret

Without these assumptions, the perfect-secrecy guarantee does not follow
H E L L O Plain 07 04 11 11 14 + + + + + Key 23 12 02 10 11 mod 26 Cipher 04 16 13 21 25 E Q N V Z
One-Time Pad: each letter is added to a random key letter mod 26 — perfectly secret if the key is truly random and never reused
ℹ️

About this demo: The demo works in letters: each plaintext letter is shifted by the corresponding key letter (mod 26). Leave the key blank and a random pad is generated with the browser's secure random source and appended to the output as [Key: …]. A key shorter than the message is rejected rather than repeated. The displayed pad is available to this browser, so this is not confidential communication. Browser-generated randomness does not demonstrate the information-theoretic assumptions of an ideal physical random source.

How It Was Broken
🔒

Shannon's proof (1949): For any ciphertext C and any possible plaintext P, P(plaintext=P | ciphertext=C) = P(plaintext=P). The ciphertext provides zero information about the plaintext. An attacker with unlimited computing power cannot improve on the best guess justified by the plaintext's prior distribution.

VENONA: Key Reuse Attack
Complexity: Moderate if pads reused

For a binary reused pad, C1 XOR C2 = P1 XOR P2: the key cancels, exposing a relation between the plaintexts. That relation may support crib-based recovery, but need not uniquely determine both messages. VENONA exploited reused Soviet decimal additive material and required codebook reconstruction and extensive analysis. It began in the US Army’s Signal Intelligence Service in 1943; NSA inherited the work later.

What It Teaches Modern Cryptography
Concept from One-Time PadModern Evolution
Perfect secrecy (Shannon, 1949)Information-theoretic vs computational security: the fundamental distinction
XOR as cipher operationMany modern stream ciphers combine data with a pseudorandom keystream using XOR
Key = message lengthLong secret pads create distribution and storage costs; public-key key establishment addresses a different security model
Key reuse is catastrophicModern stream constructions require appropriate nonce and keystream handling; they can safely reuse a long-term key under their specified conditions
Worked Example
Message: A T T A C K   (6 letters)
As numbers (A=0): 0  19  19  0  2  10

Illustrative key: 7  14   3  8  25  16
(fixed example; no random-source provenance claimed)

Encrypt — add mod 26:
  A(0)  + key(7)  = 7  mod 26 = 7  → H
  T(19) + key(14) = 33 mod 26 = 7  → H
  T(19) + key(3)  = 22 mod 26 = 22 → W
  A(0)  + key(8)  = 8  mod 26 = 8  → I
  C(2)  + key(25) = 27 mod 26 = 1  → B
  K(10) + key(16) = 26 mod 26 = 0  → A

Ciphertext: H H W I B A

Decrypt — subtract mod 26:
  H(7)  − key(7)  = 0  mod 26 = 0  → A  ✓
  H(7)  − key(14) = −7 mod 26 = 19 → T  ✓

Why unbreakable: HHWIBA could decrypt to
any 6-letter message with some key.
The ciphertext does not change the prior probabilities
of the possible plaintexts.
Related Exhibits
  • Enigma Machine — A finite-state rotor system, distinct from an independent random pad
  • Lorenz Cipher — XOR-based teleprinter cipher inspired by OTP principles
  • Vigenère Cipher — Repeating-key polyalphabetic: what happens when the key is shorter than the message
Quick Facts
Exhibit36 of 174
Era1882 · Theoretical
TrustSecure (Modern)
InventorMiller’s 1882 proposal; Vernam’s teleprinter work; Shannon’s 1949 theory
Year1882 / 1917
Key TypeRandom key same length as message (used once)
Broken ByNever — if rules followed. VENONA: key reuse exploitation

Sources and Reading

Claude E. Shannon, Communication Theory of Secrecy Systems (1949), §10, for perfect secrecy; Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone, Handbook of Applied Cryptography (1997), §1.5. The displayed example keys are teaching data, not evidence of a particular randomness process.