Types of Ciphers
One common form of the monalphabetic substitution cipher is the Caesar shift, in which the encrypter chooses a keyword or key phrase (simply referred to as the "key") that is easy to remember and readily yields the cipher alphabet. As an example, consider the plain text alphabet to be "abcdefghijklmnopqrstuvwxyz" and let the keybe the word "cypher". Then the cipher alphabet would look like "cypherabdfghijklmnoqstuvwxz", simply the key (with letter repetitions removed) followed by the rest of the normal alphabet (also with repetitions removed). This type of cipheris easilysolved by examining what the software calls a "shift histogram", or a histogramof the cipher alphabet with the assumption that the cipher and plain text alphabets are the same. Since the ordered histogram of lettersin the English language is known it can be compared to the results of theciphertext analysis, and peaks and troughs in the graphs can be matched to yield a reasonable guess at the key and thus the cipher alphabet.
As a simple example, to encrypt a message using the keyword "cypher" start by translating the first character of the message according to the cipher alphabet corresponding to the first letter of the key word, or "cdef". If the plaintext character is b then it becomes d according to this known cipher alphabet. To encrypt the second letter of plain text, use the cipher alphabet corresponding to the second letter of the keyword, or "yzabc". If the plaintext character is b again, this time it becomes z according the second cipher alphabet.This process continues to the last letter of the keyword and then the cycleis restarted, reusing the first letter of the keyword, then the second, and so on.
The solution to the Vigenere cipher takes advantage of the fact that cipher alphabets repeat themselves accordingtothe length of the keyword. By guessing various lengths of the key word and performing analyses only on cipher text produced by the same cipher alphabet (ie, if the keyword is assumed to be 5 letters long, include every 5th letter in the analysis) and scanning the results for a distribution similar to the English language, individual cipher alphabets can be deciphered and then combined to find the keyword, and decode the remainder of the encrypted message. Alternately, or jointly, finding repetitions of letter combinationsin the encrypted message (ie, "XYZ XYZ") may indicate a repeated word encrypted with the same rotation. Statistically, if the message islong enough thenthere is a significant chance that this may occur. Using the spacing between the letter repetitions, the length of the keyword can be constrained to be a factor of that spacing interval, and this consequence can then be tested. The fact that the cipher alphabets are simple rotations on the normal alphabet further simplifies this task.
If the cipher alphabets are not simple rotations but instead are random arrangements of the normal alphabet, the encrypted message may not succumb to this type of analysis. Historically, decoding machines were paired with human ingenuity to find alternate solutions to these types of codes, such as those used in the German Enigma machine in World War II, but in todays world of super-fast d computers an exhaustive search of keys is a real possibility to cracking these codes.