A substitution cipher is a form of cryptography.
In a substitution cipher, a rule is used to change each letter of the message, one at a time. The rule says to replace (or "substitute") each letter with another letter from the alphabet.
For instance, this table gives a rule for a substitution cipher:
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 |
T | H | A | N | K | Y | O | U | V | E | R | M | U | Z | X | W | S | Q | B | C | D | F | G | I | J | L |
Using this rule, the sentence "Jack and Jill went up the hill" is changed to "Etar tzn Evmm gkzc dw cuk uvmm". The Caesar cipher is one example of a substitution cipher.
Substitution ciphers are not safe enough to use for important messages. Substitution ciphers can be broken by an idea called frequency analysis. Some letters are more common than others in English sentences: E is the most common, then T, then A, and so on. A message that has been changed by a substitution cipher will have different common letters, but this gives a hint about the rule. The most common letters in the changed message are likely to be the most common letters in English. Breaking cryptograms (messages hidden with a substitution cipher) is a common puzzle often found in newspapers.
In past centuries substitution ciphers were sometimes strengthened by combining them in superencryption with transposition ciphers. Improvements in cryptanalysis caused this method to be abandoned in the early 20th century.