Unscramble Words 4U

Home › Vigenère cipher

Vigenère cipher

Encode a message with a keyword, decode it with the same keyword, or crack it when you do not know the key.

    How the Vigenère cipher works

    The Vigenère cipher is like several Caesar ciphers taken in turn. Each letter of the keyword gives a shift: A means no shift, B a shift of one, C a shift of two, and so on. The first letter of the message uses the first letter of the key, the second uses the second, and when the key runs out it starts again.

    Type your message, enter a keyword and choose Encode or Decode. Only the letters A to Z are changed, and the key only moves on when a letter is used, so spaces and punctuation stay in place.

    Cracking it without the key

    Press Crack it without the key and the tool tries key lengths from one to sixteen letters. For each length it splits the message into columns that share a shift, finds the shift that makes each column look most like English, and puts the results together. The best few keys are listed with their decoded text; choose one to use it.

    Cracking works best on longer messages. With a hundred letters or more it usually finds the key straight away. Short messages may give several possible answers, because there is not enough text to tell which one reads best.

    A little history

    This cipher was described by the Italian Giovan Battista Bellaso in 1553, but it was later credited to the Frenchman Blaise de Vigenère, and the name stuck. For about 300 years it was known as le chiffre indéchiffrable, the indecipherable cipher. A general method for breaking it was published by Friedrich Kasiski in 1863, and Charles Babbage is known to have broken it some years earlier.

    Questions and answers

    What makes a good Vigenère key?

    A long key with no obvious pattern. Short keys and common words are much easier to crack.

    Can I use numbers or spaces in the key?

    No. The key can only contain the letters A to Z; anything else is ignored.

    Why did the cracker find the wrong key?

    The message is probably too short. Each column needs enough letters for its pattern to show, so try a longer message.

    Is the Vigenère cipher secure today?

    No. It can be broken with frequency analysis, as this tool shows, so treat it as a puzzle cipher.

    Related tools