The History of Cryptography

Fractional CTO · Founder of Injuria.ai
The History of Cryptography
Cryptography is the mathematical and engineering discipline of securing information against adversarial access or modification. For most of human history, cryptography functioned as a linguistic and mechanical art, relying on secret alphabets, physical devices, and manual transposition to obscure the meaning of military and diplomatic messages. The primary constraint on early cryptographic systems was human error and the physical limitations of manual encryption, which restricted the complexity of the algorithms that could be practically deployed in the field.
The mid-twentieth century marked a transition from linguistic obfuscation to computational mathematics. The invention of electromechanical rotor machines industrialized encryption, increasing the key space of ciphers to a scale that required early computing machines to break. This arms race between encryption and cryptanalysis drove the development of the first programmable electronic computers. Following World War II, the discipline was formalized through information theory, establishing rigorous mathematical definitions for secrecy and shifting the focus toward algorithms designed for execution by digital processors.
In the modern era, cryptography underpins the security of global digital infrastructure. The commercialization of the internet necessitated the development of public-key infrastructure, allowing parties who had never met to establish secure communication channels. This transition required overcoming severe export controls imposed by governments that viewed strong encryption as a military munition. Today, cryptographic protocols authenticate financial transactions, secure web traffic, and protect communications against mass surveillance, while the field prepares for the next major transition to algorithms resistant to quantum computing.
Classical Cryptography: Antiquity to the Renaissance
Early Substitution and Transposition
The earliest recorded uses of cryptography relied on transposition, rearranging the letters of a message without altering the letters themselves. Around 400 BCE, Spartan military commanders utilized the Scytale[1], a physical cylinder around which a strip of parchment was wound. A message written across the adjacent coils became unintelligible when unwound, requiring a cylinder of the exact same diameter to decrypt. This system provided confidentiality but was highly vulnerable to systematic guessing.
Substitution ciphers, which replace letters with other letters or symbols, emerged as a more flexible alternative. The most famous early example is the Caesar cipher[2], utilized by Julius Caesar to communicate with his generals. This monoalphabetic substitution cipher shifted each letter of the alphabet by a fixed number of positions (typically three). While effective against an illiterate populace, monoalphabetic substitution preserves the underlying frequency distribution of the plaintext language.
The vulnerability of monoalphabetic ciphers was formally documented in the 9th century by the Arab mathematician Al-Kindi. In his manuscript, A Manuscript on Deciphering Cryptographic Messages, Al-Kindi detailed the technique of frequency analysis[3]. By counting the frequency of letters in a ciphertext and comparing them to the known frequency of letters in the Arabic language, cryptanalysts could systematically deduce the substitution alphabet. Al-Kindi's work transformed cryptanalysis from a process of intuition into a rigorous statistical science, rendering simple substitution ciphers obsolete for high-security applications.
Polyalphabetic Ciphers
To defeat frequency analysis, cryptographers developed polyalphabetic substitution, which uses multiple substitution alphabets to flatten the frequency distribution of the ciphertext. The concept was first described by Leon Battista Alberti around 1467 using a mechanical cipher disk. This was later refined by Giovan Battista Bellaso and mistakenly attributed to Blaise de Vigenère, becoming known as the Vigenère cipher[4].[37]
The Vigenère cipher uses a keyword to select a different substitution alphabet for each letter of the plaintext, typically referencing a tabula recta (a grid of shifted alphabets). Because the same plaintext letter is encrypted differently depending on its position relative to the keyword, standard frequency analysis fails. The Vigenère cipher was considered unbreakable (le chiffre indéchiffrable) for three centuries.
The system was finally broken in the 19th century by Charles Babbage and independently published by Friedrich Kasiski in 1863. The Kasiski examination[5] exploited the fact that repeated words in the plaintext, when aligned with repeated segments of the keyword, produce repeated sequences in the ciphertext. By measuring the distances between these repeated ciphertext sequences and finding their greatest common divisor, a cryptanalyst could determine the length of the keyword. Once the keyword length was known, the ciphertext could be divided into interleaved monoalphabetic ciphers, each vulnerable to standard frequency analysis.
The Mechanical Era and World Wars
Rotor Machines and the Enigma
The invention of the telegraph and radio in the late 19th and early 20th centuries created a crisis for secure communication. Radio signals could be intercepted by anyone with an antenna, necessitating encryption that was both highly secure and fast enough to keep up with teleprinter speeds. This led to the development of electromechanical rotor machines. In 1918, German engineer Arthur Scherbius patented the Enigma machine[6], which used a series of wired rotors to perform complex polyalphabetic substitution.[37]
When an operator pressed a key on the Enigma, an electrical current passed through a plugboard (Steckerbrett), through three or four rotating disks (rotors), hit a reflector, and traveled back through the rotors to illuminate a ciphertext letter on a lampboard. Because the rotors advanced with each keystroke, the electrical pathway changed continuously. The addition of the plugboard, which swapped pairs of letters before they entered the rotors, increased the number of possible initial configurations to approximately 158 quintillion.
The German military adopted the Enigma, believing its massive key space made it mathematically secure. However, the Polish Cipher Bureau, led by mathematician Marian Rejewski[7], recognized that the machine's wiring created specific permutation groups. Rejewski deduced the wiring in 1932, but the mechanical devices (properly called bomby in Polish, not Bómbas) were not designed and built until 1938 to simulate the machine's operation and find the daily keys.
When the German military increased the complexity of the Enigma procedures in 1939, the Polish intelligence service shared their mathematical techniques with the British. At Bletchley Park[8], Alan Turing and Gordon Welchman expanded on the Polish work to design the British Bombe[9]. The Bombe did not attempt to calculate the key directly; instead, it used known plaintext attacks (cribs) to eliminate incorrect rotor settings through logical contradiction. If a proposed setting resulted in a letter being encrypted as itself (a mechanical impossibility in the Enigma due to the reflector), the Bombe discarded that setting and moved to the next.
Lorenz and Colossus
While the Enigma was used for tactical field communications, the German High Command used the Lorenz SZ40/42 teleprinter cipher attachment for strategic communications. The Lorenz cipher[10] was a stream cipher that used 12 pinwheels to generate a pseudorandom sequence of characters, which were then combined with the plaintext using the XOR (exclusive OR) boolean operation.
Breaking the Lorenz cipher required processing massive amounts of intercepted paper tape. To automate this, British Post Office engineer Tommy Flowers designed and built Colossus[11], the world's first programmable, electronic, digital computer. Operational by early 1944, Colossus used 1,500 to 2,400 vacuum tubes to perform boolean operations on the intercepted data at a rate of 5,000 characters per second. Colossus demonstrated that electronic computation could be applied to cryptanalysis, permanently altering the trajectory of cryptographic design.
Purple and Magic
In the Pacific theater, the Japanese Foreign Office utilized the Type B Cipher Machine, codenamed PURPLE[12] by the United States. Unlike the Enigma, which used rotating disks, PURPLE used telephone stepping switches to route electrical signals. The United States Army Signals Intelligence Service (SIS), led by William Friedman, successfully deduced the architecture of the PURPLE machine without ever seeing a physical unit. By analyzing intercepted traffic and identifying patterns in the stepping switch behavior, the SIS built functional analog machines to decrypt Japanese diplomatic traffic, an intelligence source codenamed MAGIC.
The Information Age and Symmetric Standardization
Shannon and Information Theory
Following World War II, cryptography transitioned from an ad hoc engineering discipline into a rigorous mathematical science. This shift was catalyzed by Claude Shannon, a mathematician at Bell Labs. In 1949, Shannon published the paper "Communication Theory of Secrecy Systems"[13] in the Bell System Technical Journal. Shannon applied the principles of information theory to cryptography, formally defining the concept of "perfect secrecy."
Shannon proved mathematically that for a cipher to achieve perfect secrecy, the encryption key must be completely random, used only once, and be at least as long as the plaintext message. This system, known as the one-time pad[14], is theoretically unbreakable even with infinite computational power. However, the strict key management requirements make the one-time pad impractical for widespread commercial or military use. Shannon's work established that practical cryptographic systems must rely on computational security, meaning they are theoretically breakable but require an infeasible amount of computational resources to defeat.
The Data Encryption Standard (DES)
By the late 1960s, the proliferation of mainframe computers in the financial sector created a demand for standardized commercial encryption. IBM initiated a research program led by Horst Feistel, resulting in a block cipher named Lucifer. Lucifer utilized a structure now known as a Feistel network[15], which divides the data block into two halves and applies a series of substitution and permutation rounds.
In 1973, the US National Bureau of Standards (NBS, now NIST) solicited proposals for a national encryption standard. IBM submitted a modified version of Lucifer. The National Security Agency (NSA) evaluated the algorithm and requested specific modifications: the key size was reduced from 112 bits to 56 bits, and the substitution boxes (S-boxes) were altered. In 1977, the NBS published the algorithm as the Data Encryption Standard (DES)[16] under FIPS 46.
The NSA's involvement sparked intense controversy. Academic cryptographers, including Whitfield Diffie and Martin Hellman, argued that a 56-bit key was dangerously small and suspected the NSA had inserted a backdoor into the altered S-boxes. The truth regarding the S-boxes was revealed in 1990 when Eli Biham and Adi Shamir published the technique of differential cryptanalysis[17]. It was discovered that the NSA had known about differential cryptanalysis in the 1970s and had specifically optimized the DES S-boxes to resist it.
However, the criticism regarding the 56-bit key length proved accurate. As computing power increased according to Moore's Law, brute-forcing the $2^{56}$ possible keys became feasible. In 1998, the Electronic Frontier Foundation (EFF) built the EFF DES Cracker (Deep Crack) for $250,000. The machine successfully brute-forced a DES key in 56 hours, proving that DES was no longer secure for commercial applications and forcing the industry to transition to Triple DES (3DES), which applied the algorithm three times.
Advanced Encryption Standard (AES)
Recognizing the obsolescence of DES, NIST announced a public competition in 1997 to select a successor, the Advanced Encryption Standard (AES). The competition required a block cipher supporting a block size of 128 bits and key sizes of 128, 192, and 256 bits. Fifteen designs were submitted by cryptographers worldwide, which were narrowed down to five finalists: MARS, RC6, Rijndael, Serpent, and Twofish.
In October 2000, NIST selected Rijndael[18], designed by Belgian cryptographers Joan Daemen and Vincent Rijmen. Rijndael was chosen for its strong resistance to known cryptanalytic attacks, its mathematical simplicity, and its high performance across a wide range of hardware, from 8-bit smart cards to 32-bit processors. Unlike DES, Rijndael does not use a Feistel network; it is a substitution-permutation network that applies a series of mathematical transformations to a 4x4 matrix of bytes. NIST formalized AES as FIPS 197[19] in 2001, and it remains the global standard for symmetric encryption today.[38]
The Public Key Revolution
Diffie-Hellman and RSA
Symmetric encryption algorithms like DES and AES require both the sender and receiver to possess the same secret key. This creates a severe logistical constraint known as the key distribution problem: how can two parties securely exchange a secret key over an insecure channel without an adversary intercepting it?
In 1976, Whitfield Diffie and Martin Hellman, heavily influenced by the work of Ralph Merkle, published the paper "New Directions in Cryptography"[20] in the IEEE Transactions on Information Theory. They proposed the concept of public-key (asymmetric) cryptography, where each user generates a pair of mathematically linked keys: a public key that can be openly distributed, and a private key kept secret. They also introduced the Diffie-Hellman key exchange[21], a protocol allowing two parties to establish a shared secret over an insecure channel by exploiting the difficulty of computing discrete logarithms in a finite field.
In 1977, Ron Rivest, Adi Shamir, and Leonard Adleman at MIT developed the first practical implementation of a public-key encryption and digital signature scheme, known as RSA[22].[38] The security of RSA relies on the integer factorization problem: while it is computationally easy to multiply two large prime numbers together, it is extremely difficult to factor the resulting composite number back into its original primes. RSA allowed a sender to encrypt a message using the recipient's public key, ensuring that only the recipient's private key could decrypt it.
Decades later, the British government declassified documents revealing that researchers at the Government Communications Headquarters (GCHQ) had discovered these concepts first. James Ellis conceived of "non-secret encryption" in 1969, Clifford Cocks developed the mathematical equivalent of RSA in 1973, and Malcolm Williamson discovered the equivalent of Diffie-Hellman in 1974. Because their work was classified, it had no impact on the commercial development of cryptography, and the GCHQ discoveries remained unknown until 1997.
Elliptic Curve Cryptography (ECC)
As factoring algorithms improved, the required key sizes for RSA grew larger to maintain security, consuming more bandwidth and processing power. In 1985, Neal Koblitz and Victor Miller independently proposed Elliptic Curve Cryptography (ECC)[23]. ECC relies on the algebraic structure of elliptic curves over finite fields.
The elliptic curve discrete logarithm problem (ECDLP) is significantly harder to solve than the integer factorization problem used in RSA. As a result, ECC can provide equivalent security with much smaller key sizes. A 256-bit ECC key offers comparable security to a 3072-bit RSA key. This efficiency made ECC the preferred asymmetric algorithm for modern applications, particularly in mobile devices and smart cards where computational resources and battery life are constrained. ECC was standardized by NIST for digital signatures as the Elliptic Curve Digital Signature Algorithm (ECDSA) in FIPS 186[24].[39]
The Crypto Wars and Internet Security
Export Controls and PGP
During the Cold War, the United States government classified strong cryptographic algorithms as munitions under the International Traffic in Arms Regulations (ITAR), strictly controlling their export. This policy created a conflict between national security agencies, which wanted to maintain surveillance capabilities, and civil liberties advocates and commercial entities, who required secure communications. This conflict became known as the Crypto Wars.
In 1991, Phil Zimmermann released Pretty Good Privacy (PGP)[25], a software package that combined RSA public-key cryptography with symmetric encryption to secure email. PGP was uploaded to public bulletin board systems and quickly spread internationally. The US Customs Service launched a criminal investigation into Zimmermann for exporting munitions without a license. In response, Zimmermann published the PGP source code as a printed book, exploiting First Amendment protections for published literature. The investigation was eventually dropped without charges.
The legal status of cryptographic code was formally challenged in 1995 when Daniel J. Bernstein sued the US government over restrictions on publishing his Snuffle encryption system. In Bernstein v. United States[26], the Ninth Circuit Court of Appeals ruled that software source code is speech protected by the First Amendment, rendering the export restrictions on cryptography unconstitutional. By the late 1990s, the US government relaxed export controls, allowing the integration of strong encryption into commercial web browsers.
SSL, TLS, and Web Encryption
The commercialization of the World Wide Web in the mid-1990s created an immediate commercial constraint: consumers would not transmit credit card numbers over the internet if the data was sent in plaintext. In 1994, Netscape Communications developed the Secure Sockets Layer (SSL) protocol to secure web traffic. SSL utilized RSA for key exchange and server authentication, and symmetric ciphers like RC4 or DES for bulk data encryption.
SSL 3.0 was published as an Internet Draft in 1996 and later documented in RFC 6101[27]. The protocol was subsequently handed over to the Internet Engineering Task Force (IETF), which standardized it as Transport Layer Security (TLS) 1.0 in 1999 under RFC 2246[28].
For many years, TLS was used selectively, primarily for login pages and payment gateways, due to the computational overhead of RSA handshakes and the cost of digital certificates. The push for ubiquitous web encryption gained momentum in the 2010s, driven by organizations like the Electronic Frontier Foundation (which created the HTTPS Everywhere[29] extension) and the launch of Let's Encrypt[30] in 2015. Let's Encrypt functioned as an automated, open certificate authority, providing free X.509 certificates and removing the financial barrier to securing web servers. Today, the modern web relies on TLS 1.3, standardized in 2018 under RFC 8446[31], which removed obsolete cryptographic primitives and reduced the latency of the cryptographic handshake.
Post-Quantum Cryptography and Modern Infrastructure
The modern cryptographic infrastructure relies heavily on the difficulty of integer factorization (RSA) and discrete logarithms (ECC and Diffie-Hellman). In 1994, mathematician Peter Shor published Shor's algorithm[32], demonstrating that a sufficiently large and stable quantum computer could solve both of these mathematical problems in polynomial time. While practical quantum computers capable of breaking RSA or ECC do not yet exist, the threat of "harvest now, decrypt later" attacks forced the cryptographic community to develop new algorithms resistant to quantum cryptanalysis.[40]
In 2016, NIST initiated the Post-Quantum Cryptography (PQC) Standardization Process[33] to evaluate and select quantum-resistant algorithms. After multiple rounds of public cryptanalysis, NIST selected a suite of algorithms in 2022, primarily based on structured lattices. In August 2024, NIST published the final standards, including FIPS 203 (ML-KEM, based on CRYSTALS-Kyber) for general encryption and key encapsulation, and FIPS 204 (ML-DSA, based on CRYSTALS-Dilithium) for digital signatures. The global transition to these post-quantum algorithms requires updating protocols across operating systems, web browsers, and hardware security modules.
Beyond the transition to post-quantum algorithms, contemporary cryptography has expanded to secure decentralized systems and protect user privacy against platform operators. The Signal Protocol[34], developed by Trevor Perrin and Moxie Marlinspike, established the modern standard for end-to-end encrypted messaging.[39] It utilizes the Double Ratchet algorithm, combining the Extended Triple Diffie-Hellman (X3DH) key agreement with symmetric key derivation functions to provide forward secrecy and post-compromise security. This ensures that if a device's keys are compromised today, past messages remain secure, and future messages will become secure again once the cryptographic ratchet advances.
Cryptography also forms the foundational layer of decentralized blockchain networks. The Bitcoin whitepaper[35], published by Satoshi Nakamoto in 2008, utilized the SHA-256 cryptographic hash function to create a decentralized proof-of-work consensus mechanism, and ECDSA to authorize transactions without a central bank.
In addition, the theoretical boundaries of cryptography continue to expand. In 2009, Craig Gentry published the first plausible construction for Fully Homomorphic Encryption (FHE)[36] using ideal lattices. FHE allows computational operations to be performed directly on encrypted data without requiring decryption. While currently constrained by high computational overhead, FHE provides a mathematical solution to the privacy constraints of cloud computing, allowing servers to process sensitive data (such as medical records or financial models) while the data remains cryptographically sealed.
Sources (40)
- Scytale-Wikipedia
- Caesar cipher-Wikipedia
- Frequency analysis-Wikipedia
- Vigenère cipher-Wikipedia
- Kasiski examination-Wikipedia
- Enigma machine-Wikipedia
- Marian Rejewski-Wikipedia
- Bletchley Park-Wikipedia
- Bombe-Wikipedia
- Lorenz cipher-Wikipedia
- Colossus-The National Museum of Computing
- Type B Cipher Machine (PURPLE)-Wikipedia
- Communication Theory of Secrecy Systems-Bell System Technical Journal
- One-time pad-Wikipedia
- Feistel cipher-Wikipedia
- FIPS 46-3: Data Encryption Standard (DES)
- Differential cryptanalysis-Wikipedia
- Advanced Encryption Standard-Wikipedia
- FIPS 197: Advanced Encryption Standard (AES)
- New Directions in Cryptography-IEEE
- Diffie-Hellman key exchange-Wikipedia
- A Method for Obtaining Digital Signatures and Public-Key Cryptosystems (RSA)-ACM
- Elliptic-curve cryptography-Wikipedia
- FIPS 186-4: Digital Signature Standard (DSS)
- Phil Zimmermann: Background on PGP
- Bernstein v. US Dept. of Justice-EFF
- RFC 6101: The Secure Sockets Layer (SSL) Protocol Version 3.0
- RFC 2246: The TLS Protocol Version 1.0
- HTTPS Everywhere-EFF
- Let's Encrypt: About
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
- Algorithms for quantum computation: discrete logarithms and factoring (Shor's Algorithm)-IEEE
- Post-Quantum Cryptography-NIST
- Signal Protocol Documentation
- Bitcoin: A Peer-to-Peer Electronic Cash System
- Fully Homomorphic Encryption Using Ideal Lattices-ACM
- John F. Dooley, History of Cryptography and Cryptanalysis (Springer, 2018)
- Christof Paar, Jan Pelzl, Tim Güneysu, Understanding Cryptography (Springer Nature, 2024)
- Hans Delfs, Helmut Knebl, Introduction to Cryptography (Springer, 2015)
- Gilles van Assche, Quantum Cryptography and Secret-Key Distillation (Cambridge University Press, 2006)