Public-key cryptography was invented twice. James Ellis, Clifford Cocks and Malcolm Williamson worked it out in secret at Britain’s GCHQ between 1970 and 1974. Then Ralph Merkle, Whitfield Diffie, Martin Hellman, and Ron Rivest, Adi Shamir and Leonard Adleman arrived at it independently and in public between 1974 and 1978. So the answer to “who invented public key cryptography” depends on whether you mean who found it first or who gave it to the world.
The public inventors received the patents, the papers and the Turing Awards. The British work stayed classified until 1997. This article sets out who did what and when, why the credit ended up split, and why the history matters now that quantum computers threaten both RSA and Diffie–Hellman.
Who invented public key cryptography? The short answer
For most of history, two parties could only communicate securely if they already shared a secret key. Even the provably unbreakable one-time pad depends on that. Public-key cryptography removed the requirement. Anyone can encrypt with a key that is published openly, and only the holder of a matching private key can decrypt.
The idea showed up in two separate places, and neither group knew about the other:
| Date | Who | What | Public? |
|---|---|---|---|
| January 1970 | James Ellis (GCHQ/CESG) | Proves “non-secret encryption” is possible in principle | No, classified “Secret” |
| 20 November 1973 | Clifford Cocks (GCHQ) | Internal note describing a system similar to RSA | No |
| January 1974 | Malcolm Williamson (GCHQ) | Internal note anticipating Diffie–Hellman | No |
| Fall 1974 | Ralph Merkle (Berkeley) | Course project proposal for public key distribution | Rejected, published 1978 |
| November 1976 | Diffie and Hellman (Stanford) | “New Directions in Cryptography” | Yes |
| April–August 1977 | Rivest, Shamir, Adleman (MIT) | The RSA algorithm, first described publicly by Martin Gardner | Yes |
| December 1997 | GCHQ | Begins releasing the secret papers | Yes |
GCHQ’s secret version: Ellis, Cocks and Williamson (1970–74)
James Ellis and “non-secret encryption” (1970)
James H. Ellis worked in GCHQ’s Communications-Electronics Security Group (CESG). He wrote CESG Research Report No. 3006, “The Possibility of Secure Non-Secret Digital Encryption,” dated January 1970 and classified “Secret.” According to the National Security Archive’s record of the Ellis report, it “developed the concept of public key cryptography” several years before US academics did.
Ellis called the idea “Non Secret Encryption.” Duncan Campbell, writing in the Times Higher Education Supplement, reports that after retiring in 1987 Ellis wrote a classified review of the work. In it he said the idea came to him “in bed one night” and that “the proof of the theoretical possibility took only a few minutes.”
Bruce Schneier recounts that Ellis credited an unknown researcher at Bell Telephone Labs during World War II. That researcher’s idea was that a receiver could add noise to a line and later subtract it to recover the signal. Ellis’s proof showed that a scheme like this could exist. It did not give a practical way to build one.
Clifford Cocks invents RSA in 1973
The practical construction came from Clifford Cocks. Campbell notes that Cocks held a first-class mathematics degree from King’s College Cambridge. He joined CESG in September 1973 after leaving Oxford. A colleague, Nick Patterson, told him about Ellis’s idea, and soon afterwards Cocks came up with what we now call RSA.
His internal note, “A Note on Non-Secret Encryption,” is dated 20 November 1973. It describes a system similar to RSA. Inside GCHQ it was treated as mostly a curiosity, and the public knew nothing of it until it was declassified in 1997. That puts it roughly three and a half years ahead of the MIT trio.
Malcolm Williamson and the hidden Diffie–Hellman (1974)
Malcolm J. Williamson (1950–2015) wrote an internal GCHQ note, “Non-Secret Encryption Using a Finite Field,” in January 1974. The Wikipedia article on Diffie–Hellman dates it 21 January 1974 and lists a follow-up, “Thoughts on Cheaper Non-Secret Encryption,” dated 10 August 1976. Schneier calls the 1974 algorithm “remarkably similar to Diffie-Hellman.”
Williamson was not confident in his own result. Campbell reports that Williamson wrote “I find myself in an embarrassing position,” said he had “no proof that the method is genuinely secure,” and said he needed help from “someone who knows more number theory than myself.”
The public inventors: Ralph Merkle, Diffie and Hellman (1974–76)
Ralph Merkle’s puzzles: the rejected student project
In fall 1974, Berkeley undergraduate Ralph Merkle proposed what became public-key cryptography as his project for CS244, a computer security course taught by Lance Hoffman. Merkle’s own account says Hoffman rejected the proposal and showed little interest in a shorter two-page rewrite, so Merkle dropped the course. Another Berkeley professor, Bob Fabry, told him: “Publish it, win fame and fortune!”
Publishing proved hard. In August 1975 Merkle sent the paper to Communications of the ACM, where editor Susan Graham rejected it. A reviewer described as an “experienced cryptography expert” had judged it “not in the main stream of present cryptography thinking.” A revised version is dated 7 December 1975. CACM finally published it in 1978 as “Secure Communications Over Insecure Channels,” almost three years after he first submitted it.
“New Directions in Cryptography” (1976)
Whitfield Diffie and Martin E. Hellman published “New Directions in Cryptography” as an invited paper in IEEE Transactions on Information Theory, Vol. IT-22, no. 6, November 1976, pp. 644–654. The paper introduced public-key cryptography and digital signatures to the open literature, along with the key exchange method that carries their names.
The Stanford Daily reports that the NSA tried to limit distribution of their papers, part of a conflict that became known as the “crypto wars.” US Patent 4,200,770 (1977) describes the Diffie–Hellman algorithm and names Hellman, Diffie and Merkle as inventors. The patent has since expired.
Clifford Cocks vs RSA: the MIT algorithm and its patent (1977–78)
“New Directions” set out what public-key encryption should do but did not include a full encryption scheme. Rivest, Shamir and Adleman at MIT supplied one. In April 1977, after a Passover evening at a student’s house, Rivest stayed up formalising the idea and had much of the paper ready by morning, according to the history of the RSA cryptosystem.
The algorithm reached the public in steps:
- August 1977: Martin Gardner described it in his Scientific American “Mathematical Games” column (Vol. 237, no. 2), under the title “A new kind of cipher that would take millions of years to break.”
- Technical memo: MIT-LCS-TM-082.
- February 1978: “A Method for Obtaining Digital Signatures and Public-Key Cryptosystems,” Communications of the ACM, Vol. 21, no. 2, pp. 120–126.
The patent application was filed in December 1977. US Patent 4,405,829 was granted to MIT on 20 September 1983 and was due to expire on 21 September 2000. RSA Security released the algorithm into the public domain on 6 September 2000, a few weeks early. Because the algorithm had been published in 1977, before the filing, the patent had no legal standing outside the US.
Rivest, Shamir and Adleman received the 2002 ACM Turing Award, worth $100,000, which was presented in San Diego on 7 June 2003. MIT News called RSA the world’s most widely used encryption method. Diffie and Hellman received the 2015 Turing Award, announced on 1 March 2016, with a $1 million prize funded by Google. Dan Boneh said of them: “The field of cryptography would be a pale image of what it is today without the work of Diffie and Hellman.”
GCHQ public key cryptography declassified in 1997: who deserves the credit?
The British story stayed secret for more than two decades. Campbell reports that in December 1997 GCHQ put the first of six papers online. The papers were written between 1970 and 1987 and were published as HTML conversions. CESG declined to release the original documents, and Judith Field of the British Society for the History of Mathematics called that “thoroughly unsatisfactory.” On 18 December 1997 Cocks gave a public talk on the history of GCHQ’s public-key research.
Ellis did not see any of this. He died on 25 November 1997, about a month before the announcement.
Recognition followed for those still alive. Cocks became a Companion of the Order of the Bath in 2008. The IEEE recognised him together with Ellis and Williamson in 2010. He was elected a Fellow of the Royal Society in 2015 and entered the Cryptologic Hall of Honor in 2021. In 2001 he also created one of the first secure identity-based encryption schemes.
Discovery vs significance
Nobody seriously disputes the priority claim. Campbell reports that Diffie himself accepted GCHQ’s claim to parallel invention as likely correct in substance. The open question is what the credit should be for.
Schneier draws the distinction sharply: “while they may have discovered the mathematics, it is clear that they never understood its significance.” He argues that GCHQ never saw the idea as a solution to key management, and that digital signatures did not occur to them. He also points out that the NSA’s STU-III secure phone, which used public-key cryptography, was not built until the 1980s.
A fair summary is that both groups made the discovery. GCHQ was first, but secrecy kept its work from shaping anything outside the agency. The academic work was later, but it was published, patented, debated, and turned into the base layer of internet security. Awards generally recognise influence on the field, and only the public work had any.
Why it matters now: Shor’s algorithm breaks both RSA and Diffie–Hellman
The two inventions share a weakness. RSA depends on factoring large numbers being hard. Diffie–Hellman depends on the discrete logarithm problem being hard. On 30 August 1995, Peter W. Shor of AT&T Research posted “Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer” to arXiv. The journal version appeared in SIAM J. Sci. Statist. Comput. 26 (1997) 1484. The abstract notes that both problems “have been used as the basis of several proposed cryptosystems.”
That means a sufficiently large quantum computer running Shor’s algorithm would break both lines of descent: the Cocks/RSA family and the Williamson/Diffie–Hellman family. Whoever gets the credit for inventing them, the systems built on that work now have to be replaced. Hash-based constructions are affected differently by quantum attacks, as our explainer on what Grover’s algorithm does to SHA-256 covers. For where blockchains, browsers and standards stand on migration, see the Post-Quantum Migration Tracker.
The same concern drives Hadamard’s own work. BB84 is a hash-based Layer 2 rollup on Ethereum that removes ECDSA from every L2 transaction (the batcher and proposer keys still use ECDSA, which the project lists as a known limitation). Every L2 action is authenticated by revealing a hash-chain preimage instead of by an ECDSA signature.
FAQ
Did GCHQ really invent RSA before Rivest, Shamir and Adleman?
Yes. Clifford Cocks’s internal note describing a system similar to RSA is dated 20 November 1973. RSA was devised in April 1977. Cocks’s work was classified and stayed unknown to the public until 1997, so it had no influence on the MIT team.
Why did Diffie and Hellman get the Turing Award if the British discovered it first?
Their 1976 paper was published, and it introduced public-key cryptography and digital signatures to the open research community. GCHQ’s work stayed secret and, according to Schneier, its significance for key management and signatures was not recognised there.
What was Ralph Merkle’s role, and why is he often left out?
Merkle proposed a public key distribution scheme as a Berkeley student in fall 1974. The proposal was rejected by his instructor, and his paper was rejected by CACM in 1975. It only appeared in 1978, after “New Directions,” which is a large part of why he is often overlooked. He is a named inventor on US Patent 4,200,770 alongside Diffie and Hellman.
Are RSA and Diffie–Hellman still safe, given Shor’s algorithm?
Against classical computers, yes. Shor’s 1995 algorithm solves both factoring and discrete logarithms in polynomial time on a quantum computer, so a sufficiently large quantum machine would break both. That is why migration to post-quantum cryptography is underway.
Sources
- James Ellis, “The Possibility of Secure Non-Secret Digital Encryption” (CESG Report No. 3006), National Security Archive, document dated January 1970
- Duncan Campbell, “Going to war over prime numbers”, Times Higher Education Supplement, 22 April 1999
- Bruce Schneier, “The Secret Story of Nonsecret Encryption”, Dr. Dobb’s Journal, April 1998
- Clifford Cocks, Wikipedia
- Malcolm J. Williamson, Wikipedia
- RSA cryptosystem, Wikipedia
- Diffie–Hellman key exchange, Wikipedia
- Ralph Merkle, history of his 1974 CS244 project and CACM paper, ralphmerkle.com
- Martin Hellman, publications list, Stanford University
- “Whitfield Diffie and Martin Hellman win ACM 2015 A.M. Turing Award”, Stanford Daily, 2 March 2016
- Rivest, Shamir and Adleman receive 2002 Turing Award, MIT News, 30 April 2003
- Peter W. Shor, “Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer”, arXiv, 30 August 1995
