History of Cryptography: From Ancient Ciphers to Modern Encryption Techniques

history of cryptography

Cryptography’s story spans four millennia, but its most dramatic transformation happened in less than one hundred years — from hand-cranked rotor machines to algorithms that would take longer than the age of the universe to brute-force. This article walks through that transformation, focusing on how cryptography evolved from a craft practiced by individual codemakers into a rigorous mathematical science underpinning nearly every digital interaction today.

While the companion article “Origins of Cryptography” covers the ancient and classical period in depth (Egyptian substitutions, the Caesar cipher, Vigenère, and the Enigma machine), this article picks up the thread at the dawn of the computer age and traces cryptography’s evolution through the information era.

The Turning Point: World War II and the Birth of Computational Cryptanalysis

World War II fundamentally changed cryptography. Germany’s Enigma machine, and later the more complex Lorenz cipher, forced Allied cryptanalysts to industrialize codebreaking. At Bletchley Park, Alan Turing and Gordon Welchman designed the Bombe, an electromechanical device that automated the search for Enigma rotor settings. Later, the Colossus machine — arguably the world’s first programmable electronic computer — was built specifically to break the Lorenz cipher.

This period established a permanent truth about cryptography: the strength of a cipher must be measured against the computational power available to attackers, not just against manual analysis. As computing power grew, so did the requirements for cipher strength.

Claude Shannon and the Mathematical Foundation

In 1949, Claude Shannon published Communication Theory of Secrecy Systems, widely regarded as the paper that transformed cryptography from an art into a mathematical science. Shannon introduced two properties every strong cipher should have:

  • Confusion – the relationship between the key and the ciphertext should be as complex and non-linear as possible, so that even small changes in the key produce unpredictable changes in ciphertext.
  • Diffusion – changing a single bit of plaintext should change many bits of ciphertext, spreading the influence of each plaintext bit widely.

Shannon also proved that a cipher can achieve perfect secrecy if and only if the key is truly random, used only once, and is at least as long as the message — a scheme known as the one-time pad. While mathematically unbreakable, one-time pads are impractical for most uses because of the burden of generating, distributing, and safely destroying keys as long as the messages themselves.

$$ C = P \oplus K, \quad P = C \oplus K $$

where $\oplus$ denotes bitwise XOR, $P$ is plaintext, $C$ is ciphertext, and $K$ is a truly random key used exactly once.

The Rise of Symmetric Block Ciphers: DES

By the early 1970s, businesses and governments needed a standardized, publicly vetted encryption algorithm suitable for electronic data. IBM developed Lucifer, which, after modification by the NSA, became the Data Encryption Standard (DES), adopted by the U.S. National Bureau of Standards (now NIST) in 1977 as FIPS 46.

DES is a Feistel cipher operating on 64-bit blocks with a 56-bit key, applying 16 rounds of substitution and permutation.

DES round function (simplified):

$$ L_i = R_{i-1}, \quad R_i = L_{i-1} \oplus F(R_{i-1}, K_i) $$

where $L_i$ and $R_i$ are the left and right 32-bit halves after round $i$, $K_i$ is the round subkey, and $F$ is the round function combining expansion, substitution (S-boxes), and permutation.

DES’s 56-bit key size — a deliberate compromise pushed by the NSA against IBM’s original 128-bit design — became its downfall. By 1998, the Electronic Frontier Foundation’s “Deep Crack” machine could brute-force a DES key in under 24 hours, proving the algorithm inadequate for modern security needs.

AlgorithmKey SizeBlock SizeStatus
DES56 bits64 bitsBroken (brute-forceable)
3DES112/168 bits64 bitsDeprecated
AES128/192/256 bits128 bitsCurrent standard

Triple DES: A Stopgap Measure

To extend DES’s usable life without a full redesign, Triple DES (3DES) applied the DES algorithm three times with either two or three distinct keys:

$$ C = E_{K_3}(D_{K_2}(E_{K_1}(P))) $$

This “encrypt-decrypt-encrypt” pattern maintained backward compatibility with single DES while extending the effective key length. However, 3DES is significantly slower than modern alternatives and has since been deprecated by NIST for most new applications (SP 800-131A) due to a 64-bit block size that makes it vulnerable to birthday-bound attacks like Sweet32.

The Advanced Encryption Standard (AES)

In 1997, NIST launched an open, public competition to find DES’s successor. Unlike DES’s closed development process, this competition invited global cryptographers to submit and publicly scrutinize candidate algorithms. In 2001, the Rijndael algorithm, designed by Belgian cryptographers Joan Daemen and Vincent Rijmen, was selected and standardized as AES (FIPS 197).

