Multiplicative Inverse. Affine Cipher

  • Thread starter Thread starter cks
  • Start date Start date
  • Tags Tags
    Inverse
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 12K views
cks
Messages
164
Reaction score
0
Here is how to find the a^(-1)

According to the definition,

aa^(-1)=1mod (26)

For example, let’s try a=3

According to Extended Euclidean Algorithm

gcd⁡(a,26)=gcd⁡(3,26)=gcd⁡(3,2)=gcd⁡(1,2)
Where
1=3-1*2
2=26-8*3
1=3-1*(26-8*3)=-1*26+9*3

With 9 found,
a^(-1)=9

However, to find a=5
gcd⁡(5,26)=gcd⁡(5,1)
1=1*26-5*5

So,a^(-1)=-5?

(-5)(5)=1mod(26) which is correct

How to get a^(-1) in this case as shown in the table which is 15?
 
Physics news on Phys.org
I manage to solve the problems. Never mind. Thank you.