The Vigenère cipher is a symmetric cryptosystem, which means it uses the same key for encryption and decryption. The Vigenère cipher closely resembles the Caesar cipher, with the exception that it uses a longer key to offset the major problem of the Caesar cipher: the fact that a letter can be encoded in only one way. To solve this problem, a keyword is used instead of a single character.
Each letter is firstly associated with a corresponding cipher.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
A text is encoded with a word by adding the letters of another word, called the keyword, to each of its letters. The keyword is indefinitely added accross from the text to be encrypted, then the ASCII code of each of the keyword's letters is added to the text to be encrypted. For example, the text "rendezvousamidi" with the keyword "bonjour" will be encoded as follows:
Original text:
| r | e | n | d | e | z | v | o | u | s | a | m | i | d | i |
| 114 | 101 | 110 | 100 | 101 | 122 | 118 | 111 | 117 | 115 | 97 | 109 | 105 | 100 | 105 |
Keyword:
| b | o | n | j | o | u | r |
| 98 | 111 | 110 | 106 | 111 | 117 | 114 |
Encrypted text
| r+b | e+o | n+n | d+j | e+o | z+u | v+r | o+b | u+o | s+n | a+j | m+o | i+u | d+r | i+b |
| 114 + 98 | 101 + 111 | 110 + 110 | 100 + 106 | 101 + 111 | 122 + 117 | 118 + 114 | 111 + 98 | 117 + 111 | 115 + 110 | 97 + 106 | 109 + 111 | 105 + 117 | 100 + 114 | 105 + 98 |
To decrypt this message, the secret key is needed and reverse decryption is performed, using subtraction.
Although this cipher is much more solid than the Caesar cipher, it can still be easily broken. When messages are much longer than the keyword, it is possible to identify the length of the keyword and use, for each keyword sequence, the method that involves calculating how often the letters appear, which makes it possible to determine the keyword's characters one at a time...
To avoid this problem, one solution is to use a keyword that is almost the same length as that of the text so as to prevent a statistical study of the encrypted text. This type of encryption system is called a one-time pad system. The problem with this type of method is the length of the encryption key (the longer the text to be encrypted, the larger the key needs to be), which prevents its memorization and implies a much larger probability of an error existing in the key (just one error makes the text unbreakable...).
Résultats pour The Vigenère cipher
Résultats pour The Vigenère cipher
Résultats pour The Vigenère cipher
Résultats pour The Vigenère cipher