Vigenère Cipher Encoder & Decoder

مطور
إعلان · يزيل؟
Alphabetic characters only (A-Z). Non-alpha characters will be ignored.

تفصيل خطوة بخطوة

Tabula Recta (Vigenère Square)

Frequency Analysis

How the Vigenère Cipher Works

The Algorithm: The Vigenère cipher uses a keyword to shift each letter by a different amount. For encryption: C[i] = (P[i] + K[i mod keylen]) mod 26. For decryption: P[i] = (C[i] - K[i mod keylen] + 26) mod 26.

Each letter of the key determines the shift for the corresponding plaintext letter. The key repeats cyclically. Non-alphabetic characters pass through unchanged and do not advance the key position.

Auto-Key Variant: In auto-key mode, the keyword is used only for the first few characters. After the keyword is exhausted, the plaintext itself is used as the continuation of the key, making the cipher harder to break.

تاريخ: Named after Blaise de Vigenère (1523–1596), though the cipher was actually first described by Giovan Battista Bellaso in 1553. It was long considered unbreakable and earned the nickname "le chiffre indéchiffrable" (the indecipherable cipher).

Breaking the Cipher: Friedrich Kasiski published a method in 1863 to determine key length by finding repeated sequences in ciphertext. William Friedman later developed the Index of Coincidence (IC) technique. Once key length is known, each position can be attacked as a simple Caesar cipher using frequency analysis.

إعلان · يزيل؟

مرشد

Vigenère Cipher Encoder & Decoder

Vigenère Cipher Encoder & Decoder

Encrypt and decrypt text using the Vigenère cipher — the classic polyalphabetic substitution cipher once called “le chiffre indéchiffrable” (the indecipherable cipher). Enter your text and a keyword to get instant results with a step-by-step visualization, interactive tabula recta, and frequency analysis. All processing happens in your browser.

كيف تستعمل

Select Encode or Decode mode, enter your text and an alphabetic keyword. The cipher result updates instantly. Non-alphabetic characters (spaces, numbers, punctuation) pass through unchanged while preserving the original letter casing. Toggle Auto-Key mode to use the plaintext as a key extension. View the step-by-step breakdown to see each character’s shift, or explore the full tabula recta with highlighted rows and columns.

سمات

  • Encode & Decode — Switch between encryption and decryption with a single toggle. The algorithm handles both directions: C[i] = (P[i] + K[i]) mod 26 for encoding, P[i] = (C[i] – K[i] + 26) mod 26 for decoding.
  • Case-Preserving Output — Uppercase input produces uppercase output, lowercase stays lowercase. Non-alphabetic characters pass through unchanged. The key only advances on alphabetic characters.
  • Step-by-Step Visualization — See exactly how each character is encrypted or decrypted: the input character, aligned key character, shift amount (0–25), and resulting output character. Color-coded for clarity.
  • Tabula Recta (Vigenère Square) — The full 26×26 substitution table with highlighted rows and columns showing the active key and plaintext letters. Scrollable on mobile devices.
  • Auto-Key Mode — Optional variant where the plaintext extends the key after the keyword is exhausted. Shows how the extended key is constructed — useful for studying this stronger cipher variant.
  • Frequency Analysis — Letter frequency bar chart of the output compared against standard English frequencies. Includes Index of Coincidence (IC) calculation for cryptanalysis practice.
  • Reference Guide — Collapsible section covering the algorithm, history (Blaise de Vigenère, 16th century), and how it was broken (Kasiski examination, Friedman test).

الخوارزمية

The Vigenère cipher uses a repeating keyword to shift each letter by a different amount. For each alphabetic character in the plaintext, the corresponding key character determines the shift: A=0, B=1, …, Z=25. To encrypt: add the shift to the plaintext letter (mod 26). To decrypt: subtract the shift from the ciphertext letter (mod 26). Non-alphabetic characters are preserved in place, and the key index only advances on letters.

إعلان · يزيل؟

What is the Vigenère cipher?

The Vigenère cipher is a polyalphabetic substitution cipher invented in the 16th century, attributed to Blaise de Vigenère (though Giovan Battista Bellaso described it earlier). Unlike the Caesar cipher which uses a single shift for all letters, the Vigenère cipher uses a keyword where each letter determines a different shift amount. This makes it much harder to break with simple frequency analysis, earning it the nickname ‘le chiffre indéchiffrable’ — the indecipherable cipher. It remained unbroken for about 300 years until Charles Babbage and Friedrich Kasiski independently found methods to crack it in the 19th century.

How is the Vigenère cipher different from the Caesar cipher?

The Caesar cipher shifts every letter by the same amount (e.g., shift 3: A→D, B→E, etc.). The Vigenère cipher uses a keyword where each letter provides a different shift. With key ‘KEY’: the first letter shifts by 10 (K), the second by 4 (E), the third by 24 (Y), then repeats. This means the same plaintext letter can encrypt to different ciphertext letters depending on its position — making frequency analysis much harder. The Caesar cipher is essentially a Vigenère cipher with a one-letter key.

What is the auto-key variant?

In standard Vigenère, the keyword repeats: key ‘KEY’ becomes KEYKEYKEY… for longer texts. The auto-key variant uses the keyword only once, then appends the plaintext itself as the key continuation. So with key ‘KEY’ and plaintext ‘HELLO WORLD,’ the full key becomes KEYHE LLOWO… This eliminates the repeating pattern that makes standard Vigenère vulnerable to Kasiski examination, making the auto-key variant significantly harder to break through statistical methods.

What is the Index of Coincidence?

The Index of Coincidence (IC) measures how likely two randomly chosen letters from a text are the same. English text has an IC of about 0.065 — reflecting the uneven distribution of letters (E is common, Z is rare). Random text has an IC of about 0.038 (1/26). Vigenère ciphertext falls between these values depending on key length: shorter keys produce IC closer to English, longer keys closer to random. Friedrich Friedman used IC to estimate Vigenère key lengths, which was a breakthrough in cryptanalysis.

هل تريد حذف الإعلانات؟ تخلص من الإعلانات اليوم

تثبيت ملحقاتنا

أضف أدوات IO إلى متصفحك المفضل للوصول الفوري والبحث بشكل أسرع

أضف لـ إضافة كروم أضف لـ امتداد الحافة أضف لـ إضافة فايرفوكس أضف لـ ملحق الأوبرا

وصلت لوحة النتائج!

لوحة النتائج هي طريقة ممتعة لتتبع ألعابك، يتم تخزين جميع البيانات في متصفحك. المزيد من الميزات قريبا!

إعلان · يزيل؟
إعلان · يزيل؟
إعلان · يزيل؟

ركن الأخبار مع أبرز التقنيات

شارك

ساعدنا على الاستمرار في تقديم أدوات مجانية قيمة

اشتري لي قهوة
إعلان · يزيل؟