AES operates on 128-bit blocks with key sizes of 128, 192, or 256 bits, using a substitution-permutation network (not a Feistel structure) across 10, 12, or 14 rounds respectively. Each round includes:

  1. SubBytes – non-linear byte substitution using a fixed S-box
  2. ShiftRows – cyclic shifting of state rows
  3. MixColumns – linear mixing operation on columns (omitted in the final round)
  4. AddRoundKey – XOR with the round’s derived subkey

AES remains the global standard for symmetric encryption today, used in everything from Wi-Fi security (WPA2/WPA3) to disk encryption (BitLocker, FileVault) to TLS.

The Public-Key Revolution

Until the mid-1970s, every practical cipher was symmetric — sender and receiver needed the same secret key, which created a serious logistical problem: how do two parties who have never met securely agree on a shared key over an insecure channel?

In 1976, Whitfield Diffie and Martin Hellman published New Directions in Cryptography, introducing public-key (asymmetric) cryptography and solving this problem. Their Diffie–Hellman key exchange allows two parties to derive a shared secret over a public channel without ever transmitting the secret itself, based on the difficulty of the discrete logarithm problem.

$$ A = g^a \bmod p, \qquad B = g^b \bmod p $$

$$ \text{Shared secret} = g^{ab} \bmod p = B^a \bmod p = A^b \bmod p $$

where $p$ is a large prime, $g$ is a primitive root modulo $p$, and $a$, $b$ are the private values chosen by each party.

Later historical research revealed that British intelligence agency GCHQ had independently discovered similar public-key concepts (via James Ellis, Clifford Cocks, and Malcolm Williamson) years earlier but kept them classified, illustrating how cryptographic breakthroughs sometimes occur in parallel across secret and public research communities.

RSA: Making Public-Key Cryptography Practical

In 1977, Ron Rivest, Adi Shamir, and Leonard Adleman at MIT developed RSA, the first practical public-key cryptosystem enabling both encryption and digital signatures. RSA’s security rests on the difficulty of factoring the product of two large prime numbers.

Key generation:

$$ n = p \times q $$

$$ \varphi(n) = (p-1)(q-1) $$

Choose public exponent $e$ such that $\gcd(e, \varphi(n)) = 1$, then compute the private exponent $d$ such that:

$$ e \cdot d \equiv 1 \pmod{\varphi(n)} $$

Encryption / Decryption:

$$ C = P^e \bmod n, \qquad P = C^d \bmod n $$

RSA remains widely used today, typically with key sizes of 2048 or 3072 bits, though it is gradually being supplemented and, in some contexts, replaced by elliptic-curve cryptography due to performance considerations.

Hash Functions and Digital Signatures

Alongside encryption, the modern era introduced cryptographic hash functions — algorithms that map arbitrary-length input to a fixed-length digest, used for integrity verification, password storage, and digital signatures.

Hash FunctionOutput SizeStatus
MD5128 bitsBroken (collision attacks)
SHA-1160 bitsDeprecated (collision found in 2017)
SHA-256256 bitsCurrent standard (SHA-2 family)
SHA-3VariableCurrent standard (Keccak-based)

The 2017 “SHAttered” attack, jointly demonstrated by CWI Amsterdam and Google researchers, produced two different PDF files with an identical SHA-1 hash, formally retiring SHA-1 from trusted use in digital certificates and signatures.

Elliptic Curve Cryptography (ECC)

Introduced independently by Neal Koblitz and Victor Miller in 1985, ECC provides equivalent security to RSA with dramatically smaller key sizes by relying on the algebraic structure of elliptic curves over finite fields.

$$ y^2 = x^3 + ax + b \pmod{p} $$

A 256-bit ECC key offers security comparable to a 3072-bit RSA key, making ECC especially valuable for mobile devices, IoT hardware, and any environment where computational and bandwidth resources are limited. ECC underpins modern protocols including TLS 1.3, Bitcoin and Ethereum signatures, and Signal’s end-to-end encryption.

From Standalone Algorithms to Cryptographic Protocols

Modern cryptography rarely relies on a single algorithm. Real-world systems combine symmetric encryption, asymmetric key exchange, hashing, and digital signatures into layered protocols:

  • TLS/SSL – secures nearly all web traffic, combining RSA/ECC for key exchange, AES for bulk encryption, and SHA-2 for integrity
  • PGP/GPG – combines RSA or ECC with symmetric ciphers for secure email
  • Signal Protocol – uses the Double Ratchet Algorithm, combining ECC-based key exchange with symmetric encryption for forward-secret messaging

