Skip to content

History of cryptography

Four thousand years of hiding, scrambling and breaking messages, from a scribe's odd hieroglyphs to the post-quantum algorithms now in every web browser.

The rest of this site describes the algorithms that run today. This section tells how we got them. The story has a clear shape. For most of history cryptography was a craft: clever tricks, kept secret, used by kings, generals and lovers, and broken by patient people with pen and paper. Then came machines, then a war fought partly by codebreakers, then a theory that turned the craft into mathematics. In 1976 two researchers showed that strangers could agree on a secret key in public, and that idea is what made online shopping, messaging and software updates safe. The newest chapter is about quantum computers and the algorithms built to survive them.

Two threads run through every page. Each new cipher was trusted until someone found a way to break it, so the breakers drive the story as much as the makers. And the weak point was rarely the mathematics. It was a reused key, a careless clerk, a predictable message or a leaky chip.

Timeline

The turning points, in date order, with the part of the world each one belongs to and a link to the page that tells the story.

Year Region Event Why it mattered
c. 1900 BC Africa A scribe uses unusual hieroglyphs in the tomb of Khnumhotep II in Egypt The oldest known deliberate change to a script
1600s–1200s BC Middle East A Babylonian glaze or glass recipe is written in rare sign values The oldest writing known to guard a secret, a trade one
600s BC on (disputed) Europe Spartans wind messages round a rod, the skytale Transposition: the letters stay, their order changes
600s–500s BC or later Middle East The Book of Jeremiah hides names with Atbash, swapping the alphabet end to end Substitution: each letter stands for another
c. 499 BC Middle East Histiaeus, at the Persian court, sends a message tattooed on a slave's scalp Steganography: hiding that a message exists at all
400s–200s BC China Chinese military texts describe secret tallies and three-part letters Codes, and a secret split so no single messenger can read it
350s BC Europe Aeneas Tacticus writes a chapter on sending secret messages in a siege The first known writer to collect methods on purpose
100s BC Europe Polybius describes a 5 × 5 grid for torch signals Letters as pairs of numbers, an idea reused for 2,000 years
50s BC Europe Julius Caesar shifts each letter three places The best-known substitution cipher, with only a couple of dozen keys
AD 224–651 (reported later) Middle East Sasanian kings are said to write secret letters in a script of their own Known only from later Arabic writers, and vaguely
c. AD 300 (date uncertain) India The Kama Sutra lists secret writing among the 64 arts Ciphers for private letters, not only for kings and generals
300s–700s Africa Coptic and Greek scribes in Egypt use letter swaps and number codes A cipher alphabet written out on a potsherd at Djeme
700s Middle East Al-Khalil, in Basra, writes the first known Arabic book on cryptograms (now lost) The start of a written tradition of codebreaking
c. 780 Europe The nun Hygeburg hides her name in a vowel cipher Monks' and nuns' letter games: most of what survives from early medieval Europe
800s Middle East Al-Kindi, in Baghdad, writes the first known account of frequency analysis The first general method for breaking substitution ciphers
800s Europe Sweden's Rök runestone is carved, partly in cipher runes Ciphers far from any royal office, cut in stone
1040–1044 China The Song military encyclopedia Wujing Zongyao describes a code built on a poem (details from a weaker source) Agreed signs for fixed messages, as with the older tallies
1150s Europe Hildegard of Bingen invents her unknown letters A private alphabet: a substitution under new shapes
1200s Middle East Ibn 'Adlan asks how long a message must be for letter counts to work How much ciphertext an attack needs, still a central question
1300s Middle East Ibn ad-Durayhim, in Damascus, works through a real solution Homophones: several substitutes for one letter
1379 Europe Gabriele de Lavinde puts together cipher keys for the Avignon pope The oldest surviving European set of cipher keys
c. 1390 Europe The Book of Ballymote copies the Irish Ogam Tract, with some 100 secret forms of ogham Secret writing as part of a poet's learning
1412 Africa Al-Qalqashandi's encyclopedia, written in Cairo, sums up three centuries of Arab cryptology The most complete treatment of ciphers and codebreaking of its time
1400s–1532 Americas The Inca state keeps its records on knotted cords, khipu Not a cipher, but still not fully read
c. 1467 Europe Leon Battista Alberti describes his cipher disk The first polyalphabetic cipher in Europe
1474 Europe Cicco Simonetta, in Milan, writes rules for solving ciphers without the key Europe's first written codebreaking
1500s (attributed) Japan Uesugi Kenshin is said to use an iroha cipher square Polybius's idea with kana, if it was used at all
1518 Europe Trithemius's Polygraphia is printed, with the tabula recta The first printed book on cryptography
1553 Europe Giovan Battista Bellaso publishes the keyword cipher later called "Vigenère" Called unbreakable for three centuries
1586 Europe Blaise de Vigenère describes a true autokey cipher Stronger than the cipher that carries his name
1587 Europe Mary, Queen of Scots, is executed after her ciphered letters are read Codebreaking decides the fate of a queen
1590 Europe François Viète reads Philip II's cipher for Henri IV A mathematician as codebreaker; Philip blames black magic
1600s Europe The Rossignols build Louis XIV's Great Cipher A code that stayed unread for 200 years
1640s Europe John Wallis deciphers royalist letters for Parliament His job passed to the Willes family, and England kept a Decipherer until 1844
1700s Europe Vienna's black chamber opens, copies and reseals the embassies' mail every morning Reading other states' letters as a daily routine
1744 Russia A French envoy's intercepted letters are deciphered, and he is expelled Russia's chancellor reads the mail like the rest of Europe
1778–1783 Americas Washington's Culper Ring uses a numbered code book and invisible ink Spying with codes in the American Revolution
1779–1780 Americas Benedict Arnold plots treason in a book code Page, line and word: strong only while the book is secret
1790s (date uncertain) Americas Thomas Jefferson describes a wheel cypher of 36 disks Reinvented by Bazeries in 1891; the US Army's M-94 from 1922
1796–1800 Korea King Jeongjo runs politics through secret letters, sometimes in code Almost the only Korean record found for this page before modern times
1797 Middle East Selim III's new embassies begin Ottoman diplomatic ciphers A late start, through diplomacy
1800s–1900s (described) Africa Drums and slit-gongs carry spoken messages for miles Long stock phrases make tonal messages clear
1854 Europe Charles Wheatstone invents the Playfair cipher Encrypting letters in pairs, by hand
1854–1863 Europe Charles Babbage, then Friedrich Kasiski, break the Vigenère cipher The "indecipherable cipher" falls
1861–1865 Americas The US Civil War is fought partly over the telegraph Union route ciphers hold; Confederate keyword ciphers are read
1869–1879 Japan The telegraph arrives, then government code charts and a cipher wheel Japan's first official ciphers
1871–1872 China The Chinese telegraph code gives each character four digits Chinese on the wire, and an easy way to add a secret key
1881–1917 Russia The Okhrana's black chambers read the empire's mail Mass mail reading by the political police
1883 Europe Auguste Kerckhoffs publishes La cryptographie militaire The rule that only the key, not the method, may be secret
1914–1918 Europe Room 40 in London reads German naval and diplomatic codes Radio lets the enemy hear every message
1917 Europe British codebreakers read the Zimmermann telegram Helps bring the United States into the First World War
1917–1919 Americas Gilbert Vernam's teleprinter cipher leads to the one-time pad The only cipher that can be proven unbreakable
1917–1919 Europe Hebern, Scherbius, Koch and Damm invent rotor machines; Scherbius's becomes Enigma Cipher machines go commercial
1918 Europe Georges Painvin breaks Germany's ADFGVX field cipher A decoded order points to where the next German attack will fall
1918 Americas Choctaw soldiers become the first code talkers A language the enemy doesn't know, on the field telephone
1920 Americas William Friedman's index of coincidence Statistics find a keyword's length with no guessing
1924 Japan A Polish officer teaches Japan's army and navy codebreaking The start of Japan's codebreaking services
1932 Europe Marian Rejewski reconstructs the wiring of the military Enigma Mathematics enters codebreaking
1938–1939 Europe The Poles build the bomba, then share everything with Britain and France Five weeks before the war, the Allies learn how Enigma can be broken
1938–1940 China Herbert Yardley works on Japanese army codes in Chongqing China builds its own codebreaking bureau
1940 Americas The US Army breaks Japan's Purple machine "Magic" intelligence through the Pacific war
1940–1944 Europe Bletchley Park's bombes break Enigma; Colossus attacks the Lorenz cipher Codebreaking at industrial scale, and the first electronic computers
1942 Americas US Navy codebreakers read JN-25 before Midway A code read in time turns a battle
1942 Russia The Soviet pad office prints key pages twice The flaw that Venona later found
1942–1945 India The Wireless Experimental Centre near Delhi works on Japanese army codes One of Bletchley Park's two overseas outposts
1940s Americas SIGABA, and Navajo, Comanche and Meskwaki code talkers Systems the enemy never read
1943–1980 Americas The Venona project reads reused Soviet one-time pads The one-time pad is only as safe as its key handling
1949 Americas Claude Shannon publishes "Communication Theory of Secrecy Systems" Cryptography becomes a mathematical science
1952 Americas The National Security Agency is created Codebreaking becomes a permanent peacetime industry
c. 1956 Russia The Soviet Fialka rotor machine enters service across the Warsaw Pact Rotor machines last into the 1990s
late 1960s–1971 Americas Horst Feistel at IBM designs the Feistel network and Lucifer The structure inside DES and many later ciphers
1970 Europe The CIA and West Germany's BND secretly buy Crypto AG, supplier to more than 120 countries Rigged machines read the world's diplomatic traffic for decades
1974 Americas Ralph Merkle's puzzles, in a rejected student project The first public-key idea in the open
1976–1977 Americas Diffie–Hellman key exchange, then RSA Public-key cryptography: strangers agree on secrets in the open
1977 Americas DES becomes the first public standard cipher Strong encryption for business, and a fight over key length
1985 Americas Neal Koblitz and Victor Miller propose elliptic-curve cryptography The same security as RSA with much shorter keys
late 1980s Africa The ANC's Operation Vula sends encrypted messages by laptop, tape and phone Strong encryption for a liberation movement, and for Mandela in prison
1991–2000 Americas PGP, the Clipper chip and the US export fights The crypto wars over who may use strong encryption
1994 Americas Peter Shor's quantum algorithm for factoring A future quantum computer would break RSA and elliptic curves
1995 Worldwide SSL ships in Netscape Navigator; in Finland, Tatu Ylönen writes SSH Encryption for everyone's network traffic
1996–1999 Americas Timing and power-analysis attacks Hardware leaks keys even when the math is sound
1997 Europe GCHQ reveals that its staff found public-key methods in 1970–1974 The same ideas, discovered first in secret
1998 Americas The EFF's Deep Crack finds a DES key in 56 hours Proof that 56-bit keys were too short
2000 Japan NTT and Mitsubishi Electric publish the Camellia cipher A national cipher with the same shape as AES
2001 Worldwide AES, designed in Belgium, is published as a US standard, FIPS 197 A cipher chosen in an open, worldwide competition
2003–2004 Korea The ARIA cipher becomes a Korean standard Korea's own block cipher, used in government services
2004–2017 Worldwide MD5, then SHA-1, collisions, starting with Wang Xiaoyun's team in China Hash functions break in practice
2006–2012 China SMS4 is published, later renamed SM4; with SM2 and SM3 it forms China's national suite China's own standard algorithms
2008–2009 Worldwide The Bitcoin paper, then the network: cryptography as money Hashes and signatures keep a public ledger honest with no bank
2012 Worldwide Keccak is chosen as SHA-3 A second standard hash that works in a completely different way
2013 Americas The Snowden documents Mass surveillance, and a random number generator that was almost certainly backdoored
2014 Worldwide Heartbleed One bug in OpenSSL exposes much of the web
2015 Russia GOST R 34.12-2015 adds the Kuznyechik cipher Russia's own block cipher standard
2015–2016 Worldwide Let's Encrypt starts issuing free certificates Encrypted web traffic becomes the default
2016 Worldwide WhatsApp switches a billion users to the Signal protocol End-to-end encryption for ordinary messaging
2016–2024 Worldwide NIST's post-quantum competition, with entries from around the world ML-KEM, ML-DSA and SLH-DSA become standards in August 2024
2018 Worldwide TLS 1.3 is published A faster, cleaner protocol with forward secrecy built in
2020 China China's Cryptography Law comes into force Core, common and commercial cryptography in law
2022–2026 Worldwide Hybrid post-quantum key exchange becomes the default in SSH, browsers and Signal Recorded traffic stays safe if a quantum computer arrives
2025 Korea Korea's own competition, KpqC, picks four post-quantum algorithms Post-quantum standards beyond NIST
2025 China China opens a worldwide call for new national algorithms, post-quantum ones among them Post-quantum standards beyond NIST
2026 Americas NIST IR 8547 sets 2030 and 2035 as the end dates for RSA and elliptic curves The old public-key algorithms get a retirement date

