Caesar Cipher
Each letter in the plaintext is shifted a fixed number of positions along the alphabet. A shift of 3 turns A into D, B into E, and so on. To decode, shift in the opposite direction by the same amount.
Common shifts: 3, 13 (ROT13), 1–25. Try all 25 shifts if the key is unknown — this is called brute force.
Example (shift 3) Cipher: KHOOR
Plain: HELLO
Atbash Cipher
The alphabet is reversed. A maps to Z, B maps to Y, C maps to X, and so on. It is its own inverse — encoding and decoding use the same operation.
Key A=Z · B=Y · C=X · D=W · E=V · F=U · G=T · H=S · I=R · J=Q · K=P · L=O · M=N
Vigenère Cipher
A polyalphabetic cipher that uses a keyword to shift each letter by a different amount. Each letter of the keyword sets the shift for its corresponding plaintext letter, cycling through the keyword as needed.
To decode: subtract the key letter's value from the cipher letter's value (mod 26). The keyword must be known or discovered from context.
Cipher(x) = (plaintext + key) mod 26 Decode(x) = (ciphertext − key + 26) mod 26
Affine Cipher
Each letter x is encrypted as (ax + b) mod 26 where a and b are the key parameters. Frequency analysis can help identify b once a is known. E is the most common letter in English.
Valid values of a: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25 (must be coprime with 26).
Rail Fence Cipher
The plaintext is written in a zigzag pattern across a number of "rails", then read off row by row. To decode, determine the number of rails, reconstruct the grid, and fill the rails with the ciphertext before reading diagonally.
Example — 3 rails, plaintext: HELLOAGENT H . . . O . . . N .
. E . L . A . E . T
. . L . . . G . . .
Cipher (read rows): HON ELAET LG
Morse Code
Letters and numbers are represented by sequences of dots (·) and dashes (−). A space separates letters. A slash (/) separates words.
A ·−B −···C −·−·D −··E ·F ··−·G −−·H ····I ··J ·−−−K −·−L ·−··M −−N −·O −−−P ·−−·Q −−·−R ·−·S ···T −U ··−V ···−W ·−−X −··−Y −·−−Z −−··