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.

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)