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

origins of cryptography

Long before computers existed, people needed to hide messages from prying eyes. Generals needed to send battle plans without enemies intercepting them. Merchants needed to protect trade secrets. Lovers needed to write letters that only the intended reader could understand. This need — as old as writing itself — gave birth to cryptography.

This article traces the roots of cryptography from its earliest known appearances in ancient civilizations through the mechanical and mathematical innovations that set the stage for modern encryption. Understanding these origins isn’t just a history lesson; it reveals the core logic that still drives cryptographic design today.

What Cryptography Actually Means

The word “cryptography” comes from the Greek words kryptos (hidden) and graphein (to write). At its core, cryptography is the practice of transforming readable information (plaintext) into an unreadable form (ciphertext) so that only someone with the correct knowledge — a key, a method, or both — can reverse the process and recover the original message.

Three basic operations define almost every historical cipher:

Nearly every cipher discussed below is a variation on these three ideas.

The Earliest Traces: Ancient Egypt

The earliest documented use of cryptographic-like techniques dates back to around 1900 BCE in Egypt. Scribes inscribing the tomb of the nobleman Khnumhotep II used unusual hieroglyphic symbols in place of ordinary ones. This wasn’t meant to hide meaning from enemies — it was likely done to add mystery, prestige, or literary flair to the inscription. Still, it demonstrates the earliest known instance of intentional symbol substitution, a foundational idea for all later cryptography.

Mesopotamia: Protecting Trade Secrets

Around 1500 BCE, a Mesopotamian potter inscribed a clay tablet with an encrypted formula for pottery glaze, deliberately omitting vowels and using unusual cuneiform signs. This is one of the earliest examples of cryptography used for practical, commercial secrecy — protecting valuable “trade secret” information from competitors, a motivation that still drives cryptography in corporate settings today.

The Hebrew Atbash Cipher

The Atbash cipher, used in Hebrew scriptural texts (appearing in parts of the Book of Jeremiah), is one of the oldest known substitution ciphers. It works by reversing the alphabet: the first letter is swapped with the last, the second with the second-to-last, and so on.

For the English alphabet, Atbash would map:

PlainABCDE…XYZ
CipherZYXWV…CBA

Mathematically, if letters are numbered 0–25, Atbash can be expressed as:

$$ C = (25 – P) \bmod 26 $$

where $P$ is the plaintext letter’s numeric position and $C$ is the resulting ciphertext letter. This simple reversible function is a precursor to the modular arithmetic that underlies modern cryptographic algorithms.

Spartan Military Cryptography: The Scytale

Around the 7th century BCE, the Spartans used a transposition device called the scytale (pronounced “SKIT-uh-lee”). A strip of parchment was wound around a wooden rod of a specific diameter, and the message was written across the wraps. When unwound, the letters appeared scrambled. Only a rod of the identical diameter could realign the letters correctly.

This is significant because it introduced the concept of a shared secret key — in this case, the rod’s diameter — that both sender and receiver needed to possess. Without knowing the key, an interceptor saw only a meaningless jumble of letters.

The Caesar Cipher: Rome’s Contribution

Julius Caesar, according to the historian Suetonius, used a simple substitution cipher to protect military correspondence. Each letter in the plaintext was shifted a fixed number of positions down the alphabet — traditionally by three.

$$ C = (P + k) \bmod 26 $$

$$ P = (C – k) \bmod 26 $$

Here, $k$ is the shift value (the key), $P$ is the plaintext letter index, and $C$ is the ciphertext letter index.

Example: With $k = 3$, “ATTACK” becomes:

PlaintextATTACK
Shift +3DWWDFN
CiphertextDWWDFN

The Caesar cipher’s weakness is glaring by modern standards: there are only 25 possible keys (shifts 1–25), making it trivial to break by brute force — simply try every shift until the message makes sense. This vulnerability illustrates a principle still central to cryptography: key space size directly determines resistance to brute-force attack.

Polybius Square: Encoding Letters as Numbers

The Greek historian Polybius (c. 200–118 BCE) devised a method of converting letters into pairs of numbers using a 5×5 grid (with I/J sharing a cell for the 26-letter alphabet problem).

12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ

Each letter is represented by its (row, column) coordinates. “HELLO” becomes: 23 15 31 31 34.

This grid-based encoding is a direct ancestor of later digraphic and mechanical ciphers, and its coordinate-based logic reappears in modern binary and hexadecimal encoding schemes.

