No. 02
The Secret That Secured the Internet
A British engineer proved the mathematics behind every padlock in your browser in 1970. He signed the Official Secrets Act and watched…
![[ALT NEEDED] Hero image for "The Secret That Secured the Internet"](https://c7dz99c1hbxgrsku.public.blob.vercel-storage.com/media/medium-1-n8hXzFZIJRf2MGQEWuNP-g-png-1-1600x900-dni6Xht9xrAoyvaz8KU0Zv0IWtD38B.webp)
Act I: The Paper That Could Not Be Sent
Sometime in late 1969, James Ellis was sitting at his desk in Cheltenham, England, working through a pile of old technical papers when he found one that stopped him cold.
It had been written during the Second World War by an unnamed researcher at Bell Telephone Laboratories in New York.
The paper described an experiment in protecting voice communications: a receiver could inject random noise onto a telephone line, an eavesdropper would hear only static, and the receiver, knowing what noise it had added, could subtract it out and recover the voice. The caller did not need to know anything about the noise. Only the receiver held the key. Only the receiver did the work.
Ellis read this and saw something the Bell Labs researcher had not.
Apply the same principle to written messages. If a receiver could broadcast a mathematical lock, a one-way function that anyone could use to scramble a message, only the receiver would hold the key to unscramble it. Two strangers could communicate in private without ever having met. No courier. No codebook. No pre-arranged secret.
He wrote this up in a classified internal report in 1970: The Possibility of Secure Non-Secret Digital Encryption.
Non-secret encryption: a lock the whole world could see, with a key only you could hold. Ellis had proved — rigorously, mathematically — that such a thing was possible.
He had no idea how to build it.
Ellis was 45 years old. He had grown up in Leyton, east London, the son of parents who had emigrated briefly to Australia before returning. Grammar school. A physics degree from Imperial College London. The Post Office Research Station at Dollis Hill, where he discovered he had a particular gift for cryptographic problems. GCHQ in 1952, and then seventeen years of work his wife Brenda never knew anything about.
Brenda was an artist and designer. They had married in 1949. For the entire length of their marriage, she had no idea what her husband did inside that building.
His official title was engineer. His real job was finding ways to keep British communications secure against Soviet interception. The central problem was the same one that had been central since the first coded message was ever sent: before you can share a secret, you must first share another secret to protect it.
Every secure communication rested on that assumption. It was expensive and slow and vulnerable at every point where a human being touched it.
He had been asked to find another way. He had spent months on it. He had produced nothing. Until the Bell Labs paper.
Act II: The Afternoon
For three years, the proof sat in a classified vault in Cheltenham. Ellis had shown the thing was possible. No one at GCHQ could figure out how to build it.
In September 1973, a 22-year-old Cambridge mathematics graduate named Clifford Cocks arrived for his first week at GCHQ.
Cocks had studied number theory at King’s College, Cambridge, then started a PhD at Oxford before deciding that academic life was not for him. He had been at GCHQ for approximately two weeks when his supervisor, Nick Patterson, mentioned James Ellis’s problem in what amounted to a lunchtime conversation.
Patterson described it as a really cool problem that nobody had made any progress on. Ellis had proved for three years that the thing must be possible. No one could figure out how.
Cocks went home that evening and turned the problem over in his mind. The question Patterson had described was mathematical in structure: what was needed was a function easy to compute in one direction, practically impossible to reverse.
He later said Patterson had explained it “in a very mathematical way” and that his own background in number theory was what made the connection visible. The answer, he realised, was sitting in prime numbers.
He came back the next day with RSA: the encryption algorithm that now protects every password entry, every online purchase, every private message sent over the internet.
Multiplying two large prime numbers together is easy. Reversing it — working backwards from the product to find the original primes — requires computational effort that grows exponentially with the size of the numbers. Trivial to lock. Practically impossible to break without the key. It was exactly the one-way function Ellis had been searching for three years.
Cocks described the discovery later with characteristic understatement: he had been “in the right place at the right time, and having the problem explained to me in the right way.” He noted that his freshness at GCHQ was an advantage: he had not yet absorbed the assumption that the problem was intractable. He wrote up his method and put it in a report to his superiors.
GCHQ were immediately impressed. They shared it with their American counterparts at the NSA. And then, because any new technique developed within GCHQ was by definition classified information, they locked it in a vault.
A year later, Malcolm Williamson was told about the work. Another Cambridge mathematician, Cocks’s friend from Manchester Grammar School, he had joined GCHQ in 1972 and in 1974 set out to find a flaw in Cocks’s approach. Instead, he independently derived what would later be called Diffie-Hellman key exchange. This too was classified the moment he wrote it up.
By 1975, GCHQ held in secret every fundamental mathematical building block of modern public-key cryptography. It called the whole thing “non-secret encryption.” And it had no idea what to do with it.
British military communications ran between parties who already knew each other. Pre-established relationships, pre-distributed keys, command hierarchies. Sending a secret to a stranger was not a problem that troubled a Cold War signals agency. It was the problem of commerce, of individuals, of a connected world that did not exist yet.
No one at GCHQ could think of a use for it.
Act III: California, November 1976
On November 1, 1976, Whitfield Diffie and Martin Hellman published a paper in the IEEE Transactions on Information Theory. Its title was New Directions in Cryptography.
Diffie was 32, a counterculture mathematician from California with hair down to his shoulders and a deep suspicion of centralised power. He had spent years driving across the United States, visiting cryptographers, trying to solve the same problem Ellis had solved six years earlier.
Hellman was a professor of electrical engineering at Stanford. Ralph Merkle, a doctoral student who had arrived at the same idea independently and found no academic journal willing to publish it, had joined them.
Their paper opened: “We stand today on the brink of a revolution in cryptography.”
It described public-key cryptography: the same principle Ellis had proved, the same mechanism Cocks had implemented. It published all of it for the world. Within two years, three MIT mathematicians, Ron Rivest, Adi Shamir, and Leonard Adleman, had formalised the prime-number implementation and named it RSA, after their initials. It was 1978. Clifford Cocks had built the same thing in an afternoon in 1973.
Ellis had been following the work. When Diffie and Hellman presented their findings at a conference in June 1976, he wrote a classified internal memo the following month confirming that the public disclosure matched exactly what GCHQ had developed in secret.
The same mathematics. The same principle. Out in the world now, credited to people who had no idea anyone had been there before them.
Cocks, Ellis, and Williamson approached their superiors and proposed that GCHQ announce it had previously developed both methods.
GCHQ decided not to.
They could not publish independently. They could not tell colleagues in the academic community. They could not even tell their families. The Official Secrets Act covered everything. It covered this.
Diffie and Hellman were celebrated. RSA was patented by MIT and licensed commercially. Public-key cryptography became the foundation of internet security, embedded in every browser and banking system in the world. It was 1978. It was 1980. It was 1985. Every year the gap between what had happened in secret and what the world believed had happened grew wider.
In 1982, Diffie, who had heard a rumour, probably via the NSA, that the British had been there first, travelled to meet Ellis. The two men talked about a range of subjects until, at the end, Diffie asked Ellis directly: “Tell me how you invented public-key cryptography.”
Ellis paused for a long time. He then said: “Well, I don’t know how much I should say.”
Act IV: Blighter Peter Wright
By 1987, GCHQ had quietly decided the time had come to set the record straight. They commissioned James Ellis, now retired, to write a first-hand account of the discovery. Ellis wrote it. Clear, precise, careful: the Bell Labs paper, the 1970 proof, Cocks’s solution, Williamson’s key exchange, the classified years, the academic rediscovery.
Then Peter Wright published Spycatcher.
Wright was a retired MI5 officer who had nothing to do with GCHQ, nothing to do with cryptography, and nothing to do with Ellis or Cocks or the sixteen years of classified mathematics sitting in a vault in Cheltenham. His memoir described the internal workings of the British security services: operations, methods, personnel.
The government went to extraordinary lengths to suppress it, applying for injunctions in the United Kingdom and Australia. Years of legal battles ended in defeat. An Australian court ruled against the government in 1988. UK publication followed.
For GCHQ, the timing was catastrophic for reasons that had nothing to do with Wright’s contents. GCHQ’s planned disclosure, a benign and historically overdue acknowledgement of a mathematical achievement, had to be released by the same government that had just lost a very public fight to keep secrets.
Releasing another classified document, however different its nature, would look like capitulation. It would invite scrutiny GCHQ did not want. The plan was shelved.
Ellis’s written account went back into the vault. His papers stayed classified for another decade.
Cocks, in an interview years later, put the cause on record with quiet precision: “We had the intention of publishing a paper, but that idea was scuppered by that blighter Peter Wright, who wrote Spycatcher.”
Twenty-Three Days
In 1997, twenty-seven years after the proof and twenty-one years after Diffie and Hellman had published the same mathematics to global recognition, GCHQ finally moved to declassify.
James Ellis was 73 years old and in poor health. The internet, the thing his mathematics now protected in every browser and bank and transaction between strangers, had come into being without his name attached to any of it. For the first time, GCHQ gave him permission to write his own account of how it had happened. He did. It would go online when the announcement was made.
Announcement scheduled: December 1997. James Ellis died on November 25, 1997.
Clifford Cocks delivered the public lecture on December 18. He described what Ellis had proved, what he himself had built in an afternoon, and what the world had been using, without knowing it, for two decades. Diffie, reached for comment, confirmed he had long suspected GCHQ had been there first. He accepted the parallel invention.
Ellis had waited twenty-seven years to tell this story. He ran out of time by twenty-three days.
His account, published posthumously alongside the declassified technical papers, closed with one sentence.
“The question of who invented what and when does not need an answer,” he wrote. “What matters is that it works.”
He never got to say it in a room, to a person, with his name on it. He wrote it down in the months before he died. It went online three weeks after his death.
Every time you type a password into a browser and see the padlock icon, the mathematics underneath it was written down in Cheltenham in 1970 by an engineer named James Ellis who could not tell his wife, and built in a single evening in 1973 by a 22-year-old who had been there two weeks.
James Ellis knew it. He could not say so. He died before he could.
What Gets Buried?
What this story is about is not encryption.
We tell the history of technology as a story of credit: Diffie and Hellman, RSA, the named and celebrated. We teach it in those terms. We cite it in those terms. A padlock icon in a browser is a small daily reminder of work done by people whose names appear in the textbooks.
But those textbooks are incomplete, because a significant portion of the most consequential technical work in history was done by people who were not permitted to exist in the public record. All three men signed the Official Secrets Act and kept it for twenty-four years. Work went forward, the world was changed, and the people who built the foundation watched from silence while others received the credit.
The question worth sitting with is not who deserves credit. Ellis himself answered that in his closing sentence: "The question of who invented what and when does not need an answer." What matters is that it works.
A harder question is this: how much of what we think we know about who built the modern world is the public record, and how much of the public record is simply what was allowed to be said?
Classified labs are operating right now. Researchers are working on problems the rest of us do not know exist. Some of that work will surface in twenty years under a declassification order, and we will discover that technology we credited to a Stanford professor or a Silicon Valley startup was sitting in a government vault a decade earlier, written by someone whose name was not allowed to appear anywhere.
Ellis’s story is not unusual. It is the visible edge of a much larger pattern.
That padlock did not arrive from nowhere. Someone proved it was possible, in a building in Cheltenham, in a year when no one outside that building was allowed to know his name.
The Long Thread publication i started , traces the deep patterns in technology history: the ideas that took decades to mature, the wrong turns that weren’t entirely wrong, the people who were right before the world was ready. This is the first piece in the series.
Do follow “The Long Thread” for more…
Here is the first one we covered earlier:
Sources
Papers
- Dobb’s Journal, April 1998: https://www.schneier.com/essays/archives/1998/04/the_secret_story_of.html
- 22, №6, November 1976, pp. 644–654: https://ee.stanford.edu/~hellman/publications/24.pdf
- Patrick Bomgardner, “Whitfield Diffie: Cryptologic Iconoclast,” Center for Cryptologic History, NSA (declassified 2023): https://media.defense.gov/2023/Sep/08/2003296489/-1/-1/0/WHITFIELD%20DIFFIE_CRYPTOLOGIC%20ICONOCLAST.PDF
- ACM Turing Award citation for Whitfield Diffie and Martin Hellman, 2015: https://amturing.acm.org/award_recipient/hellman_4055781
Official records
Web
- : https://chalkdustmagazine.com/interviews/clifford-cocks/
- Rivest, A. Shamir, and L. Adleman, “A Method for Obtaining Digital Signatures and Public-Key Cryptosystems,” Communications of the ACM, Vol. 21, №2, February 1978, pp. 120–126
- IEEE Milestones, “Invention of Public-key Cryptography, 1969–1975”: https://ethw.org/Milestones:Invention_of_Public-key_Cryptography,_1969_-_1975
- Duncan Campbell, “Going to War over Prime Numbers,” Times Higher Education, 1998: https://empslocal.ex.ac.uk/people/staff/mrwatkin/isoc/primewar.htm
- Ian Stewart, “Behind the Invention of the Cryptosystem That Revolutionized Tech,” Literary Hub, 2019: https://lithub.com/behind-the-invention-of-the-cryptosystem-that-revolutionized-tech
- Ellis (sourced to primary GCHQ records): https://en.wikipedia.org/wiki/James_H._Ellis
- Wikipedia entry on Clifford Cocks (sourced to Royal Society certificate, GCHQ records): https://en.wikipedia.org/wiki/Clifford_Cocks
- Simon Singh, The Code Book: The Secret History of Codes and Code-breaking, Fourth Estate, 1999, Chapter 6
- Peter Wright, Spycatcher, Viking Penguin, 1987 (context on 1987 disclosure delay)