next up previous
Next: 2.5 Encryption Key Up: 2. Background: Encryption and Previous: 2.3 Encryption and Decryption

2.4 Substitution Ciphers

A cipher is a cryptosystem where the encoding and decoding is done character-by-character, as opposed to being done on words, phrases, or blocks of 1024 characters. From undercover agent Artemov, you know that EGOP failed to study any computer science and, fortunately, chose one of the simplest cryptosystems: a substitution cipher. A substitution cipher, or mapping/permutation, changes each character to another character. For example, in Section 2.2, EGOP's substitution cipher exchanges each letter of the English alphabet with the ``next'' letter. Note that 'Z' ``wraps around'' to 'A'. The notation 'A' $\rightarrow$'B' means, ``'A' maps to 'B''', which also means, ``replace each 'A' with 'B'''. You must follow two rules with a substitution cipher:

1.
Use every character from a given character set.
2.
Map every character to only one other character.
Rules 1 and 2 means a character uniquely maps to another character. For example, if 'A' $\rightarrow$'B' is part of the encryption key, then neither 'A' $\rightarrow$'c' nor 'c' $\rightarrow$'B' can be part of the encryption key.



Thomas Yan
2000-05-01