Decrypting an Affine Cipher $ e(m)=am+b\pmod{27}$ knowing $e(8)\equiv 14$ and $e(26)\equiv 5$

68 Views Asked by At

I began by setting up a system of linear equations: $$14\equiv 8a+b \pmod{27}$$ $$5\equiv 26a+b\pmod{27}$$ and then subtracted them to get: $9\equiv 9a \pmod{27}$. I know $9$ doesn't have a multiplicative inverse modulo $27$ but $a=1$ would solve this. I'm afraid I must be making some mistake somewhere, however, as solving this all the way through gives me $b=6$ and then translating the message doesn't quite make sense.

2

There are 2 best solutions below

3
On BEST ANSWER

$$9a\equiv 9 \mod{27}$$ $$a \equiv1 \mod3$$ $$\therefore a=1+3k$$ $$b\equiv14-8a \mod{27}$$ $$b=14-8(1+3k)+27m$$ $$\therefore b=6-24k+27m$$ Where $k,m\in\mathbb{Z}$.

5
On

$9\equiv 9a \ \pmod{27} \Rightarrow 9(1-a)\equiv 0\ \pmod{27} \Rightarrow 1-a\equiv 0 \pmod{3} \Rightarrow a=1+3k,\ k\in\mathbb{Z}$