## Cryptanalysis

The goal of cryptanalysis is gaining knowledge of the encrypted text without the key.

A distinction is made for different attack scenarios:

**Ciphertext-only**

Only the encrypted text is known. Plaintext (and key) are looked for.

**Probable Plaintext**

The encrypted text is known and one can assume that the message contained follows a certain pattern. The used key is looked for.

**Known Plaintext**

An encrypted text and its plaintext is known. The goal is to determine the key.

**Chosen Plaintext**

One can freely choose a text that is to be encrypted and subsequently has access to the resulting encrypted text.

**Chosen Ciphertext**

One can temporarily generate the decrypted text from an assortment of corresponding encrypted text of one’s own choice.

Try a ciphertext-only attack against the Caesar cipher by performing a frequency analysis:

*URKAG QZODK BFMPA OGYQZ FFTQD QEGXF IUXXN QETAI ZUZMZ QIEGN IUZPA IFTQF UFXQA RFTQD QEGXF UZSIU ZPAIO AZFMU ZENAF TFTQZ MYQAR FTQAD USUZM XPAOG YQZFM ZPFTQ QZODK BFUAZ WQKGE QPFTQ GEMSQ ARWQK EUEEG BBADF QPNKF IAEBQ OUMXU OAZEO XUOWU ZSFTQ UOAZE TAIWQ KMXXA IEKAG FAEFA DQMOA BKARF TQWQK GEQPR DAYMD QEGXF UZSIU ZPAIU ZFAMZ UZFQD ZMXEF ADMSQ URKAG FTQZQ ZODKB FMZAF TQDPA OGYQZ FIUFT FTQEM YQQZO DKBFU AZYQF TAPFT QUOAZ UZEQD FWQKU EMOFU HQIUF TUZFT QWQKQ ZFDKP UMXAS NAJFT UEUET QXBRG XQEBQ OUMXX KIUFT YADQO AYBXQ JWQKE*

**Hint:**

The most frequently used character in English is "E". Determine the offset of the most frequently reoccurring character and of "E".

For example, the character "G" is the most frequently used character in a text. "G" is the 7th character of the alphabet, "E" is the 5th. The shift value of the Caesar cipher is 7-5=2. The key is 2.