Cracking A Vigenere Encryption

On

Vigenere encryption TheVigenere encryptionDirections:Enter message in the top text field, and shift number unless you wantto use what is there. You can copy and paste from this document to anemail window. Press Encrypt button.To decrypt message, press the Decryptbutton. Use for this encryption program. This particular cipher uses onlycapital letters. Numbers and punctuation is unchanged, and lower-caseletters are converted to upper-case letters.NormalmessageKeyText lengthI Love CryptologyEncryptedmessageFive character group message forme.g.

Wtirh qsvix vsstw erhev.The Vigenere encryption was the creation of the French diplomat, Blaisede Vigenere, 1523-1596. Like Caesar and all the cryptographers thatfollowed, he did not visualize the cipher in modular arithmetical terms.Rather he viewed the cypher as a substitution cipher where a differentalphabet was used for the next letter of the message, with the alphabetsrepeating periodically - according to some key. Rather than settingseveral different alphabets, the cryptographer would use the Vigeneresquare.Here's the idea. For the given key word ' FIRST',encrypt each letter of the message taken in the left-most column tothe letter in the keyword-letter column. Thus, the first five lettersof the message use the alphabets corresponding the the 'F','I', 'R', 'S', and 'T' columns.So, the Vigenere code with this keyword is really five Caesar shiftsused in a cyclical fashion. Decription is carried out working backwardsfrom the keyword-columns to the left-most column.

Vigenere cracker

Vigenere Cipher Encoder

Because we are reallyusing five alphabets, the Vigenere encryption is sometimes called apolyalphabetic (many + alphbets) code.This encryption never really caught on, partly because it was difficultto use for the encryption and decryption of hundreds of messages dailyas required by the military.It was broken for the first time by a Prussian major named Kasiskiin 1863. He proposed a method for breaking a Vigenere cipher that consistedof finding the length of the keyword and then dividing the message intothat many simple substitution cryptograms. Apply frequency analysisto decode the multiple cryptograms. Another to break the code was computingengine pioneer Charles Babbage more than three hundred years later.Babbage applied a very careful analysis on the structure of groups ofletters and a great deal of hard work. The Vigenere cypher today isjust moderately good. No serious cryptologist would use it for secureinformation transmission.

Breaking The Vigenere Encryption SystemW e recall that a Caesar k-shiftis the circular permutation which replaces each letter of the alphabetby the letter k places later (with wrap around). In Vigenereencryption, the key consists of a period p and a sequencek 1,k 2.,k p of Caesar shifts.

This given, the plaintextis broken up into successive strings of p letters each and thes th letter of each string is replaced by its image underthe Caesar k s-shift. This encryption system is vulnerable toletter-frequency analysis. The letter frequencies observed in the sequenceof s th letters have the same distribution as the plaintextletters only k s-shifted.T o break Vigenere encryption, oneguesses a period p and then, by comparing the histogram of observedfrequencies of s th letters to the histogram of Englishletter probabilities, one is led to the correct value of k s.A wrong guess for the period p leads to relatively flat histogramsfor all or most of the values of s.

Cracking

The code breaker in this caserepeats the analysis with a new trial period.T he Applet below is programmed toillustrate this codebreaking process. Upon pressing the Random Cyphertext button theApplet will display some text which is Vigenere encrypted by a randomlyselected key. Press the Break button to start the process. TheApplet assumes (most often incorrectly) that p=1. Thus it proceedsas if every letter of plaintext was encrypted by the same Caesar shift.It displays (in red) the histogram of observed letter frequencies, alongsidea (blue) histogram of english letter probabilities. It also displays thefirst 25 characters of your text, decoded according to your current keyword. Press the Period + several times (ifnecessary) until the red histogram resembles a shifted version of the bluehistogram.

This given, use the mouse to drag the red histogram to the positionwhere it best aproximates the blue histogram. You can also use the keyboard to type the image of 'E'. Pressing the SPACE key will shift the histogram by one position.

Cracking A Vigenere Encryption Code

The Applet stores the shiftcorresponding to that position as a tentative value for k 1. Push the Position Right button and the Appletwill display, again in red, the histogram giving the observed frequenciesof the 2 nd letters of the successive strings. Drag thered histogram to the best position as before to obtain the tentative ofk 2. Repeat this process until you have tentatively determinedall the other k s.

At this point you may press the Decrypt button.The Applet will then decrypt the given cyphertext as if it was encryptedby means of the values of k 1,k 2.,k p you have just determined.A look at the resulting text will make it clear if all of your guesseswere correct or which, if any, need to be changed.