The Crypto Wars: Export Controls and Public Access to Strong Cryptography

The modern history of cryptography is not purely technical — it is also political. Through the 1990s, the United States classified strong cryptographic software as a “munition” under export control law, restricting the distribution of encryption software with keys longer than 40 bits outside the country. This period, later dubbed the Crypto Wars, pitted governments (concerned about criminals and foreign adversaries using unbreakable encryption) against cryptographers, civil liberties advocates, and technology companies (arguing that weak, exportable cryptography left ordinary users vulnerable and that strong cryptography was fundamental to a free and secure internet).

Phil Zimmermann’s 1991 release of PGP (Pretty Good Privacy), a free public-key encryption program, became a flashpoint. Zimmermann faced a multi-year criminal investigation for “exporting munitions without a license” after PGP spread internationally via the internet. The case was eventually dropped, and by the late 1990s, export restrictions on cryptography were substantially relaxed, partly due to the rise of e-commerce, which required strong cryptography to function at all.

A parallel controversy emerged around the NSA’s proposed Clipper Chip (1993), a hardware encryption device that included a built-in government backdoor (key escrow) allowing law enforcement to decrypt communications with a court order. Cryptographers publicly demonstrated technical flaws in the escrow mechanism, and public opposition — combined with the private sector’s preference for backdoor-free alternatives — led to the initiative’s abandonment by 1996.

These conflicts established a debate that remains active today: the tension between government access to encrypted communications for law enforcement and national security purposes, and the security community’s near-universal position that deliberately weakened cryptography (“backdoors”) creates vulnerabilities that can be exploited by any sufficiently motivated attacker, not just authorized government actors.

The Snowden Disclosures and Renewed Focus on Cryptographic Trust

In 2013, disclosures by former NSA contractor Edward Snowden revealed extensive government surveillance programs, including allegations that the NSA had worked to weaken international cryptographic standards — most notably the Dual_EC_DRBG random number generator, which cryptographers had already flagged years earlier as potentially containing a hidden mathematical backdoor. NIST subsequently withdrew Dual_EC_DRBG from its standards in 2014.

The disclosures triggered a substantial industry-wide push toward default encryption: major technology companies accelerated adoption of HTTPS by default, end-to-end encrypted messaging (Signal, WhatsApp) saw dramatically increased adoption, and the IETF prioritized development of TLS 1.3, which removed numerous legacy weaknesses and mandated forward secrecy for all connections. This period reinforced Kerckhoffs’s Principle in the public consciousness: trust in cryptography depends on transparent, publicly reviewable design, not on secret or government-influenced components.

Timeline Summary

EraKey DevelopmentApprox. Date
AncientSubstitution & transposition ciphers1900 BCE – 1400s CE
MechanicalCipher disks, Enigma machine1400s – 1940s
Theoretical foundationShannon’s information theory1949
Symmetric standardizationDES1977
Public-key revolutionDiffie-Hellman, RSA1976–1977
Modern symmetric standardAES2001
Elliptic curve eraECC widely adopted1985–2000s
Post-quantum eraNIST PQC standardization2016–2024

The Standardization Era: From Ad Hoc Design to Formal Process

One of the quieter but most consequential shifts in cryptographic history is procedural rather than mathematical: the move from cryptography designed and kept secret by governments or individual inventors, to cryptography developed through open, competitive, peer-reviewed processes.

The AES competition set the template that NIST has repeated since: publish clear evaluation criteria, invite global submissions, subject every candidate to years of public cryptanalysis by independent researchers, and only standardize an algorithm that survives sustained public scrutiny. This same process was later used for:

  • The SHA-3 competition (2007–2012), which selected Keccak as a structurally different backup to SHA-2, reducing the risk that a single cryptanalytic breakthrough could compromise all standardized hash functions at once.
  • The post-quantum cryptography competition (2016–2024), which evaluated dozens of candidate algorithms across multiple rounds of public attack attempts before finalizing ML-KEM, ML-DSA, and SLH-DSA.
  • The lightweight cryptography competition (2018–2023), which selected Ascon for resource-constrained environments like IoT devices.

This shift toward open standardization reflects a hard-won lesson from cryptographic history: algorithms developed in secrecy, or without sustained public review, have a poor track record — from the weakened DES key length to the suspected NSA influence over the Dual_EC_DRBG random number generator, later withdrawn after cryptographers demonstrated it could contain an exploitable backdoor.

