1-min guide

From the Caesar cipher to modern encryption

The Caesar cipher is the simplest kind of cipher: shift every letter by a fixed number. Julius Caesar of ancient Rome is said to have written letters with a shift of three.

Reading time: about 1 min

More in the 5-min version →
HELLO KHOOR Plaintext (original)Key: shift by 3Ciphertext
Every letter is shifted by the same amount, like H→K and E→H

Plaintext, ciphertext and key

The original readable text is the “plaintext,” the encrypted text is the “ciphertext,” and the information that sets the conversion rule is the “key.” In the Caesar cipher, the key is “how many letters to shift.” Turning ciphertext back into plaintext is called “decryption.”

Weakness 1: only 25 keys

The alphabet has 26 letters, so there are only 25 meaningful shifts, 1 to 25. Try them all (“brute force”) and you will always crack it.

Weakness 2: letter counts give it away

E is the most common letter in English text. Assume the most frequent letter in the ciphertext is E, and you can guess the shift. This is called “frequency analysis.” Even ciphers that scramble letters randomly (with about 4×1026 possible keys) have been broken by frequency analysis.

Modern ciphers have vastly more keys

Summary
  • A key turns plaintext into ciphertext, and a key decrypts it
  • The Caesar cipher quickly falls to brute force and frequency analysis
  • Modern ciphers have vastly more possible keys
Go further: 5-min deep diveEncryption in depth: shared keys, public keys, hashes and digital signaturesThe problem of “how do you get the key to the other person?” and public-key encryption, the answer to it. Plus a clear table of “which key does what,” a favorite exam topic.Read the 5-min version →