Cognivo

Learn Spy Games

Turn a cipher wheel, and count letters to crack a code.

0 of 2 steps done

KHOOR ZRUOG

KHOOR ZRUOG

Step 1 of 2

Try it

The Caesar shift

Every letter was moved the same distance along the alphabet. Turn the lower wheel until the message reads.

Turn the wheel until the message reads.

The story

Ancient Ciphers

Cryptography is as old as written language. The Caesar cipher (named after Julius Caesar, who used a shift of 3) dates to the 1st century BCE. Ancient Greeks used the scytale — a rod around which a strip of leather was wrapped to reveal a message. The Vigenère cipher (16th century) was called 'le chiffre indéchiffrable' (the unbreakable cipher) for 300 years before being cracked by Charles Babbage and Friedrich Kasiski in the 1850s.

Enigma and WWII

The Enigma machine, used by Nazi Germany in WWII, was an electro-mechanical rotor cipher device capable of over 158 quintillion settings. Polish mathematicians (Marian Rejewski, Jerzy Różycki, Henryk Zygalski) first broke Enigma in the 1930s. British codebreakers at Bletchley Park — including Alan Turing — built the Bombe, a machine that automated the search for daily Enigma keys. It is estimated that cracking Enigma shortened the war by two to four years.

Modern Cryptography

The 1970s brought public-key cryptography (Diffie–Hellman, 1976; RSA, 1977), solving the key-distribution problem: two parties can now establish a shared secret over an insecure channel. Modern symmetric encryption (AES) and asymmetric encryption (RSA, elliptic-curve) underpin HTTPS, banking, messaging apps, and blockchain. The SpyGames puzzles use classical symmetric ciphers — the building blocks that modern cryptography evolved from.

The full notes

Everything above, and more, in words, to read or to listen to.

Cipher Types3 sections

Caesar Cipher

A substitution cipher where every letter is shifted a fixed number of positions in the alphabet. Shift 3 turns A→D, B→E, Z→C. To decrypt, shift in the opposite direction by the same amount. There are only 25 possible shifts, so brute force is trivial — try each shift and see which produces readable text. Frequency analysis also works: the most common letter in English is E (12.7%), so the most frequent ciphertext letter likely maps to E.

  • In SpyGames, the shift is shown (or hidden on Hard difficulty) — use the Caesar Assist slider to test shifts.
  • ROT-13 is a special case of the Caesar cipher with shift 13 — applying it twice returns the original text.
  • Brute-force: with only 25 possible keys, you can often spot the right plaintext by eye after a few tries.

Substitution Cipher

Each letter of the alphabet is replaced by a different letter according to a fixed (but arbitrary) mapping. Unlike the Caesar cipher, the mapping is not a simple shift — A might map to Q, B to Z, etc. This gives 26! (about 4 × 10²⁶) possible keys, making brute force impossible. The standard attack is frequency analysis: in English, E, T, A, O, I, N are the most common letters. Single-letter words are 'I' or 'A'. Short high-frequency words are 'the', 'and', 'of'.

  • In SpyGames, the top-4 most frequent ciphertext letters are shown — match them against E, T, A, O.
  • Double letters in ciphertext often correspond to common doubles: LL, SS, EE, TT, FF.
  • Once you know a few letters, use the substitution grid in the puzzle to fill in the rest progressively.

Morse Code

Morse code represents letters and numbers as sequences of dots (short signals) and dashes (long signals). Developed by Samuel Morse and Alfred Vail in the 1830s for the electric telegraph. The most common letters have the shortest codes: E is a single dot (·), T is a single dash (–). SOS (··· – – – ···) is the international distress signal. In SpyGames, the encrypted text uses dot-dash notation separated by slashes.

  • E (·) and T (–) are the shortest codes — if a character group is one symbol long, it's one of these.
  • Word boundaries in Morse are indicated by longer pauses — in text form, a double slash (//) separates words.
  • Memorize: SOS = ··· – – – ···; the rest follows from letter frequency (most common = shortest code).
Vocabulary3 sections

Basic Terms

Plaintext: the original readable message before encryption. Ciphertext: the scrambled, encrypted output. Key: the secret value used to encrypt and decrypt (in Caesar, the key is the shift number; in substitution, it is the full letter mapping). Encryption: the process of converting plaintext to ciphertext. Decryption: the reverse process.

  • In SpyGames, the puzzle shows you the ciphertext — your job is to find the plaintext.
  • The key is what makes a cipher secure; without it, an attacker must guess or analyze.

Analysis Terms

Frequency analysis: studying how often each letter appears in ciphertext and comparing to known letter frequencies in the target language. Index of coincidence (IC): a statistical measure of how 'random' a text is — useful for identifying whether a monoalphabetic cipher (like Caesar or substitution) is in use. Cryptanalysis: the science of breaking ciphers without knowing the key.

  • In English, the top-6 letters by frequency are: E (12.7%), T (9.1%), A (8.2%), O (7.5%), I (7.0%), N (6.7%).
  • A Caesar-encrypted text has nearly the same IC as English (~0.065); a random text has IC ~0.038.

Advanced Terms

One-time pad: a cipher using a key that is as long as the message and used only once. Provably unbreakable (Shannon's perfect secrecy), but impractical for most uses due to key distribution. Polyalphabetic cipher: uses multiple substitution alphabets, cycling through them (e.g., Vigenère). Harder to break with frequency analysis because each plaintext letter can map to multiple ciphertext letters depending on position. Kerckhoffs's principle: a cryptographic system should be secure even if everything about it, except the key, is public knowledge.

  • The Vigenère cipher repeats a keyword as its key — Kasiski's test finds the key length by measuring distances between repeated ciphertext patterns.
  • Modern AES uses 128, 192, or 256-bit keys — changing one bit of the key completely changes the ciphertext (avalanche effect).