Startups

An (Important) Disproof Of The One-Time Pad

Comment

Image Credits:

Contributor

Contributor

More posts from Contributor

In a recent TechCrunch article I was quoted calling the one-time pad a “unicorn”. Inevitably, I was roundly criticized. But what none of the commenters (or myself) realized, however, was how appropriate the term “unicorn” was. The perfect security of the one-time pad, like a unicorn, is imaginary.

Claude Shannon’s seminal proof of the perfect secrecy of the one-time pad fails because he uses two different definitions of “random” but treats them as equivalent.

G. S. Vernam’s original 1917 paper proposing an unbreakable stream cipher introduces the concept with this sentence: “If, now, instead of using English words or sentences, we employ a key composed of letters selected absolutely at random, a cipher system is produced which is absolutely unbreakable.”

This implies that the set of letter sequences that are valid English is a completely different set from letter sequences chosen completely at random. This is obviously untrue. The set of letter sequences that are valid English is a subset of all possible letter sequences, not a separate set. If one chooses three letters completely at random, approximately 6% will be English words. 15% of random two letter sequences are English words.

But Vernam wasn’t thinking of random sequences in the probabilistic sense, he was thinking of sequences that have a high level of entropy (in the information theory sense). Bruce Schneier (in Applied Cryptography) describes a high entropy sequence as follows: “It looks random. This means that it passes all the statistical tests of randomness we can find… It is unpredictable… [it] should not be compressible”. A sequence with a high level of entropy never looks like “ABABABABABABABAB...“, for example. But because these kind of sequences are excluded from high-entropy keys, they are not random in the traditional sense.

This concept of randomness exists because these sorts of sequences are very useful for stream ciphers, to prevent cryptanalysis using frequency analysis. The distribution of letters (or bits) in a high entropy sequence is uniform even for relatively short sequences (i.e. is “locally random”), whereas when using an English language passphrase the letter “e” appears far more often than, say, the letter “q”. Computer random number generators produce high entropy sequences. However, these kinds of sequences are not appropriate for block ciphers (e.g. AES) which require truly random numbers.

Shannon understood that a one-time pad would require high entropy keys to be secure. He explicitly differentiates the Vernam cipher from earlier ciphers: “A running key cipher is a Vernam type system where, in place of a random sequence of letters, the key is a meaningful text. Now it is known that running key ciphers can usually be solved uniquely.”

However, when Shannon attempts to prove that the Vernam cipher is perfect, rather than simply secure, he uses a definition for the key that is truly random in the probabilistic sense. In his words: “Perfect systems in which the number of cryptograms, the number of messages, and the number of keys are all equal are characterized by the properties that (1) each M is connected to each E by exactly one line, (2) all keys are equally likely.” All keys are equally likely – even keys that don’t “look random”.

A simple example will demonstrate why the one-time pad can not be secure when using truly random keys.

We’ll use Schneier’s one-time pad example, from Applied Cryptography. First, using his choice of a high entropy key, and then using a different key that is possible if we were using a truly random key.

Schneier chooses the plaintext ONETIMEPAD and encrypts using the key TBFRGFARFM, producing the ciphertext IPKLPSFHGQ. But, if (as Schneier writes) “all keys are equally likely”, the one-time pad must be secure for every key.

Let’s choose the very first key (in alphabetical order): AAAAAAAAAA. When we encrypt our plaintext of ONETIMEPAD with this key, we end up with a ciphertext of… ONETIMEPAD. Oops.

While in theory it’s possible that an adversary (knowing we are using a one-time pad) could be fooled, this would only be possible if we live in Mos Eisley (“this is not the plaintext you are looking for“). A less weak-minded adversary would rationally assume that ONETIMEPAD was the plaintext, and that we had sent our message unencrypted. A cipher must have a formal security proof – it can’t be a state of mind.

But how likely is a key of AAAAAAAAAA really? That’s the thing about true randomness – the key AAAAAAAAAA is just as likely as a “random looking” key like TBFRGFARFM.

Of course, this particular key is only one of the problems with trying to achieve perfect secrecy with a truly random key. The keys BBBBBBBBBBCCCCCCCCCCDDDDDDDDDD, etc. turn our “perfect” one-time pad into a Caesar cipher, which is easily broken. Many keys produced randomly would be English language words or phrases, turning our one-time pad into a running key or Vigenère cipher.

We can’t fix Shannon’s proof by restricting our keys to only the high-entropy keys. By definition, perfect secrecy requires as many keys as possible messages, and so with a key of the same length as the message, all keys (not just the high-entropy ones) must be possible. A one-time pad cannott have “weak keys” the way DES does.

In conclusion, the Vernam (one-time pad) cipher can not be perfectly secure, because any proof of perfect secrecy would require two incompatible definitions of randomness. In fact, in some scenarios a well-implemented one-time pad is the least secure of all ciphers.

Jack Deneut is the founder of Zendo, an encrypted messaging service.

More TechCrunch

Tags

India’s Oyo, once valued at $10 billion, has withdrawn its IPO application from the market regulator for the second time.

Oyo, once valued at $10 billion, shelves IPO plans for second time

Where Aytac Yilmaz lives in the Netherlands, the sun might not appear for days on end, which can really crimp the output of the country’s solar panels. Wind turbines might…

Ore Energy emerges from stealth to build utility-scale batteries that last days, not hours

Paytm, a leading financial services firm in India, said its net loss widened in the fourth quarter as it grappled with a regulatory clampdown.

Paytm warns of job cuts as losses swell after RBI clampdown

Government officials and AI industry executives agreed on Tuesday to apply elementary safety measures in the fast-moving field and establish an international safety research network. Nearly six months after the…

In Seoul summit, heads of states and companies commit to AI safety

