Public Key Cryptography

Episode Summary

Paragraph 1: In 1977, two Stanford graduate students were prevented by the US government from publicly presenting their research on public key cryptography at a conference. The government claimed it would be like exporting nuclear arms to hostile foreign powers. However, the research was not about biological weapons or conspiracies, just advances in encryption. Paragraph 2: The head of the government agency, Admiral Bobby Ray Inman, was puzzled why academics would work on cryptography, which he saw as only useful for spies and criminals. In the past, academics helped crack codes during wars. Now Stanford researchers were spreading knowledge that could help US adversaries secretly communicate. Paragraph 3: Throughout history, cryptography has been driven by conflict. The Stanford researchers wondered if encryption could be asymmetric - allowing someone to send an encrypted message to a stranger confident only they could decode it. This seemed impossible until breakthrough research papers in 1976 by Diffie, Hellman and RSA. Paragraph 4: They realized some mathematical operations are easy in one direction but hard in reverse. For example, it's easy to multiply two large prime numbers but very difficult to factor the resulting semi-prime number back into its primes. This is the basis of public key cryptography, which enabled the secure communication necessary for today's internet. Paragraph 5: The government spy chief Admiral Inman initially opposed the research but came to appreciate the value of public key cryptography for private sector transactions. However, strong encryption also helps criminals, creating a dilemma about government surveillance versus privacy. The NSA has sought to crack common encryption. Quantum computing could also one day break public key crypto. So the race continues between encryption and code breaking.

Episode Show Notes

Take a very large prime number – one that is not divisible by anything other than itself. Then take another. Multiply them together. That is simple enough, and it gives you a very, very large “semi-prime” number. That is a number that is divisible only by two prime numbers. Now challenge someone else to take that semi-prime number, and figure out which two prime numbers were multiplied together to produce it. That, it turns out, is exceptionally hard. Some mathematics are a lot easier to perform in one direction than another. Public key cryptography works by exploiting this difference. And without it we would not have the internet as we know it. Tim Harford tells the story of public key cryptography – and the battle between the geeks who developed it, and the government which tried to control it.

(Photo: Encryption algorithms. Credit: Shutterstock)

Episode Transcript

