Let’s continue on the topic of ciphers. This time your task is to read the Wikipedia’s description on the Vigenère cipher and write a program that allows for coding and decoding of messages with it. Use the Wikipedia’s minimal test to make sure it works correctly, i.e. “attacking tonight” coded with the key “oculorhinolaryngology” should return “ovnlqbpvt hznzeuz”.
Once you got it, use it to code the text in genesis.txt
(to be found here) with a passphrase: “Julia rocks, believe in its magic.” and compare the letters distribution in the text before and after coding. Pause for a moment and think can the new cipher be easily broken by a frequency analysis we used in Section 21.