Reference
What Is a Cipher?
A cipher is a method for turning readable text into a scrambled form so that only someone who knows the method (and often a key) can turn it back. Ciphers work at the level of individual letters or bits, which sets them apart from codes that replace whole words or phrases.
Cipher versus code
The words cipher and code are often used loosely, but they mean different things. A cipher transforms each letter by a rule, such as shifting it along the alphabet. A code replaces entire words or ideas with other symbols, like a codebook that maps attack at dawn to a single word.
Morse code, despite its name, is really a way of representing letters as signals rather than hiding meaning, so it is an encoding. A Caesar cipher, which shifts letters to conceal a message, is a true cipher.
The main types of cipher
Substitution ciphers replace each letter with another, like Caesar (a fixed shift), Atbash (a mirrored alphabet) or the pigpen symbol cipher. Vigenere is a polyalphabetic substitution: it uses a keyword so the shift changes as you go.
Transposition ciphers instead rearrange the letters without changing them. Modern computer ciphers combine substitution and transposition many times over, but the classic ciphers on this site are the perfect way to understand the ideas.
Frequently asked questions
What is the difference between a cipher and a code?
A cipher scrambles individual letters or bits by a rule. A code replaces whole words or phrases with other symbols, usually via a codebook. Caesar is a cipher; a codebook mapping phrases to numbers is a code.
What is the simplest cipher to learn?
The Caesar cipher, which shifts every letter a fixed number of places. It is easy to understand, easy to use, and the classic first step into cryptography.
Are these ciphers secure?
The classic ciphers here are for learning and puzzles, not for protecting real secrets. Modern encryption uses far more complex methods, but the ideas start here.