Codes & Ciphers

A history of secret codes and ciphers. Read the history, then try encrypting your own messages!

History of Cryptography

As soon as people learned to write, or close to that, they started trying to keep their messages secret. As soon as they started, others started to try to decrypt it. This is a short history of the different ciphers used throughout history.

c. 1900 BCE — Egyptian Hieroglyphs

Some of the earliest known intentional secret writing appears in the tomb of Khnumhotep II, where scribes substituted unusual hieroglyphs on the inscription. It didn't mean anything (so far as we know), but it's widely considered the start of secret writing.

c. 500 BCE — The Scytale

The Spartans and Greeks wrapped a thin strip of parchment around a rod of a specific diameter, then wrote their message along its length. Unwrapped, the letters looked scrambled; only a rod of the correct thickness could reveal the message. Try this one at home! You can use a toilet paper roll or a pencil.

c. 50 BCE — The Caesar Cipher

Julius Caesar shifted each letter of his military dispatches three places down the alphabet. Simple, fast, and relatively effective. Nobody could crack it as it had never been used before! One of the first real ciphers. Any alphabetic shift is now called a Caesar cipher.

9th century — Al-Kindi and Frequency Analysis

The Arab polymath Al-Kindi wrote A Manuscript on Deciphering Cryptographic Messages, describing frequency analysis: the insight that certain letters appear more often than others. For example, if you saw around 12% of the message was the letter "H", it was fairly likely that that cipher letter corresponded to the letter "E". This made it possible to crack almost any Caesar cipher! Try this yourself in the Frequency Decryption game!

1553 — The Vigenère Cipher

Giovan Battista Bellaso (later misattributed to Blaise de Vigenère) devised a polyalphabetic cipher using a repeating keyword. For three centuries it was called le chiffre indéchiffrable, meaning "the unbreakable cipher", until Charles Babbage and Friedrich Kasiski cracked it in the 1800s by using frequency analysis. This cipher is very difficult to crack.

1917 — The One-Time Pad

Gilbert Vernam and Joseph Mauborgne developed a cipher using a truly random key as long as the message. When used correctly, it is mathematically unbreakable. It remains the only cipher with proven perfect secrecy. Its only drawback is that you must distribute huge numbers of keys as you need one for every message. It's really good with small numbers of short messages, but if you just wanted to send a message as long as this sentence, it could be very impractical.

1939–1945 — The Enigma and Bletchley Park

Nazi Germany's rotor-based Enigma machine produced ciphertexts of huge complexity. At Bletchley Park, Alan Turing, Gordon Welchman, and thousands of others built the Bombe, a huge machine that could break Enigma, shortening the Second World War by an estimated two years.

1976 — Public-Key Cryptography

Whitfield Diffie and Martin Hellman published New Directions in Cryptography, proposing that two strangers could agree on a secret key over an open channel. A year later, three cryptography scientists named Rivest, Shamir, and Adleman introduced RSA. The entire modern internet rested on this idea, a very complex cipher that uses a secret key to decode messages and a public key to encode messages.

2001 — AES Becomes the Standard

After an open international competition, the Rijndael cipher by Joan Daemen and Vincent Rijmen was adopted as the Advanced Encryption Standard. It protects classified government data and nearly every secure connection you make, such as HTTPS, secure file transfer, and other things you wouldn't want just anybody to know about. It's even stronger and faster than RSA.

Today — Post-Quantum Cryptography

Large quantum computers could break RSA and elliptic-curve cryptography (An alternative to RSA that isn't quite as powerful). Certain groups have begun standardizing new algorithms designed to resist them. The cycle of tougher ciphers and better codebreakers continues!