Copilot, Microsoft’s brand of generative AI, will soon be far more deeply integrated into the Windows 11 experience.

Microsoft wants to make Windows an AI operating system, launches Copilot+ PCs

Some startups choose to bootstrap from the beginning while others find themselves forced into self funding by a lack of investor interest or a business model that doesn’t fit traditional…

VCs wanted FarmboxRx to become a meal kit, the company bootstrapped instead

Uber and Lyft drivers in Minnesota will see higher pay thanks to a deal between the state and the country’s two largest ride-hailing companies. The upshot: a new law that…

Uber’s and Lyft’s ride-hailing deal with Minnesota comes at a cost

Andreessen Horowitz’s American Dynamism fund has established a new fellowship program aimed at introducing top engineers and technologists to venture investing, a move that could help the firm identify less…

a16z’s American Dynamism team launches program to introduce technical minds to VC

Another fintech startup, and its customers, has been gravely impacted by the implosion of banking-as-a-service startup Synapse. Copper Banking, a digital banking service aimed at teens, notified its customers on…

Teen fintech Copper had to abruptly discontinue its banking, debit products

Autodesk — the 3D tools behemoth — has acquired Wonder Dynamics, a startup that lets creators quickly and easily make complex characters and visual effects using AI-powered image analysis. The…

Autodesk acquires AI-powered VFX startup Wonder Dynamics

Farcaster, a blockchain-based social protocol founded by two Coinbase alumni, announced on Tuesday that it closed a $150 million fundraise. Led by Paradigm, the platform also raised money from a16z…

Farcaster, a crypto-based social network, raised $150M with just 80K daily users

Microsoft announced on Tuesday during its annual Build conference that it’s bringing “Windows Volumetric Apps” to Meta Quest headsets. The partnership will allow Microsoft to bring Windows 365 and local…

Microsoft’s new ‘Volumetric Apps’ for Quest headsets extend Windows apps into the 3D space

The spam reached Bluesky by first crossing over two other decentralized networks: Mastodon and Nostr.

The ‘vote Trump’ spam that hit Bluesky in May came from decentralized rival Nostr

Welcome to TechCrunch Fintech! This week, we’re looking at the continued fallout from Synapse’s bankruptcy, how Layer wants to disrupt SMB accounting, and much more! To get a roundup of…

There’s a real appetite for a fintech alternative to QuickBooks

The company is hoping to produce electricity at $13 per megawatt hour, which would be more than 50% cheaper than traditional onshore wind.

Bill Gates-backed wind startup AirLoom is raising $12M, filings reveal

Generative AI makes stuff up. It can be biased. Sometimes it spits out toxic text. So can it be “safe”? Rick Caccia, the CEO of WitnessAI, believes it can. “Securing…

WitnessAI is building guardrails for generative AI models

It’s not often that you hear about a seed round above $10 million. H, a startup based in Paris and previously known as Holistic AI, has announced a $220 million…

French AI startup H raises $220M seed round

Hey there, Series A to B startups with $35 million or less in funding — we’ve got an exciting opportunity that’s tailor-made for your growth journey! If you’re looking to…

Boost your startup’s growth with a ScaleUp package at TC Disrupt 2024

TikTok is pulling out all the stops to prevent its impending ban in the United States. Aside from initiating legal action against the U.S. government, that means shaping up its…

As a US ban looms, TikTok announces a $1M program for socially driven creators

Microsoft wants to put its Copilot everywhere. It’s only a matter of time before Microsoft renames its annual Build developer conference to Microsoft Copilot. Hopefully, some of those upcoming events…

Microsoft’s Power Automate no-code platform adds AI flows

Build is Microsoft’s largest developer conference and of course, it’s all about AI this year. So it’s no surprise that GitHub’s Copilot, GitHub’s “AI pair programming tool,” is taking center…

GitHub Copilot gets extensions

Microsoft wants to make its brand of generative AI more useful for teams — specifically teams across corporations and large enterprise organizations. This morning at its annual Build dev conference,…

Microsoft intros a Copilot for teams

Microsoft’s big focus at this year’s Build conference is generative AI. And to that end, the tech giant announced a series of updates to its platforms for building generative AI-powered…

Microsoft upgrades its AI app-building platforms

The U.K.’s data protection watchdog has closed an almost year-long investigation of Snap’s AI chatbot, My AI — saying it’s satisfied the social media firm has addressed concerns about risks…

UK data protection watchdog ends privacy probe of Snap’s GenAI chatbot, but warns industry

U.S. cell carrier Patriot Mobile experienced a data breach that included subscribers’ personal information, including full names, email addresses, home ZIP codes and account PINs, TechCrunch has learned. Patriot Mobile,…

Conservative cell carrier Patriot Mobile hit by data breach

It’s been three years since Spotify acquired live audio startup Betty Labs, and yet the music streaming service isn’t leveraging the technology to its fullest potential — at least not…

Spotify’s ‘Listening Party’ feature falls short of expectations

Alchemist Accelerator has a new pile of AI-forward companies demoing their wares today, if you care to watch, and the program itself is making some international moves into Tokyo and…

Alchemist’s latest batch puts AI to work as accelerator expands to Tokyo, Doha

“Late Pledge” allows campaign creators to continue collecting money even after the campaign has closed.

Kickstarter now lets you pledge after a campaign closes

Stack AI’s co-founders, Antoni Rosinol and Bernardo Aceituno, were PhD students at MIT wrapping up their degrees in 2022 just as large language models were becoming more mainstream. ChatGPT would…

Stack AI wants to make it easier to build AI-fueled workflows

Pinecone, the vector database startup founded by Edo Liberty, the former head of Amazon’s AI Labs, has long been at the forefront of helping businesses augment large language models (LLMs)…

Pinecone launches its serverless vector database out of preview