Project - Vigenère Cipher Decoder

How to use:

This program will accept a Vigenère cipher's ciphertext (encrypted text) and the key length (how many letters in key). Then using the English letter frequency, chi-squared test, and scoring algorithms, the program outputs the calculated key and plaintext (decrypted text).

  1. Visit cryptii.com to encrypt a message using Vigenère cipher
    1. a. In the text box to the left, enter the text you would like to encrypt
      • Make sure there are no spaces
      • The longer the text, the more accurate the results
      • Example: ifyoutellthetruthyoudonothavetorememberanything
    2. b. In the box in the middle, click where it says "Enigma machine" and switch it to "Vigenère cipher"
    3. c. In the box in the middle, under the "Key" field, change the key to any English word
      • The shorter the key, the more accurate the results
      • Example: forever
    4. d. The box to the right is where the encrypted text (or ciphertext) is
      • Example: ntpspxvqzklzxizhycjyutbfxcemjhfvzqvrpvvvrpyvzrb
  2. Copy and paste the encrypted text into the "Ciphertext" field below
    • You can try: ntpspxvqzklzxizhycjyutbfxcemjhfvzqvrpvvvrpyvzrb
  3. Copy and paste the amount of letters in the key in the "Key word length" field below
    • For the key "forever" it has 7 letters, so you can enter: 7
  4. Click the "Calculate Key" button below to calculate the key and decrypted text (plaintext)














Description

A program that accepts a Vigenère’s Cipher ciphertext and key length, then using chi-square test, English letter frequencies, and scoring algorithms, the program outputs the calculated key and plaintext. Created using JavaScript. (2022).

JavaScript