Vigenère cipher. Vigenère square. Text encryption

Table of contents:

Vigenère cipher. Vigenère square. Text encryption
Vigenère cipher. Vigenère square. Text encryption
Anonim

Despite the fact that the cipher was reworked many times, it was first described by Giovan Battista Bellaso in 1553. Subsequently, he received the name of the French diplomat Blaise Vigenère. This option is quite simple to implement and understand, since it is the most accessible cryptanalysis method.

Method Description

The Wizhner cipher includes a sequence of several Caesar ciphers. The latter is characterized by a shift of several lines. For encryption purposes, you can use a table of alphabets called the Vigenère square. In professional circles, it is referred to as tabula recta. The Vigenère table consists of several lines of 26 characters. Each new line moves a certain number of positions. As a result, the table contains 26 different Caesar fonts. Each stage of encryption involves the use of a different alphabet, which is selected depending on the character of the keyword.

Encryption method
Encryption method

In order to better understand the essence of this method, let's consider text encryption using the word ATTACKATDAWN as an example. The person who sends the text writes down the keyword "LEMON" until it matches the length of the transmitted text. The keyword will look likeLEMONLEMONLE. The first character of the given text - A - is encrypted with the sequence L, which is the first character of the key. This character is located at the intersection of row L and column A. For the next character of the given text, the second key character is used. Therefore, the second character of the encoded text will look like X. It is the result of the intersection of row E and column T. Other parts of the given text are encrypted in a similar way. The result is the word LXFOPVEFRNHR.

Decryption process

The word is deciphered using the Vigenère table. You need to find the string that matches the first character of the keyword. The string will contain the first character of the ciphertext.

Message Encoding
Message Encoding

The column that contains this character will match the first character of the source text. Subsequent values will be decrypted in the same way.

Important Tips

When providing ciphertext, you must specify a keyword. It will be needed in order to decrypt the code using the Russian Vigenère cipher as well. In order to make sure that the encoding is correct, it is better to double-check the text. If the text is not encoded correctly, it cannot be decoded correctly.

Cipher Maker
Cipher Maker

When using the Vigenère square with spaces and punctuation, the decoding process will become much more complicated. It is important to know that frequent repetition of the code word will make it easier to decipher the text. Therefore, the code information mustbe long.

Warning to the method

The Vigenère cipher, like many others, is not secure because it is easy to crack. If there is a need to transfer secret information, you do not need to resort to using this method. Other methods have been developed for such purposes. The Vigenère cipher is one of the oldest and most popular encryption methods.

Data encryption
Data encryption

The key is a special phrase. It is repeated several times and is written over the encrypted text. As a result, each letter of the sent message is shifted relative to the specified text by a certain number, which is specified by the letter of the passphrase. For several centuries, this method has consistently held the position of the most reliable encryption method. In the 19th century, the first attempts to break the Vigenère cipher were noted, which were based on determining the length of the key phrase. If its length is known, then the text can be divided into certain fragments, which are encoded by the same shift.

Additional decryption methods

You can open the original message using the frequency analysis method if the given text is long enough. Solving the cipher largely comes down to finding the length of the key phrase. There are two main methods that allow you to determine the length of the key phrase. The first method for decoding the Vigenère cipher was developed by Friedrich Kassitzky. This method is based on the search for bigrams. Its essence lies in the fact that if the same digram is repeated in the encoded message at a distance that is a multiple of the length of the keyphrase, then there is a high probability that it will occur at the same positions in the ciphertext. If you find a given distance, get its divisors, you can get a set of certain numbers. They will be the length of the key phrase. However, this method requires some luck. In a large encoded text, you can find random bigrams, which will greatly complicate the decryption process.

Encryption method
Encryption method

The second method for deciphering the text was proposed by Friedman. Its essence lies in the cyclic shift of the encoded message. The resulting text is written under the original ciphertext and the number of matching letters in the bottom and top lines is counted. The resulting numbers allow you to calculate the so-called match index. It is determined by the ratio of matches to the total length of the message. The coincidence index for Russian texts is approximately 6%. However, for random texts, this index is approximately 3 or 1/32. Friedman's method is based on this fact. The encoded text is written with a shift of 1, 2, 3, etc. positions. Then, for each shift, you need to calculate the index of matches. Thus, it is necessary to perform a cyclic shift of the entire message. When shifting the index by a certain number of characters, its length can increase dramatically. This suggests that the length of the keyword can be equal to a certain number. If a situation occurs in which all characters are shifted to the same position, the match index will have the same value as the origin altext. If an index is calculated for a Vigenère cipher, the actual text is compared anyway.

Perform frequency analysis

If the result of the decryption process is positive, you can enter text into columns. The columns are formed based on the source text. Kassitzky invented the most advanced form of text. However, the means of this method cannot be applied if the lattice deviates from the standard sequence of letters in the alphabet. Therefore, this method allows you to find out the length of keys only in special cases.

Recommended: