I am working on an example of Affine cipher
, the decryption function is:
$$ x=Dk(y)=7^{-1}(y-3) mod 26 $$
I didn't understand how 7 inverse is 15?
$$ 7^{-1} = 15 $$
Please help me to understand this.
I am working on an example of Affine cipher
, the decryption function is:
$$ x=Dk(y)=7^{-1}(y-3) mod 26 $$
I didn't understand how 7 inverse is 15?
$$ 7^{-1} = 15 $$
Please help me to understand this.
$7^{-1}$ is actually $7\,\,mod\,\,26$ here.Using Euclid' Algorithm
$\Rightarrow26=7*3+5$
$\Rightarrow 7=5*1+2$
$\Rightarrow 5=2*2+1$
$\Rightarrow 2=1*2+0$
Now use Back Substitution,
$\Rightarrow 1=5-2*2$
$\Rightarrow 1=5-2*\left(7-5*1\right)$
$\Rightarrow 1=3*5-2*7$
$\Rightarrow 1=3*\left(26-7*3\right)-2*7$
$\Rightarrow 1=26*3-7*11$
using bezout coefficients
-11 is the inverse of $7\,\,mod\,\,26$
or we can write
$26-11=15$ is also inverse of $7\,\,mod\,\,26$