The Vigenère cipher is a classic encryption technique that dates back to the 16th century. It was invented by a French diplomat and cryptographer named Blaise de Vigenère, hence the name. It was known as “le chiffre indéchiffrable,” which means “the indecipherable cipher,” and remained unbroken until British polymath Charles Babbage broke it in the 19th century.
The Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to encrypt and decrypt messages. The key idea behind the Vigenère cipher is to use multiple Caesar ciphers based on the letters of the keyword.
Let's say we have a plaintext message
To encrypt the message, we repeat the keyword until it matches the length of the plaintext. Let
To encrypt each letter
The mathematical representation of the encryption process is given by:
To decrypt the message, we use a similar process. We repeat the keyword until it matches the length of the ciphertext. Let
To decrypt each letter
The mathematical representation of the decryption process is given by:
Note that in these equations, we use modular arithmetic with