The Vigenere Cipher Encoder (VCE), written by
Jason M. Chu of Boston
University, is an MFC application for encrypting and decrypting the Vigenere
cipher text. Although the Vigenere cipher cryptosystem is rarely in use
today, this application will still be useful in helping to understand the
basics and nature of early encryption techniques.
About Shifted Ciphers:
Among the most common of the classical cryptosystems are the shifted ciphers, in which the original message was shifted to create a secret (i.e. encrypted) message. An example of a shifted cipher is the Caesar's Cipher, where the secret message is generated by shifting forward every single character in the original message by 3 (e.g. 'A' becomes 'D', 'B' becomes 'E', and so on...). For decryption, every characters in the secret message is to be shifted back by 3 in order to obtain the original message. Another example of a shifted cipher is ROT-13, where the encrypted message is obtained by shifting every character in the original message by 13.
Caesar's Cipher encryption / decryption key:
ROT-13 encryption / decryption key:
The shifted cipher is actually a special sub-type of the substitution ciphers. In the case of a shifted cipher, the characters of the original message are to be substituted by a series of shifted characters of preserved order (as shown above). But generally, the substitution set doesn't necessarily have to be in any particular order (i.e. the substitution characters may be randomly put together). In either cases, breaking the encryption is possible by realizing the frequency of common letters in the language, very much like the famous Sherlock Holmes' "The Adventure of the Dancing Men." For example, 'e' is the most common letter in the English language and therefore it is possible that the character with the most occurrence in the encryption is a substitution for 'e'. Further analysis with other common letters, digrams, or trigrams will eventually break the entire encryption.
About the Vigenere Cipher:
The Vigenere Cipher (or the Vignere Cipher), invented by Blaise de Vignère* of France in the 16th century, is an example of a poly-alphabetic shifted cipher. Unlike the traditional mono-alphabetic shifted ciphers, which shift every character in a message by the same amount (such as in ROT-13 and the Caesar's Cipher), the characters in a message of a Vigenere Cipher is to be shifted by different amounts. This may be achieved by using a word or a phrase as the encryption key.
For example, if the word "key" is to be used for encryption:
'E' is the 5th letter of the alphabet and 'K' is the 11th letter. The resulting encryption will be 'E' shifted by 11, or the 15th letter of the alphabet 'O'. The rest of the message will follow the same encryption algorithm.
Encryption: Ci = Mi + Kj
The Vigenere Cipher is one of the most secured cryptosystem of its time. It is not until the 19th century when the Vigenere Cipher is finally broken by Charles Babbage, a pioneer of modern computer.
Although there already exist an imperfect algorithm for breaking the Vigenere Cipher, it may still be useful for fast and simple encryptions for messages of less importance.
* Note: the Poly-alphabetic cipher was first invented by Leon Battista Alberti of Italy in the mid-15th century. The original idea of the Vigenere cipher was first proposed by Giovan Batista Belaso in 1553.
The Vigenere Cipher Encoder (VCE) is a dialog-based application and was developed entirely in Microsoft Visual C++ .NET. VCE has two interfaces: Encoding and Decoding. Both interfaces have similar options and controls.
There are two common key types, one is that the alphabets start at zero (i.e. 'A' is numbered as 0) and the other is that the alphabets start at one (i.e. 'A' is numbered as 1). Basically, an "A=1" encryption is the "A=0" encryption shifted forward by 1.
The space (' ') is not exactly part of the alphabet and therefore it must be handled separately. In VCE, the following space options are available:
Let's use the message: "THIS IS ONLY A TEST" and the key "CRYPT"
1. Filter Space - all the space are filtered before the actual
encoding. "THIS IS ONLY A TEST" becomes "THISISONLYATEST":
2. Encode Space - the space will be numbered as the 27th alphabet
and will be included in the encoding:
3. Include Space - the space will be included in the encoding but
will not be encoded:
4. Skip Space - the space will be included in the encoding but
will be skipped:
1. Leave Space - leave the space as it is; for decoding messages with skipped or filtered space.
2. Decode Space - the space will be numbered as the 27th alphabet and will be included in the decoding.
3. Include Space - the space will be included in the decoding but will not be decoded.
1. Uppercase conversion - convert the output message to all uppercase.
2. Double key encryption - use two separate keys and perform the encryption twice for higher level of security.