The Vigenère cipher is a classic polyalphabetic encryption method that uses a shift table and a keyword to protect messages.
The game supports two alphabets: Russian (А-Я, Ё) and English (A–Z). All letters are automatically converted to uppercase. Digits and punctuation marks are not encrypted.
Alice enters the original message. Each character is checked against the chosen alphabet. Invalid characters are filtered out automatically.
A keyword is entered — a sequence of letters that will be repeated cyclically under the message. The key length affects cryptographic strength: the longer and more random the key, the harder the cipher is to break.
For each character of the message:
Formula: C = (P + K) mod N, where P is the plaintext position, K is the key position, N is the alphabet size.
The key is transmitted over a secure channel, the ciphertext over an open one. Even if the ciphertext is intercepted, the message cannot be recovered without the key.
Bob uses the same key and Vigenère table in reverse order:
Formula: P = (C − K + N) mod N
After decryption, the system compares the received text with the original. If they match, the transmission was successful. Visual highlighting of the table helps track every step of the process.
Color legend: ● Plaintext, ● Key, ● Ciphertext