{"id":1208,"date":"2026-11-01T08:36:45","date_gmt":"2026-11-01T07:36:45","guid":{"rendered":"https:\/\/hadamard.com\/c\/one-time-pad-unbreakable-shannon-proof\/"},"modified":"2026-11-01T08:36:45","modified_gmt":"2026-11-01T07:36:45","slug":"one-time-pad-unbreakable-shannon-proof","status":"publish","type":"post","link":"https:\/\/hadamard.com\/c\/one-time-pad-unbreakable-shannon-proof\/","title":{"rendered":"Is the One-Time Pad Unbreakable? Shannon&#8217;s Proof and Venona"},"content":{"rendered":"<p>Is the one-time pad unbreakable? Yes, in a strict mathematical sense. Claude Shannon proved that if the key is truly random, at least as long as the message, kept secret and never reused, the ciphertext tells an attacker nothing about the plaintext, however much computing power they have. In practice those conditions are hard to meet, and when they slip, the pad stops being secure. The best-known example is the Venona project, where duplicated pad pages let US codebreakers read part of the Soviet Union&#8217;s wartime traffic.<\/p>\n<p>This article covers how the pad works, who invented it, what Shannon actually proved, and why everyday encryption uses something else.<\/p>\n<h2>Is the one-time pad unbreakable? The short answer<\/h2>\n<p>The one-time pad is the only widely known cipher with a proof of <em>perfect secrecy<\/em>. That proof holds only when all four of these conditions are met:<\/p>\n<ol>\n<li><strong>The key is truly random.<\/strong> Every possible key must be equally likely. A key from a predictable generator or a human &#8220;random&#8221; choice doesn&#8217;t qualify.<\/li>\n<li><strong>The key is at least as long as the message.<\/strong> Every bit or character of plaintext needs its own key bit or character.<\/li>\n<li><strong>The key is used only once.<\/strong> As soon as any part of a key encrypts a second message, perfect secrecy is gone.<\/li>\n<li><strong>The key stays secret.<\/strong> Both parties need a copy, and nobody else can get one, either in transit or in storage.<\/li>\n<\/ol>\n<p>If any condition fails, the pad becomes an ordinary cipher, and often a weak one. The math is fine. Real systems break because of how the keys are made, delivered and handled.<\/p>\n<h2>How the one-time pad works: XOR with a truly random key<\/h2>\n<p>In its modern binary form, also called the Vernam cipher, encryption is a bitwise XOR (exclusive or) of the message with the key. XOR gives 1 when the two input bits differ and 0 when they match. XOR undoes itself, so the receiver XORs the ciphertext with the same key and gets the message back.<\/p>\n<table>\n<thead>\n<tr>\n<th>Step<\/th>\n<th>Bits<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Message<\/td>\n<td>1011 0010<\/td>\n<\/tr>\n<tr>\n<td>Key (random)<\/td>\n<td>0110 1100<\/td>\n<\/tr>\n<tr>\n<td>Ciphertext = message XOR key<\/td>\n<td>1101 1110<\/td>\n<\/tr>\n<tr>\n<td>Ciphertext XOR key<\/td>\n<td>1011 0010 (message recovered)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Here is why this hides everything. For any ciphertext and <em>any<\/em> candidate plaintext of the same length, exactly one key turns one into the other. If all keys are equally likely, all plaintexts stay equally plausible. An attacker who tries every key doesn&#8217;t find &#8220;the&#8221; answer. They find every possible message of that length, including all the wrong ones, and have no way to choose between them.<\/p>\n<h2>Who invented the one-time pad? Miller, Vernam and Mauborgne<\/h2>\n<h3>Frank Miller, 1882<\/h3>\n<p>The earliest known description comes from Frank Miller, a Sacramento banker. In 1882 he published <em>Telegraphic Code to Insure Privacy and Secrecy in the Transmission of Telegrams<\/em>, roughly 35 years before the version usually credited as the first. Computer scientist Steven Bellovin found the book at the Library of Congress and described it in <a href=\"https:\/\/www.cs.columbia.edu\/~smb\/papers\/history_abstracts.html\" target=\"_blank\" rel=\"noopener\">Cryptologia 35(3), July 2011<\/a>. He <a href=\"https:\/\/cryptologicfoundation.org\/article\/2011\/11\/24\/early-use-of-one-time-pad-technique-discovered\" target=\"_blank\" rel=\"noopener\">found no evidence<\/a> that Vernam or Mauborgne ever met Miller, so the later invention appears to have been independent.<\/p>\n<h3>Gilbert Vernam&#8217;s 1919 patent<\/h3>\n<p>Gilbert S. Vernam, an AT&amp;T engineer from Brooklyn, filed <a href=\"https:\/\/www.cs.miami.edu\/home\/burt\/learning\/csc609.261\/US1310719.pdf\" target=\"_blank\" rel=\"noopener\">US Patent 1,310,719, &#8220;Secret Signaling System&#8221;<\/a> on September 13, 1918. It was issued on July 22, 1919. The patent combines the Baudot-code teleprinter impulses of the message and the key using relay logic. That operation is XOR, although the patent never uses the word. The NSA has called it <a href=\"https:\/\/cryptologicfoundation.org\/community\/bytes\/this_day_in_history_calendar.html\/event\/2023\/07\/22\/1690002000\/1919-patent-issued-to-gilbert-vernam-for-concept-of-machine-encipherment-\" target=\"_blank\" rel=\"noopener\">&#8220;perhaps one of the most important in the history of cryptography.&#8221;<\/a><\/p>\n<p>Vernam&#8217;s original design wasn&#8217;t a true one-time pad yet. It read the key from a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Gilbert_Vernam\" target=\"_blank\" rel=\"noopener\">loop of tape that repeated<\/a>, so on long messages the key was reused.<\/p>\n<h3>The contested question of the non-repeating key<\/h3>\n<p>Who first insisted that the key must be random and must never repeat is still disputed. Historian David Kahn credited Vernam with randomness and Army Signal Corps officer Joseph Mauborgne with non-repetition, and Mauborgne claimed that credit himself. Bellovin&#8217;s <a href=\"https:\/\/academiccommons.columbia.edu\/doi\/10.7916\/D8Z0369C\" target=\"_blank\" rel=\"noopener\">2014 research<\/a> argues that Vernam most likely came up with non-repetition and that Mauborgne contributed to the two-tape version. The surviving evidence doesn&#8217;t settle it.<\/p>\n<h2>Shannon perfect secrecy: what the 1945 proof actually says<\/h2>\n<p>Claude Shannon gave the pad its theoretical foundation. He first wrote up the work in a classified Bell Labs memo, <em>A Mathematical Theory of Cryptography<\/em> (MM 45-110-02), in 1945, which was later declassified. A version was published in 1949 as <a href=\"https:\/\/en.wikipedia.org\/wiki\/Communication_Theory_of_Secrecy_Systems\" target=\"_blank\" rel=\"noopener\">&#8220;Communication Theory of Secrecy Systems&#8221;<\/a> in the Bell System Technical Journal, vol. 28, pp. 656\u2013715. Shannon showed that the one-time pad is perfectly secret and that any theoretically unbreakable cipher must meet the same requirements as the pad.<\/p>\n<h3>What &#8220;perfect secrecy&#8221; means<\/h3>\n<p>A scheme is perfectly secret if seeing the ciphertext doesn&#8217;t change what an attacker knows about the message. Formally, the probability that the message is <em>m<\/em> given ciphertext <em>c<\/em> equals the probability of <em>m<\/em> before the ciphertext was seen. An equivalent definition, used in course notes such as <a href=\"https:\/\/people.cs.uchicago.edu\/~davidcash\/284-autumn-21\/04-perfect-secrecy.pdf\" target=\"_blank\" rel=\"noopener\">UChicago&#8217;s CMSC 28400<\/a> and <a href=\"https:\/\/courses.maths.ox.ac.uk\/mod\/resource\/view.php?id=49616\" target=\"_blank\" rel=\"noopener\">Oxford&#8217;s cryptography lectures<\/a>, says that with a uniformly random key, every message produces the same distribution of ciphertexts. A ciphertext that looks the same no matter which message produced it carries no information about that message.<\/p>\n<p>This definition doesn&#8217;t depend on a hard math problem or on limits to the attacker&#8217;s computing power. It&#8217;s a statement about probability, so it holds against unlimited computation.<\/p>\n<h3>The catch: the key must be as long as the message<\/h3>\n<p>Shannon also proved the cost. Any perfectly secret scheme needs at least as many possible keys as possible messages, written |K| \u2265 |M|. In practice, the key must be at least as long as the message. The proof, presented in <a href=\"https:\/\/www.ccs.neu.edu\/home\/wichs\/class\/crypto25\/lecture1.pdf\" target=\"_blank\" rel=\"noopener\">Northeastern&#8217;s lecture notes<\/a>, <a href=\"https:\/\/www.cs.cornell.edu\/courses\/cs6830\/2011fa\/scribes\/lecture2.pdf\" target=\"_blank\" rel=\"noopener\">Cornell CS6830<\/a> and <a href=\"https:\/\/cims.nyu.edu\/~dodis\/ps\/one-time-pad.pdf\" target=\"_blank\" rel=\"noopener\">Yevgeniy Dodis&#8217;s notes at NYU<\/a>, works by contradiction:<\/p>\n<ul>\n<li>Suppose there are fewer keys than messages.<\/li>\n<li>Take a ciphertext and decrypt it under every possible key. You get at most |K| candidate plaintexts.<\/li>\n<li>Since |K| &lt; |M|, some possible message is not on that list. That message can&#8217;t be the one that was sent.<\/li>\n<li>The ciphertext has now ruled out a message, so it leaked information, and the scheme isn&#8217;t perfectly secret.<\/li>\n<\/ul>\n<p>The one-time pad meets this bound exactly, with one key bit per message bit. You can&#8217;t get perfect secrecy with a shorter key. That one fact explains most of why the pad is rarely used.<\/p>\n<h2>One-time pad key reuse: how Venona exposed Soviet messages<\/h2>\n<p>The quickest way to lose perfect secrecy is to use a key twice. <a href=\"https:\/\/en.wikipedia.org\/wiki\/One-time_pad\" target=\"_blank\" rel=\"noopener\">Once a key encrypts more than one message<\/a>, the guarantee is gone. In the binary version you can see why: if C1 = M1 XOR K and C2 = M2 XOR K, then C1 XOR C2 = M1 XOR M2. The key cancels out, and the attacker is left with two real messages mixed together, which have structure that can be pulled apart.<\/p>\n<p>That is what happened to Soviet intelligence traffic. Under wartime pressure in 1942, the Soviet maker of one-time pads produced duplicate key pages, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Venona_project\" target=\"_blank\" rel=\"noopener\">reportedly about 35,000<\/a>. The Soviets knew about this and tried to limit the risk by sending the duplicates to users far apart from each other. US Army cryptanalysts at Arlington Hall found the reuse anyway.<\/p>\n<p>Progress was slow and uneven. An <a href=\"https:\/\/theblackvault.com\/documents\/nsa\/venona\/monographs\/monograph-2.html\" target=\"_blank\" rel=\"noopener\">NSA monograph<\/a> says very few 1942 KGB messages could be solved because those messages contained little duplication, and that the codebreakers&#8217; position improved for 1943 and 1944 traffic. According to the <a href=\"https:\/\/documents.theblackvault.com\/documents\/nsa\/cryptoalmanac\/VENONA_An_Overview.pdf\" target=\"_blank\" rel=\"noopener\">NSA&#8217;s overview<\/a>, fewer than 3,000 messages were ever partly or fully decrypted. Almost all were sent between 1942 and 1945, with a few as late as 1948.<\/p>\n<p>Venona doesn&#8217;t show that Shannon was wrong. It shows the opposite: the pad failed exactly where the proof says it would, when condition three broke. The cipher held up mathematically, and the people running it made the mistake.<\/p>\n<h2>Why we use AES and post-quantum cryptography instead<\/h2>\n<p>If the pad is provably secure, why doesn&#8217;t HTTPS use it? Because of the |K| \u2265 |M| bound. Encrypting a terabyte of traffic would need a terabyte of truly random key, delivered in advance over a channel that is already secure, stored safely by both sides, and destroyed after use. If you already had a secure channel that large, you could send the data over it directly.<\/p>\n<p>Modern systems trade perfect secrecy for <em>computational<\/em> security. A cipher like AES uses a short key, such as 256 bits, to encrypt almost any amount of data, and public-key protocols let strangers agree on that key over an open network. These schemes are secure because breaking them is believed to take infeasible amounts of computation, not because breaking them is impossible. Quantum computers matter here: Shor&#8217;s algorithm threatens today&#8217;s public-key key exchange, and Grover&#8217;s algorithm gives a more limited speedup against symmetric primitives. Our explainer on <a href=\"https:\/\/hadamard.com\/c\/can-quantum-computers-break-sha-256\/\">what Grover&#8217;s algorithm really does to SHA-256<\/a> covers the details. Post-quantum cryptography replaces the vulnerable public-key parts, and the <a href=\"https:\/\/hadamard.com\/post-quantum-tracker\/\">Post-Quantum Migration Tracker<\/a> follows where that migration stands.<\/p>\n<p>Quantum key distribution (QKD) tackles the problem from another angle. Protocols such as BB84 and E91 use physics to let two parties build a shared secret key and detect eavesdropping. A QKD-delivered key is often discussed as the input to a one-time pad, because QKD addresses the pad&#8217;s hardest problem, getting enough secret key to both ends. Building that infrastructure is slow, as the delays described in our piece on the <a href=\"https:\/\/hadamard.com\/c\/eagle-1-qkd-satellite-launch-date\/\">Eagle-1 QKD satellite launch<\/a> show.<\/p>\n<p>Hadamard&#8217;s own <a href=\"https:\/\/bb84.com\/\">BB84<\/a> rollup on Ethereum takes the computational route. It uses hash-based, one-time addresses built from hash commitments instead of ECDSA keys, so its security doesn&#8217;t rely on the elliptic-curve assumptions that Shor&#8217;s algorithm breaks.<\/p>\n<h2>FAQ<\/h2>\n<h3>If the one-time pad is unbreakable, why doesn&#8217;t anyone use it for HTTPS or messaging?<\/h3>\n<p>Shannon proved that perfect secrecy needs a key at least as long as the message. For everyday traffic, that means generating, delivering, storing and destroying huge amounts of truly random key ahead of time. AES with a short key and public-key exchange are far more practical and secure enough when used correctly.<\/p>\n<h3>Can quantum computers break a one-time pad?<\/h3>\n<p>No, as long as the four conditions hold. Shannon&#8217;s proof doesn&#8217;t rely on any hard math problem. It shows that the ciphertext contains no information about the message, so no amount of computing power, classical or quantum, can extract information that isn&#8217;t there.<\/p>\n<h3>What happens if you use a one-time pad key twice?<\/h3>\n<p>Perfect secrecy is lost right away. With XOR, combining the two ciphertexts cancels the key and leaves the two plaintexts mixed together, which analysts can often separate. Venona is the classic real-world example.<\/p>\n<h3>Who invented the one-time pad: Miller, Vernam or Mauborgne?<\/h3>\n<p>Frank Miller described the idea first, in 1882. Gilbert Vernam patented machine XOR encryption in 1919, apparently without knowing about Miller. Whether Vernam or Joseph Mauborgne first insisted on a random, non-repeating key is still disputed among historians.<\/p>\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.eecs.yorku.ca\/~roumani\/book\/repo\/files\/Shannon1949.txt\" target=\"_blank\" rel=\"noopener\">C. E. Shannon, &#8220;Communication Theory of Secrecy Systems,&#8221; Bell System Technical Journal, 1949 (text)<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Communication_Theory_of_Secrecy_Systems\" target=\"_blank\" rel=\"noopener\">Communication Theory of Secrecy Systems, Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/historyofinformation.com\/detail.php?id=1806\" target=\"_blank\" rel=\"noopener\">Shannon&#8217;s secrecy work, HistoryofInformation.com<\/a><\/li>\n<li><a href=\"https:\/\/people.cs.uchicago.edu\/~davidcash\/284-autumn-21\/04-perfect-secrecy.pdf\" target=\"_blank\" rel=\"noopener\">Perfect secrecy, CMSC 28400 course notes, University of Chicago (2021)<\/a><\/li>\n<li><a href=\"https:\/\/courses.maths.ox.ac.uk\/mod\/resource\/view.php?id=49616\" target=\"_blank\" rel=\"noopener\">Cryptography lecture notes, University of Oxford Mathematical Institute<\/a><\/li>\n<li><a href=\"https:\/\/www.ccs.neu.edu\/home\/wichs\/class\/crypto25\/lecture1.pdf\" target=\"_blank\" rel=\"noopener\">Daniel Wichs, Cryptography Lecture 1, Northeastern University<\/a><\/li>\n<li><a href=\"https:\/\/www.cs.cornell.edu\/courses\/cs6830\/2011fa\/scribes\/lecture2.pdf\" target=\"_blank\" rel=\"noopener\">CS6830 Lecture 2 scribe notes, Cornell University (2011)<\/a><\/li>\n<li><a href=\"https:\/\/cims.nyu.edu\/~dodis\/ps\/one-time-pad.pdf\" target=\"_blank\" rel=\"noopener\">Yevgeniy Dodis, notes on the one-time pad and Shannon&#8217;s proof, NYU<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/One-time_pad\" target=\"_blank\" rel=\"noopener\">One-time pad, Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/www.cs.columbia.edu\/~smb\/papers\/history_abstracts.html\" target=\"_blank\" rel=\"noopener\">Steven Bellovin, history paper abstracts incl. Cryptologia 35(3), 2011, Columbia University<\/a><\/li>\n<li><a href=\"https:\/\/cryptologicfoundation.org\/article\/2011\/11\/24\/early-use-of-one-time-pad-technique-discovered\" target=\"_blank\" rel=\"noopener\">Early use of one-time pad technique discovered, National Cryptologic Foundation (Nov 24, 2011)<\/a><\/li>\n<li><a href=\"https:\/\/www.cs.miami.edu\/home\/burt\/learning\/csc609.261\/US1310719.pdf\" target=\"_blank\" rel=\"noopener\">US Patent 1,310,719, &#8220;Secret Signaling System,&#8221; G. S. Vernam (1919)<\/a><\/li>\n<li><a href=\"https:\/\/cryptologicfoundation.org\/community\/bytes\/this_day_in_history_calendar.html\/event\/2023\/07\/22\/1690002000\/1919-patent-issued-to-gilbert-vernam-for-concept-of-machine-encipherment-\" target=\"_blank\" rel=\"noopener\">1919 patent issued to Gilbert Vernam, National Cryptologic Foundation<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Gilbert_Vernam\" target=\"_blank\" rel=\"noopener\">Gilbert Vernam, Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/www.cs.columbia.edu\/~smb\/talks\/VernamMauborgneFriedman.pdf\" target=\"_blank\" rel=\"noopener\">Steven Bellovin, &#8220;Vernam, Mauborgne, and Friedman&#8221; (talk slides), Columbia University<\/a><\/li>\n<li><a href=\"https:\/\/academiccommons.columbia.edu\/doi\/10.7916\/D8Z0369C\" target=\"_blank\" rel=\"noopener\">Steven Bellovin, research on the origins of the one-time pad, Columbia Academic Commons (2014)<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Venona_project\" target=\"_blank\" rel=\"noopener\">Venona project, Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/theblackvault.com\/documents\/nsa\/venona\/monographs\/monograph-2.html\" target=\"_blank\" rel=\"noopener\">NSA Venona monograph (mirror), The Black Vault<\/a><\/li>\n<li><a href=\"https:\/\/documents.theblackvault.com\/documents\/nsa\/cryptoalmanac\/VENONA_An_Overview.pdf\" target=\"_blank\" rel=\"noopener\">VENONA: An Overview, NSA Cryptologic Almanac (mirror), The Black Vault<\/a><\/li>\n<li><a href=\"https:\/\/nsa.gov\/news-features\/declassified-documents\/venona\/remembrances\" target=\"_blank\" rel=\"noopener\">Venona remembrances, National Security Agency<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Claude Shannon proved that the one-time pad gives perfect secrecy, but only when the key is truly random, as long as the message, kept secret and never reused. Here is what the proof says, where the pad came from, and how reused pad pages exposed Soviet messages in Venona.<\/p>\n","protected":false},"author":1,"featured_media":1209,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[785],"tags":[843,248,844,842,200],"class_list":["post-1208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-science-mathematics","tag-claude-shannon","tag-cryptography","tag-information-theory","tag-one-time-pad","tag-quantum-security","entry"],"jetpack_featured_media_url":"https:\/\/hadamard.com\/c\/wp-content\/uploads\/2026\/11\/2026-11-01-one-time-pad-unbreakable-shannon-proof.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/comments?post=1208"}],"version-history":[{"count":0,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts\/1208\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/media\/1209"}],"wp:attachment":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/categories?post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/tags?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}