next up previous
Next: Using a keyword Up: Simple Codes Previous: Simple Codes

Letter Subsitution

I expect everyone will have seen simple codes, used to hide text from people. Prehaps the most simple of these are `letter substitution codes'. Here we take the English alphabet and subsitute one letter for another.

In computing a commonly used letter subsitution code is rot13. This takes each letter in the alphabet and subsitutes it for the one 13 places forward or backward along the alphabet. Since the alphabet has 26 letters this arithmetic is modulo 26 and so rot13 is it's own inverse.

 rot13(`aliens') = `nyvraf'
 rot13(`nyvraf') = `aliens'

This is often used on usenet to hide text we want the reader to have to choose when, or even if, they want to read it. It is clearly far too simple to use and assume that others can't read it.

In fact if we really want to hide text from people any letter substitution code is not adequate, since they are all easy to crack. At first glace the $ 26! \approx 4*10^{26}$ possible arrangements seems too many to consider checking each one individually, but we don't have to. It is commonly known that `E' is the most common letter in the english alphabet, and we can use patterns like this to `crack the code'.


next up previous
Next: Using a keyword Up: Simple Codes Previous: Simple Codes
Stephen White
2000-03-28