Here is how to find the a^(-1)(adsbygoogle = window.adsbygoogle || []).push({});

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 Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Multiplicative Inverse. Affine Cipher

**Physics Forums | Science Articles, Homework Help, Discussion**