Нет описания

1234567891011121314151617181920
  1. = Caesar cipher
  2. :imagesdir: images
  3. :icons: font
  4. :source-highlighter: rouge
  5. :stem: latexmath
  6. == Task
  7. The messages in link:./ciphertext.txt[this file] are encrypted with the caesar cipher, all messages are seperated with newline. Each line uses a different letter for the caesar-shifting.
  8. Your task is to decrypt all messages. Of course, this can simply be done by brute forcing each line and manually select the assumed semantic correct sentence. However, your task is trying to do the selection of the correct messages automatically.
  9. [TIP]
  10. ====
  11. The file link:./english_freq.txt[letter frequencies list] contains the statistical standard distribution of letters for the english language. _The first line corresponds to `A`, the last line corresponds to `Z`._
  12. Enhance your Frequency Analyzer and write a function that determines to what extend a given plaintext aligns with the standard distribution for the language. This can be done by using the so called *_chi square_* test: +
  13. stem:[\displaystyle \sum_{i=0}^{k=25}{\frac{(observed_i - expected_i)^2}{expected_i}}] +
  14. In each case, select the plaintext with the lowest score from the _chi square_ test.
  15. ====