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

After Apple loosened its App Store guidelines to permit game emulators, the retro game emulator Delta — an app 10 years in the making — hit the top of the…

Adobe comes after indie game emulator Delta for copying its logo

Meta is once again taking on its competitors by developing a feature that borrows concepts from others — in this case, BeReal and Snapchat. The company is developing a feature…

Meta’s latest experiment borrows from BeReal’s and Snapchat’s core ideas

Welcome to Startups Weekly! We’ve been drowning in AI news this week, with Google’s I/O setting the pace. And Elon Musk rages against the machine.

Startups Weekly: It’s the dawning of the age of AI — plus,  Musk is raging against the machine

IndieBio’s Bay Area incubator is about to debut its 15th cohort of biotech startups. We took special note of a few, which were making some major, bordering on ludicrous, claims…

IndieBio’s SF incubator lineup is making some wild biotech promises

YouTube TV has announced that its multiview feature for watching four streams at once is now available on Android phones and tablets. The Android launch comes two months after YouTube…

YouTube TV’s ‘multiview’ feature is now available on Android phones and tablets

Featured Article

Two Santa Cruz students uncover security bug that could let millions do their laundry for free

CSC ServiceWorks provides laundry machines to thousands of residential homes and universities, but the company ignored requests to fix a security bug.

13 hours ago
Two Santa Cruz students uncover security bug that could let millions do their laundry for free

OpenAI’s Superalignment team, responsible for developing ways to govern and steer “superintelligent” AI systems, was promised 20% of the company’s compute resources, according to a person from that team. But…

OpenAI created a team to control ‘superintelligent’ AI — then let it wither, source says

TechCrunch Disrupt 2024 is just around the corner, and the buzz is palpable. But what if we told you there’s a chance for you to not just attend, but also…

Harness the TechCrunch Effect: Host a Side Event at Disrupt 2024

Decks are all about telling a compelling story and Goodcarbon does a good job on that front. But there’s important information missing too.

Pitch Deck Teardown: Goodcarbon’s $5.5M seed deck

Slack is making it difficult for its customers if they want the company to stop using its data for model training.

Slack under attack over sneaky AI training policy

A Texas-based company that provides health insurance and benefit plans disclosed a data breach affecting almost 2.5 million people, some of whom had their Social Security number stolen. WebTPA said…

Healthcare company WebTPA discloses breach affecting 2.5 million people

Featured Article

Microsoft dodges UK antitrust scrutiny over its Mistral AI stake

Microsoft won’t be facing antitrust scrutiny in the U.K. over its recent investment into French AI startup Mistral AI.

15 hours ago
Microsoft dodges UK antitrust scrutiny over its Mistral AI stake

Ember has partnered with HSBC in the U.K. so that the bank’s business customers can access Ember’s services from their online accounts.

Embedded finance is still trendy as accounting automation startup Ember partners with HSBC UK

Kudos uses AI to figure out consumer spending habits so it can then provide more personalized financial advice, like maximizing rewards and utilizing credit effectively.

Kudos lands $10M for an AI smart wallet that picks the best credit card for purchases

The EU’s warning comes after Microsoft failed to respond to a legally binding request for information that focused on its generative AI tools.

EU warns Microsoft it could be fined billions over missing GenAI risk info

The prospects for troubled banking-as-a-service startup Synapse have gone from bad to worse this week after a United States Trustee filed an emergency motion on Wednesday.  The trustee is asking…

A US Trustee wants troubled fintech Synapse to be liquidated via Chapter 7 bankruptcy, cites ‘gross mismanagement’

U.K.-based Seraphim Space is spinning up its 13th accelerator program, with nine participating companies working on a range of tech from propulsion to in-space manufacturing and space situational awareness. The…

Seraphim’s latest space accelerator welcomes nine companies

OpenAI has reached a deal with Reddit to use the social news site’s data for training AI models. In a blog post on OpenAI’s press relations site, the company said…

OpenAI inks deal to train AI on Reddit data

X users will now be able to discover posts from new Communities that are trending directly from an Explore tab within the section.

X pushes more users to Communities

For Mark Zuckerberg’s 40th birthday, his wife got him a photoshoot. Zuckerberg gives the camera a sly smile as he sits amid a carefully crafted re-creation of his childhood bedroom.…

Mark Zuckerberg’s makeover: Midlife crisis or carefully crafted rebrand?

Strava announced a slew of features, including AI to weed out leaderboard cheats, a new ‘family’ subscription plan, dark mode and more.

Strava taps AI to weed out leaderboard cheats, unveils ‘family’ plan, dark mode and more

We all fall down sometimes. Astronauts are no exception. You need to be in peak physical condition for space travel, but bulky space suits and lower gravity levels can be…

Astronauts fall over. Robotic limbs can help them back up.

Microsoft will launch its custom Cobalt 100 chips to customers as a public preview at its Build conference next week, TechCrunch has learned. In an analyst briefing ahead of Build,…

Microsoft’s custom Cobalt chips will come to Azure next week

What a wild week for transportation news! It was a smorgasbord of news that seemed to touch every sector and theme in transportation.

Tesla keeps cutting jobs and the feds probe Waymo

Sony Music Group has sent letters to more than 700 tech companies and music streaming services to warn them not to use its music to train AI without explicit permission.…

Sony Music warns tech companies over ‘unauthorized’ use of its content to train AI

Winston Chi, Butter’s founder and CEO, told TechCrunch that “most parties, including our investors and us, are making money” from the exit.

GrubMarket buys Butter to give its food distribution tech an AI boost

The investor lawsuit is related to Bolt securing a $30 million personal loan to Ryan Breslow, which was later defaulted on.

Bolt founder Ryan Breslow wants to settle an investor lawsuit by returning $37 million worth of shares

Meta, the parent company of Facebook, launched an enterprise version of the prominent social network in 2015. It always seemed like a stretch for a company built on a consumer…

With the end of Workplace, it’s fair to wonder if Meta was ever serious about the enterprise

X, formerly Twitter, turned TweetDeck into X Pro and pushed it behind a paywall. But there is a new column-based social media tool in town, and it’s from Instagram Threads.…

Meta Threads is testing pinned columns on the web, similar to the old TweetDeck

As part of 2024’s Accessibility Awareness Day, Google is showing off some updates to Android that should be useful to folks with mobility or vision impairments. Project Gameface allows gamers…

Google expands hands-free and eyes-free interfaces on Android