In September of 1974, when he was 30 years old, Whitfield Diffie was obsessed with cryptography. So obsessed that he was criss-crossing the country trying to talk to anyone who could help him expand his ideas. He'd moved to California a few years before to work at a Stanford artificial intelligence lab, and, in the end, it was at Stanford where he found Martin Hellman. Hellman would later describe that meeting to the journalist Stephen Levy as "an immediate meeting of the minds." Within two years the two men would speed towards "the brink of a revolution in cryptography." And in 1976 they published the paper describing public key cryptography—a system used in everything from Blackberries to financial transactions.
The idea of public-key cryptography is surprisingly simple. For centuries, codes depended on private keys—the secret to translating information into code and back out again, into a readable form—that had to be agreed on before information was sent from one person to another. The problem was that, somehow, both parties needed to get ahold of the key. Often that meant having a courier shuttle it around. The system that Diffie and Hellman described solved that problem by splitting the key in two, a public key and a private key.
A public key system depends on relatively simple mathematical operations that are easy to perform and easy to reverse with the key information but extremely time consuming and difficult to reverse engineer without it. (For example, RSA, a more complete public key system conceived by a team of researchers at MITshortly after Diffie and Hellman presented their idea, involved the two prime factors of a 125 or 126 digit number: It's almost impossible to derive the two factors from the resulting number.) Because it's so difficult to reverse engineer these operations, the key that encodes the material can be shared on insecure channels. Using the public key, anyone can encode information and send it on, but only the holder of the private half of the key could decrypt it.
Since 1976, this idea has become the basis for the systems that makes it possible for the internet to operate with some measure of security at all. It's built into, for instance, the internet protocols SSL/TSL. If you've ever made a financial transaction of any sort over the internet or used a Blackberry you've depended, at least in part, on public key cryptography. It's also built into the encryption systems, like PGP, that internet users depend on for sending secure messages online.
"The thing I remember distinctly is that I was sitting in the living room when I thought of it the first time and then I went downstairs to get a Coke and I almost lost it," he says. "I mean, there was this moment when - I was thinking about something. What was it? And then I got it back and didn't forget it."
If he had forgotten it though, the problem of public key cryptography wouldn't still be puzzling us. Diffie and Hellman weren't the only ones working on this problem; another team of researchers would almost certainly have come upon the same solution soon enough. And, although Diffie and Hellman were the first to tell the world how public key cryptography could work, they weren't actually the first to figure it out. It later came out that a British intelligence agency had put together all the main elements of public key cryptography by 1975—the agency just didn't reveal that its researchers had been there first until 1997.