The Alberti Cipher Disk: Polyalphabetic Substitution Begins

For nearly 1,500 years after Caesar, monoalphabetic substitution (one fixed mapping between plaintext and ciphertext letters) dominated Western cryptography. That changed in 1467, when Italian polymath Leon Battista Alberti invented the cipher disk — two concentric rotating disks, each printed with an alphabet.

Alberti’s key innovation was polyalphabetic substitution: periodically rotating the disk mid-message changed the substitution mapping, meaning the same plaintext letter could map to different ciphertext letters at different points in the message. This defeated simple frequency analysis, a technique developed by the Arab scholar Al-Kindi around 800 CE, which had made monoalphabetic ciphers breakable by studying how often each letter appeared.

Al-Kindi and the Birth of Cryptanalysis

No history of cryptography is complete without acknowledging Al-Kindi, a 9th-century Arab philosopher and mathematician often called the “father of cryptanalysis.” In his manuscript A Manuscript on Deciphering Cryptographic Messages, he described frequency analysis: since letters like E, T, and A occur far more often than Q or Z in English text (and similarly in Arabic), an analyst could match the frequency pattern of ciphertext symbols to known language statistics and deduce the substitution key.

English LetterApproximate Frequency (%)
E12.7
T9.1
A8.2
O7.5
I7.0
N6.7

Frequency analysis rendered simple monoalphabetic ciphers fundamentally insecure and forced cryptographers toward polyalphabetic and mechanical solutions — a cat-and-mouse dynamic between codemakers and codebreakers that continues to this day.

The Vigenère Cipher: “Le Chiffre Indéchiffrable”

Building on Alberti’s polyalphabetic concept, Blaise de Vigenère published a cipher in 1586 that used a repeating keyword to select a different Caesar shift for each letter of the plaintext. It was considered unbreakable for nearly 300 years, earning the nickname “the indecipherable cipher.”

$$ C_i = (P_i + K_{i \bmod m}) \bmod 26 $$

where $m$ is the length of the keyword, $K$ is the numeric key sequence, and $i$ indexes each letter position.

Example: Plaintext HELLO, keyword KEY

PlaintextHELLO
Key (repeated)KEYKE
CiphertextRIJVS

The Vigenère cipher remained secure until Charles Babbage (mid-1800s, though he never published) and later Friedrich Kasiski (1863) developed methods to determine the keyword length by finding repeated ciphertext sequences, after which frequency analysis could be applied to each sub-cipher separately. This is known as the Kasiski examination.

The Great Cipher and Diplomatic Cryptography

In 17th-century France, Antoine and Bonaventure Rossignol developed the Great Cipher for Louis XIV, encoding syllables rather than individual letters using nearly 600 different numbers. It was so effective that it remained unsolved for two centuries until French cryptanalyst Étienne Bazeries broke it in the 1890s. Encrypted messages using it (including accounts related to the Man in the Iron Mask) had baffled historians for generations.

Mechanization: From Disks to Machines

The 19th and early 20th centuries saw cryptography evolve from handheld tools to true machines:

The Enigma’s estimated key space exceeded $10^{114}$ possible configurations, yet Polish mathematician Marian Rejewski and later the British codebreakers at Bletchley Park (including Alan Turing) succeeded in breaking it — a feat widely credited with shortening World War II and directly inspiring the birth of modern computing.

India, China, and Other Early Traditions

Cryptographic thinking wasn’t confined to the Mediterranean and Middle East. In ancient India, the Arthashastra (c. 4th century BCE), a treatise on statecraft attributed to Kautilya, describes the use of secret writing (mlecchita vikalpa) for espionage and diplomatic correspondence among ministers. The Kama Sutra, compiled around the same era, lists cryptography among the 64 arts recommended for women, describing letter-pairing substitution methods for private communication.

In China, secrecy in military communication took a different form. Rather than transforming letters (since Chinese uses a logographic writing system unsuited to simple alphabetic substitution), early Chinese generals such as those described in texts attributed to the Warring States period relied on steganographic and procedural secrecy — hiding the existence of a message rather than scrambling its content, for example by writing on thin silk concealed inside wax balls or clothing seams. This distinction between cryptography (transforming content) and steganography (hiding the existence of content) is one that persists in modern security practice, where the two techniques are often combined for layered protection.

Medieval Arab Contributions Beyond Al-Kindi

