set to cipher(1) or decipher(0), follow instructions.
The Vigenère cipher uses the corresponding letters(letter 1 of message and letter 1 of the keys, letter 2 of message and letter 2 of the keys...) to work out the ciphered letter. A = 0, B = 2, ..., Z = 25. The ciphered letter is the sum of three corresponding letters in the message, the first key, and the second key. If you get a sum greater than 25, simply modulo 26. For example, if the message is MEETMEATTHEPARKBYNOON and the keys are URGENT and SAM, the first letter of the ciphered text is Y because the letters M(12), U(20) and S(18) sum up to 50, and Y = 24, which is 50 - 26. Doing this adding trick for all of the letters in the message... MEETMEATTHEPARKBYNOON URGENTURGENTURGENTURG SAMSAMSAMSAMSAMSAMSAM ------------------------------------------- YVWPZJMKLDRUMICXLSAFF And that's our ciphered message!