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

Silo, a Bay Area food supply chain startup, has hit a rough patch. TechCrunch has learned that the company on Tuesday laid off roughly 30% of its staff, or north…

Food supply chain software maker Silo lays off ~30% of staff amid M&A discussions

Featured Article

Meta’s new AI council is composed entirely of white men

Meanwhile, women and people of color are disproportionately impacted by irresponsible AI.

8 hours ago
Meta’s new AI council is composed entirely of white men

If you’ve ever wanted to apply to Y Combinator, here’s some inside scoop on how the iconic accelerator goes about choosing companies.

Garry Tan has revealed his ‘secret sauce’ for getting into Y Combinator

Indian ride-hailing startup BluSmart has started operating in Dubai, TechCrunch has exclusively learned and confirmed with its executive. The move to Dubai, which has been rumored for months, could help…

India’s BluSmart is testing its ride-hailing service in Dubai

Under the envisioned framework, both candidate and issue ads would be required to include an on-air and filed disclosure that AI-generated content was used.

FCC proposes all AI-generated content in political ads must be disclosed

Want to make a founder’s day, week, month, and possibly career? Refer them to Startup Battlefield 200 at Disrupt 2024! Applications close June 10 at 11:59 p.m. PT. TechCrunch’s Startup…

Refer a founder to Startup Battlefield 200 at Disrupt 2024

Social networking startup and X competitor Bluesky is officially launching DMs (direct messages), the company announced on Wednesday. Later, Bluesky plans to “fully support end-to-end encrypted messaging down the line,”…

Bluesky now has DMs

The perception in Silicon Valley is that every investor would love to be in business with Peter Thiel. But the venture capital fundraising environment has become so difficult that even…

Peter Thiel-founded Valar Ventures raised a $300 million fund, half the size of its last one

Featured Article

Spyware found on US hotel check-in computers

Several hotel check-in computers are running a remote access app, which is leaking screenshots of guest information to the internet.

11 hours ago
Spyware found on US hotel check-in computers

Gavet has had a rocky tenure at Techstars and her leadership was the subject of much controversy.

Techstars CEO Maëlle Gavet is out

The struggle isn’t universal, however.

Connected fitness is adrift post-pandemic

Featured Article

A comprehensive list of 2024 tech layoffs

The tech layoff wave is still going strong in 2024. Following significant workforce reductions in 2022 and 2023, this year has already seen 60,000 job cuts across 254 companies, according to independent layoffs tracker Layoffs.fyi. Companies like Tesla, Amazon, Google, TikTok, Snap and Microsoft have conducted sizable layoffs in the first months of 2024. Smaller-sized…

13 hours ago
A comprehensive list of 2024 tech layoffs

HoundDog actually looks at the code a developer is writing, using both traditional pattern matching and large language models to find potential issues.

HoundDog.ai helps developers prevent personal information from leaking

The changes are designed to enhance the consumer experience of using Google Pay and make it a more competitive option against other payment methods.

Google Pay will now display card perks, BNPL options and more

Few figures in the tech industry have earned the storied reputation of Vinod Khosla, founder and partner at Khosla Ventures. For over 40 years, he has been at the center…

Vinod Khosla is coming to Disrupt to discuss how AI might change the future

AI has already started replacing voice agents’ jobs. Now, companies are exploring ways to replace the existing computer-generated voice models with synthetic versions of human voices. Truecaller, the widely known…

Truecaller partners with Microsoft to let its AI respond to calls in your own voice

Meta is updating its Ray-Ban smart glasses with new hands-free functionality, the company announced on Wednesday. Most notably, users can now share an image from their smart glasses directly to…

Meta’s Ray-Ban smart glasses now let you share images directly to your Instagram Story

Spotify launched its own font, the company announced on Wednesday. The music streaming service hopes that its new typeface, “Spotify Mix,” will help Spotify distinguish its own unique visual identity. …

Why Spotify is launching its own font, Spotify Mix

In 2008, Marty Kagan, who’d previously worked at Cisco and Akamai, co-founded Cedexis, a (now-Cisco-owned) firm developing observability tech for content delivery networks. Fellow Cisco veteran Hasan Alayli joined Kagan…

Hydrolix seeks to make storing log data faster and cheaper

A dodgy email containing a link that looks “legit” but is actually malicious remains one of the most dangerous, yet successful, tricks in a cybercriminal’s handbook. Now, an AI startup…

Bolster, creator of the CheckPhish phishing tracker, raises $14M led by Microsoft’s M12

If you’ve been looking forward to seeing Boeing’s Starliner capsule carry two astronauts to the International Space Station for the first time, you’ll have to wait a bit longer. The…

Boeing, NASA indefinitely delay crewed Starliner launch

TikTok is the latest tech company to incorporate generative AI into its ads business, as the company announced on Tuesday that it’s launching a new “TikTok Symphony” AI suite for…

TikTok turns to generative AI to boost its ads business

Gone are the days when space and defense were considered fundamentally antithetical to venture investment. Now, the country’s largest venture capital firms are throwing larger portions of their money behind…

Space VC closes $20M Fund II to back frontier tech founders from day zero

These days every company is trying to figure out if their large language models are compliant with whichever rules they deem important, and with legal or regulatory requirements. If you’re…

Patronus AI is off to a magical start as LLM governance tool gains traction

Link-in-bio startup Linktree has crossed 50 million users and is rolling out the beta of its social commerce program.

Linktree surpasses 50M users, rolls out its social commerce program to more creators

For a $5.99 per month, immigrants have a bank account and debit card with fee-free international money transfers and discounted international calling.

Immigrant banking platform Majority secures $20M following 3x revenue growth

When developers have a particular job that AI can solve, it’s not typically as simple as just pointing an LLM at the data. There are other considerations such as cost,…

Unify helps developers find the best LLM for the job

Response time is Aerodome’s immediate value prop for potential clients.

Aerodome is sending drones to the scene of the crime

Granola takes a more collaborative approach to working with AI.

Granola debuts an AI notepad for meetings