The table picks out turning points; each page opens with a fuller table of its own. Some parts of the world have far fewer rows than others, and mostly that is about what survives and what has been studied, not about what people did. The thinnest stretches are early medieval Europe, Byzantium, Persia before Islam, Mughal India, Korea before modern times, Southeast Asia and Ethiopia, where the research for these pages found little or nothing in reliable sources that describes actual ciphers. Where a page says a record is thin, that is the reason.

How to read this section

The pages run in time order, and each one stands on its own:

  1. The ancient world: Egyptian and Babylonian scribes, the Spartan skytale, Polybius, Caesar, Atbash, hidden messages, China's tallies, India's Kama Sutra, the Sasanian kings' script, Coptic ciphers
  2. Arab cryptanalysis: al-Kindi and frequency analysis, the scholars of Basra, Baghdad, Damascus and Cairo who built on it, and the gap where Byzantium should be
  3. The Renaissance: medieval monks' ciphers, cipher runes and secret ogham, cipher disks, the "Vigenère" cipher, nomenclators, Mary Queen of Scots, Inca khipu, Japan and Korea, the black chambers from Paris to Saint Petersburg, the Ottomans, the American Revolution
  4. The telegraph age: Vigenère broken, Playfair, Africa's talking drums, the Chinese and Japanese telegraph codes, the Okhrana, Kerckhoffs, Room 40 and the Zimmermann telegram, the Choctaw code talkers, the one-time pad
  5. Machines and World War II: rotor machines, Enigma, Poland and Bletchley Park, Colossus, China's black chamber, Purple, Japan's codebreakers, Delhi, the code talkers, Venona
  6. From Shannon to DES: Shannon's theory, NSA and GCHQ, Crypto AG, Fialka, Feistel and Lucifer, DES and its key
  7. Public-key cryptography: Merkle, Diffie–Hellman, RSA, GCHQ's secret, elliptic curves, PGP, Clipper and the crypto wars, the ANC's Operation Vula
  8. The internet era: SSL to TLS 1.3, SSH, the AES competition, broken hashes, famous bugs, Snowden and Dual_EC, Let's Encrypt, Signal and end-to-end messaging
  9. Hardware and engineering: HSMs, smart cards, TPMs and secure enclaves, AES instructions, side channels, cracking machines, security keys, quantum key distribution
  10. Quantum and post-quantum: Shor and Grover, the machines, the NIST competition, ML-KEM, ML-DSA, SLH-DSA, FN-DSA and HQC, Korea's and China's own processes, hybrid rollouts, deadlines, and what is still open

Each page opens with a short summary and an at-a-glance table, then tells the story in sections you can skip between. Where an idea from history lives on in a modern algorithm, the text links to that algorithm's page.

The Python examples use only the standard library and print their results, so you can paste them into python3 and see the same output shown under each one. They are toys for understanding the idea, never for protecting anything.

Sources. History of secret work is full of myths, and some famous stories are told with more confidence than the evidence allows. The pages lean on primary sources (the ancient texts, the original papers, NIST documents, declassified agency histories) and serious historians, above all David Kahn's The Codebreakers. Where a story is disputed, the text says so. Each page's references end with a line marked Weaker sources, listing anything that rests on news reports, blogs, encyclopedia articles or search summaries, so you can judge it for yourself.