## How does Vigenère cipher work?

You first need to identify which alphabet you want to work with. In our example, we will use the lowercase Latin alphabet (letters a-z). After that, we need to decide on a key consisting of an arbitrary number of letters from the chosen alphabet. Let’s assume our key to be “cat”.

Let’s encrypt our first message “the quick brown fox jumps over the lazy dog”. It’s a special one: An English-language pangram, a sentence that contains all the letters of the alphabet.

We now map each character of our message to a character in our key. If the key is not long enough (which it normally isn’t), repeat it. It will look like this:

Now, we encipher the message letter by letter, the first one being `t`, which is mapped to the key letter `c`. The key letter tells us to rotate our alphabet such that `a` becomes `c`, like so:

Having the original and the rotated alphabet below each other we can read off that the message letter `t` that we are encoding translates to `v`. This operation, rotating the alphabet by a certain number of characters (shift) and translating a letter of a message from the original to the rotated alphabet, is called Caesar cipher.

When we repeat this Caesar cipher operation for every letter in our original message we get the following result:

## Background

The method of encryption known as the “Vigenère cipher” was misattributed to Blaise de Vigenère and was in fact first described by Giovan Battista Bellaso in 1553. Despite being easy to understand and use it withstood efforts to break it for three centuries until 1863. This earned it the description “le chiffrage indéchiffrable”, French for “the indecipherable cipher”.

## Variants

This section is a work in progress.
• Beaufort cipher
• Variant Beaufort cipher
• Trithemius cipher