SPEAKER_02: Amazing, fascinating stories of inventions, ideas and innovations. Yes, this is the podcast about the things that have helped to shape our lives. Podcasts from the BBC World Service are supported by advertising. SPEAKER_00: Ryan Reynolds here from Mint Mobile. With the price of just about everything going up during inflation, we thought we'd bring our prices down. So to help us, we brought in a reverse auctioneer, which is apparently a thing. SPEAKER_01: Mint Mobile Unlimited Premium Wireless. How did it get 30? How did it get 30? How did it get 30? How did it get 20? How did it get 20? How did it get 20? How did it get 15? 15? 15? Just 15 bucks a month? Sold! SPEAKER_00: Give it a try at mintmobile.com slash switch. SPEAKER_03: New activation and upfront payment for a three month plan required. Taxes and fees extra. Additional restrictions apply. See mintmobile.com for full terms. SPEAKER_04: 50 things that made the modern economy with Tim Harford. SPEAKER_01: Two graduate students stood silently next to a lectern listening as their professor presented their work to a conference. This wasn't the done thing. Usually the students themselves would get to bask in the glory and they'd wanted to just a couple of days previously but their families talked them out of it. It wasn't worth the risk. A few weeks earlier the Stanford researchers had received an unsettling letter from a shadowy agency of the United States government. If they publicly discussed their findings, the letter said, that would be deemed legally equivalent to exporting nuclear arms to a hostile foreign power. What was this information that US spooks considered so dangerous? Were the students proposing to read out the genetic code of smallpox or lift the lid on some shocking conspiracy involving the president? No. They were planning to give the humdrum sounding International Symposium on Information Theory an update on their work on public key cryptography. The year was 1977. If the government agency had been successful in their attempts to silence academic cryptographers, they might have prevented the internet as we know it. To be fair, that wasn't what they had in mind. The World Wide Web was years away and the agency's head, Admiral Bobby Ray Inman, was genuinely puzzled about the academics' motives. In his experience, cryptography, the study of sending secret messages, was of practical use only for spies and criminals. Three decades earlier, other brilliant academics had helped win the war by breaking the Enigma Code, enabling the Allies to read secret German communications. Now, Stanford researchers were freely disseminating information that might help adversaries in future wars to encode their messages in ways the US couldn't crack. To Admiral Inman, it seemed perverse. His concern was reasonable. Throughout history, the development of cryptography has indeed been driven by conflict. Two thousand years ago, Julius Caesar sent encrypted messages to far-flung outposts of the Roman Empire. He'd arrange in advance that recipients should simply shift the alphabet by some predetermined number. So, for example, Jaubev Csubjol, if you substitute all the letters with the one before them, would read, invade Britain. That kind of thing wouldn't have taken the Enigma code breakers long to crack and encryption is typically now numerical. First, convert the letters into numbers, then perform some complicated mathematics on them. Still, the message recipient needs to know how to unscramble the numbers by performing the same mathematics in reverse. That's known as symmetrical encryption. Just like securing a message with a padlock, having first given the recipient a key. The Stanford researchers were interested in whether encryption could be asymmetrical. Might there be a way to send an encrypted message to someone you'd never met before, someone you didn't even know, and be confident that they and only they would be able to decode it? It sounds impossible. And before 1976, most experts would have said it was. Then came the publication of a breakthrough paper by Whitfield Diffie and Martin Hellman. That same year, three researchers at MIT, Ron Rivest, Adi Shamir and Leonard Edelman, turned the Diffie-Hellman theory into a practical technique. It's called RSA encryption, after their surnames. What these academics realised was that some mathematics are a lot easier to perform in one direction than another. Take a very large prime number, that's one that's divisible only by itself and one. Then take another, multiply them together. That's simple enough and it gives you a very, very large semi-prime number. That's a number that's divisible only by two prime numbers. Now, challenge someone else to take that semi-prime number and figure out which two prime numbers were multiplied together to produce it. That, it turns out, is exceptionally hard. Public key cryptography works by exploiting this difference. In effect, an individual publishes his semi-prime number, his public key, for anyone to see. And the RSA algorithm allows others to encrypt messages with that number in such a way that they can be decrypted only by someone who knows the two prime numbers that produced it. It's as if you could distribute open padlocks for the use of anyone who wants to send you a message, padlocks that only you can then unlock. They don't need to have your private key to protect the message and send it to you, they just need to snap shut one of your padlocks around it. Now, in theory, it's possible for someone else to pick your padlock by figuring out the right combination of prime numbers. But it takes unfeasible amounts of computing power. No wonder Admiral Inman fretted about this knowledge reaching America's enemies. But Professor Hellman had understood something that the spy chief had not. The world was changing. Electronic communication would become more important. And many private sector transactions would be impossible if there were no way for citizens to communicate securely. Professor Hellman was right. And you demonstrated every time you send a confidential work email, or buy something online, or use a banking app or visit any website starts with HTTPS. Without public key cryptography, anyone at all would be able to read your messages, see your passwords, and copy your credit card details. Public key cryptography also enables websites to prove their authenticity. Without it, there'd be many more phishing scams. The internet would be a very different place and far less economically useful. To his credit, the spy chief soon came to appreciate that the professor had a point. He didn't follow through on the threat to prosecute. Indeed, the two developed an unlikely friendship. But then, Admiral Inman was right too. Public key cryptography really does complicate his job. Encryption is just as useful to drug dealers, child pornographers, and terrorists as it is to you and me when we pay for some printer ink on eBay. Perhaps the ideal situation, at least from a government perspective, would be if encryption couldn't be easily cracked by ordinary folk or criminals. That would secure the internet's economic advantages. Yet, the government would still be able to see everything that was going on. The agency Admiral Inman headed was called the National Security Agency, or NSA. In 2013, Edward Snowden released secret documents showing exactly how the NSA was pursuing just that goal. The debate that Snowden started rumbles on. If we can't restrict encryption only to the good guys, what power should the state have to snoop, and with what safeguards? Meanwhile, another technology threatens to make public key cryptography altogether useless. That technology is quantum computing. By exploiting the strange ways in which matter behaves at a quantum level, quantum computers could potentially perform some kinds of calculation, orders of magnitude more quickly than regular computers. And one of those calculations? It's taking a large semi-prime number and figuring out which two prime numbers you'd have to multiply to get it. If that becomes easy, the internet becomes an open book. Quantum computing is still in its early days. But 40 years after Diffie and Hellman laid the groundwork for internet security, academic cryptographers are now racing to maintain it. SPEAKER_04: An excellent resource on cryptography is Keeping Secrets by Henry Corrigan Gibbs in the November-December 2014 edition of Stanford Magazine. For a full list of our sources, please see BBCWorldService.com slash 50things. SPEAKER_01: Here's another podcast from the BBC World Service that you might like. It's a personal favourite of mine. More or less, Behind the Stats. This is your weekly guide to the numbers all around us in the news and in life. And you know, sometimes I even present it. Check it out.