How Protocol Design Evolved Alongside Algorithms

Early cryptographic history focused almost entirely on ciphers themselves. Modern cryptographic history is increasingly a story of protocol design — how algorithms are combined, sequenced, and negotiated between parties. Weaknesses in protocol design have caused as much real-world harm as weaknesses in the underlying algorithms:

Protocol FlawConsequence
SSL/TLS downgrade attacks (e.g., POODLE, 2014)Forced connections to fall back to weaker, exploitable versions
Heartbleed (2014, OpenSSL implementation bug)Exposed private keys and sensitive memory contents despite sound underlying algorithms
WEP’s flawed RC4 key schedulingAllowed practical recovery of Wi-Fi encryption keys within minutes
Padding oracle attacks (e.g., against CBC mode implementations)Allowed attackers to decrypt ciphertext byte-by-byte through error-message timing analysis

These incidents shifted the field’s focus toward formal protocol verification — using mathematical proof techniques to verify that a protocol design is secure against defined attacker models before implementation, a practice now standard in the development of major protocols like TLS 1.3 and the Signal Protocol.

Common Mistakes When Studying Cryptographic History

  • Treating DES as merely “old” rather than understanding why it failed (insufficient key length relative to available computing power) — a lesson directly applicable to key-size decisions today.
  • Assuming public-key cryptography replaced symmetric cryptography — in practice, virtually every modern protocol uses both together (hybrid encryption).
  • Underestimating how quickly cryptanalytic and computational advances can retire an algorithm, as happened with MD5 and SHA-1.

Frequently Asked Questions

Q: Why did DES’s 56-bit key become insecure? Because computing power grew according to trends resembling Moore’s Law, the 56-bit key space ($2^{56}$ combinations) became brute-forceable within hours using dedicated or distributed hardware by the late 1990s.

Q: What made RSA revolutionary compared to earlier ciphers? RSA eliminated the need for a shared secret key exchanged in advance. It allowed anyone to encrypt a message using a publicly known key, while only the holder of the corresponding private key could decrypt it.

Q: Is AES considered vulnerable to any known practical attack? No. As of current cryptanalysis, no practical attack exists that breaks full-round AES faster than exhaustive key search when implemented correctly. Vulnerabilities discovered in real systems using AES are almost always implementation or side-channel issues, not flaws in the algorithm itself.

Q: What is the difference between symmetric and asymmetric cryptography? Symmetric cryptography uses one shared secret key for both encryption and decryption. Asymmetric (public-key) cryptography uses a mathematically linked key pair — a public key for encryption or signature verification, and a private key for decryption or signing.

Summary

The history of cryptography from World War II onward is a story of increasing mathematical rigor: Shannon’s information theory gave cryptography a scientific foundation, DES and later AES standardized symmetric encryption for global use, and Diffie-Hellman and RSA solved the long-standing key distribution problem through public-key cryptography. Hash functions and elliptic curve cryptography rounded out the modern cryptographic toolkit, enabling the secure protocols — TLS, PGP, Signal — that protect digital communication today. The next frontier, covered in the companion article on cryptography in the modern age, extends these foundations into blockchain systems, IoT devices, and the looming challenge of quantum computing.

References

  • Shannon, C. E. (1949). “Communication Theory of Secrecy Systems.” Bell System Technical Journal.
  • National Bureau of Standards. FIPS PUB 46, Data Encryption Standard, 1977.
  • National Institute of Standards and Technology. FIPS PUB 197, Advanced Encryption Standard (AES), 2001.
  • Diffie, W., & Hellman, M. (1976). “New Directions in Cryptography.” IEEE Transactions on Information Theory.
  • Rivest, R., Shamir, A., & Adleman, L. (1978). “A Method for Obtaining Digital Signatures and Public-Key Cryptosystems.” Communications of the ACM.
  • Koblitz, N. (1987). “Elliptic Curve Cryptosystems.” Mathematics of Computation.
  • NIST SP 800-131A Rev. 2, Transitioning the Use of Cryptographic Algorithms and Key Lengths.
  • CWI Amsterdam & Google. SHAttered: The First Collision for Full SHA-1, 2017.
Total
1
Shares

Leave a Reply

Previous Post
origins of cryptography

Origins of Cryptography: Early Encryption Methods, Historical Ciphers, and Evolution

Next Post

Primary Principles of Cryptography: Confidentiality, Integrity, Authentication, and Access Control

Related Posts