I was checking the following Affine Cipher / modular aritmethic exercise:
You intercept a ciphertext
YFWD
, which was ciphered using an affine cipher. You know that the plaintext starts inST
, find the cipher function and the plaintext $\pmod{26}$
I know $Y → S$ and $F→T$ , also $Y=24,S=18,T=19,F=5$
I've been trying to start from a congruence's equation system like this one:
$$\begin{cases}25 & \equiv & 18a+b\pmod{26}\\
5 &\equiv & 20a+b \pmod{26}\end{cases}$$
From this point I can't find a way to solve the system, so any help will be really appreciated.
Best Answer
Subtracting \begin{cases}25 \equiv & 18a+b\pmod{26}\\ 5 \equiv & 20a+b \pmod{26}\end{cases} gives $-20\equiv 2a\pmod{26}$, from which $a\equiv -10\equiv 3\pmod{13}$, that's $a\equiv 3\pmod{26}\lor a\equiv 16\pmod{26}$. In both cases, we get $b\equiv 23\pmod{26}$.
Consequently, the pairs $(a,b)$ of solutions modulo $26$ are: \begin{align} &(3,23)&&(16,23) \end{align}