While Al-Kindi’s frequency analysis is the best-known Arab contribution to cryptography, he was part of a broader tradition of Arabic cryptographic scholarship during the Islamic Golden Age. Scholars writing on ‘ilm al-mu’amma (the science of cryptography) developed systematic classifications of cipher types, including simple substitution, transposition, and even early polyalphabetic concepts centuries before Alberti. This body of work, largely preserved in manuscripts held in Istanbul, only became widely known to Western historians in the 20th century, correcting a long-standing narrative that credited European scholars alone with cryptography’s analytical foundations. Understanding this broader history matters: cryptographic innovation has never been confined to a single culture or region, and the mathematical instincts behind hiding and revealing information appear to be a genuinely universal human pursuit.

The Babington Plot: History’s Most Consequential Broken Cipher

One of history’s clearest illustrations of cryptography’s real-world stakes is the Babington Plot of 1586. Mary, Queen of Scots, communicated with conspirators plotting to assassinate Queen Elizabeth I using a nomenclator cipher — a hybrid system combining symbol substitution for letters with special codes representing whole words and names. Elizabeth’s cryptanalyst, Thomas Phelippes, successfully broke the cipher, revealing Mary’s implicit approval of the assassination plot. The decrypted evidence was used at Mary’s trial and directly led to her execution in 1587.

This episode demonstrates a recurring theme throughout cryptographic history: broken ciphers have changed the course of nations, from royal executions to the outcome of World Wars. It also illustrates an enduring cryptographic lesson — a cipher’s security depends not just on its mathematical design but on operational discipline. Historians believe Mary’s conspirators made procedural errors (including reusing the cipher key across multiple messages) that made Phelippes’s cryptanalysis considerably easier, a failure mode strikingly similar to modern key-reuse vulnerabilities.

Why This History Matters for Modern Cryptography

Every principle underpinning modern cryptography traces back to ideas born in these early centuries:

Historical ConceptModern Equivalent
Scytale shared rod diameterSymmetric secret key
Caesar shift valueEncryption key parameter
Vigenère repeating keywordStream cipher keystream
Frequency analysisStatistical cryptanalysis
Kasiski examinationKnown-plaintext / pattern attacks
Enigma rotor combinationsCombinatorial key space size

The core lesson repeated throughout history is this: security depends on keeping the key secret, not the method — a principle later formalized as Kerckhoffs’s Principle in 1883, which states that a cryptosystem should remain secure even if everything about it except the key is public knowledge. This idea remains the bedrock of all modern cryptographic design, from AES to RSA to post-quantum algorithms.

Common Mistakes When Studying Historical Ciphers

Frequently Asked Questions

Q: What is the oldest known cryptographic technique? The earliest documented example is the non-standard hieroglyphic substitution found in the tomb of Khnumhotep II in Egypt, dated to around 1900 BCE.

Q: What is the difference between a cipher and a code? A cipher works on individual letters or bits according to an algorithm and key. A code replaces whole words or phrases with other words, numbers, or symbols using a predefined codebook, without necessarily involving mathematical transformation.

Q: Why was the Vigenère cipher considered unbreakable for so long? Because it used a different Caesar shift for each letter based on a repeating keyword, defeating simple frequency analysis. It wasn’t until the Kasiski examination in 1863 that a reliable method to determine keyword length — and thus break it — was published.

Q: What role did the Enigma machine play in the history of computing? Efforts to break Enigma led to some of the earliest electromechanical and electronic computing devices, including the Bombe and, indirectly, contributed to the theoretical foundations Alan Turing later applied to general-purpose computing.

Q: Is classical cryptography still used today? Not for securing sensitive data — classical ciphers are cryptographically broken by modern standards. However, they remain valuable for education, puzzle design, and understanding the conceptual foundations of modern algorithms.

Summary

Cryptography’s origins stretch back nearly 4,000 years, from symbolic substitutions in Egyptian tombs to trade-secret protection in Mesopotamia, from the Spartan scytale to Caesar’s shift cipher, and from Al-Kindi’s frequency analysis to the polyalphabetic innovations of Alberti and Vigenère. Each historical development responded to a specific weakness discovered in the system before it — a pattern of attack and countermeasure that defines cryptography to this day. The mechanization of ciphers, culminating in devices like the Enigma machine, set the stage for the mathematical and computational cryptography that would explode in the second half of the 20th century, covered in the companion article on the history of modern cryptography.

References

Exit mobile version