3. In the imaginary land of Quadralphia, the inhabitants use a language with only four letters: A, B, C, and D. The frequency distribution of these letters in a typical text is:
A 43%
B 27%
C 17%
D 13%
(You may assume there is no further structure: i.e. that all digrams, trigrams, etc. appear exactly as frequently as the single-letter frequencies would indicate.)
The inhabitants of Quadralphia use a Vigenère cipher, treating their alphabet as the numbers mod 4, so that A = 0, B = 1, C = 2, D = 3.
(a) If you take a large body of Quadralphic text with typical letter frequencies and encrypt it with a Vigenère cipher using the key AC, what would the letter frequencies be in your ciphertext?
(b) You have a ciphertext that has the following letter frequencies:
A 37.67%
B 23.67%
C 15.67%
D 23%
Assuming that the plaintext had typical letter frequencies and that the key was three letters long, what are the letters in the key?