Message to decipher: ZWSTO BPJOG BYQIP JOUWO OZGVS MPJOS MPQAI
We are just leaning Caesar Ciphering in class and im kinda confused. I know that to do this we need the equation C is congruent to rP + s (mod 26). Based off the encrypted code we have O being the most frequent letter and P being the second most frequent letter. So i think O corresponds with the letter E and P corresponds to the letter T. I am having trouble calculating r and s and would like some help. Thank you. Pretty sure the answer is ( Number Theory is the queen of mathematics) however i dont know how to get to the answer.
$$f(k) = rk + s\pmod{26}$$ $$f(\mathtt{E}) =\mathtt{O}\qquad\qquad4r+s \equiv 14\pmod{26}$$ $$f(\mathtt{T}) = \mathtt{P}\qquad\qquad19r+s \equiv 15\pmod{26}$$
Taking the difference, we have $15r = 1 \pmod{26}$.
The solution for $r$ is unique: $r=7$ ($15 \cdot 7 = 105 = 4\cdot 26 + 1)$. I personally found it by trying $15\cdot r \pmod{26}$ for all possible values of $r$. I'm not sure if there's an easier way to do division in modular arithmetic.
Using the solution for $r$, we can plug in to one of our equations to find $s$: $4r + s \equiv 14$ means that $14 \equiv 28+s \equiv 26+2+s$ so $s \equiv 12 \pmod{26}$.
The overall enciphering function, according to our guess, is $f(k) = 7k + 12\pmod{26}.$ We can create a table to show how each letter is enciphered (Note that as a check, our assumed correspondences $\mathtt E\mapsto \mathtt{O}$ and $\mathtt{T}\mapsto\mathtt{P}$ occur in the table.):
$$\begin{array}{cc|cc} k & && f(k) \\\hline 0 & \mathtt A & \mathtt M & 12 \\ 1 & \mathtt B & \mathtt T & 19 \\ 2 & \mathtt C & \mathtt A & 0 \\ 3 & \mathtt D & \mathtt H & 7 \\ 4 & \mathtt E & \mathtt O & 14 \\ 5 & \mathtt F & \mathtt V & 21 \\ 6 & \mathtt G & \mathtt C & 2 \\ 7 & \mathtt H & \mathtt J & 9 \\ 8 & \mathtt I & \mathtt Q & 16 \\ 9 & \mathtt J & \mathtt X & 23 \\ 10 & \mathtt K & \mathtt E & 4 \\ 11 & \mathtt L & \mathtt L & 11 \\ 12 & \mathtt M & \mathtt S & 18 \\ 13 & \mathtt N & \mathtt Z & 25 \\ 14 & \mathtt O & \mathtt G & 6 \\ 15 & \mathtt P & \mathtt N & 13 \\ 16 & \mathtt Q & \mathtt U & 20 \\ 17 & \mathtt R & \mathtt B & 1 \\ 18 & \mathtt S & \mathtt I & 8 \\ 19 & \mathtt T & \mathtt P & 15 \\ 20 & \mathtt U & \mathtt W & 22 \\ 21 & \mathtt V & \mathtt D & 3 \\ 22 & \mathtt W & \mathtt K & 10 \\ 23 & \mathtt X & \mathtt R & 17 \\ 24 & \mathtt Y & \mathtt Y & 24 \\ 25 & \mathtt Z & \mathtt F & 5 \\ \end{array}$$
For easy deciphering, we may want to sort the table according to $f(k)$.
$$\begin{array}{cc|cc} k & && f(k) \\\hline 2 & \mathtt C & \mathtt A & 0 \\ 17 & \mathtt R & \mathtt B & 1 \\ 6 & \mathtt G & \mathtt C & 2 \\ 21 & \mathtt V & \mathtt D & 3 \\ 10 & \mathtt K & \mathtt E & 4 \\ 25 & \mathtt Z & \mathtt F & 5 \\ 14 & \mathtt O & \mathtt G & 6 \\ 3 & \mathtt D & \mathtt H & 7 \\ 18 & \mathtt S & \mathtt I & 8 \\ 7 & \mathtt H & \mathtt J & 9 \\ 22 & \mathtt W & \mathtt K & 10 \\ 11 & \mathtt L & \mathtt L & 11 \\ 0 & \mathtt A & \mathtt M & 12 \\ 15 & \mathtt P & \mathtt N & 13 \\ 4 & \mathtt E & \mathtt O & 14 \\ 19 & \mathtt T & \mathtt P & 15 \\ 8 & \mathtt I & \mathtt Q & 16 \\ 23 & \mathtt X & \mathtt R & 17 \\ 12 & \mathtt M & \mathtt S & 18 \\ 1 & \mathtt B & \mathtt T & 19 \\ 16 & \mathtt Q & \mathtt U & 20 \\ 5 & \mathtt F & \mathtt V & 21 \\ 20 & \mathtt U & \mathtt W & 22 \\ 9 & \mathtt J & \mathtt X & 23 \\ 24 & \mathtt Y & \mathtt Y & 24 \\ 13 & \mathtt N & \mathtt Z & 25 \\ \end{array}$$
To decipher the message $\mathtt{ZWSTO BPJOG BYQIP JOUWO OZGVS MPJOS MPQAI}$, we look up each letter in the right column of the table, and see what it deciphers to in the left column. For example, we see that $\mathtt{Z}$ deciphers to $\mathtt{N}$, and $\mathtt{W}$ deciphers to $\mathtt{U}$.
Continuing in this way, we find that the original, plaintext message is apparently the following statement: