Multiplicative Inverse. Affine Cipher

  • Thread starter Thread starter cks
  • Start date Start date
  • Tags Tags
    Inverse
AI Thread Summary
The discussion focuses on finding the multiplicative inverse of numbers in the context of the Affine Cipher using modular arithmetic. It demonstrates the process using the Extended Euclidean Algorithm, showing how to calculate a^(-1) for a=3 and a=5. For a=3, the inverse is determined to be 9, while for a=5, the calculation reveals that -5 is equivalent to 21 modulo 26. The thread clarifies that 5's inverse is not 15, as initially thought, but rather 21, since 5 multiplied by 21 equals 1 modulo 26. This highlights the importance of careful calculations in modular arithmetic for cryptographic applications.
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.
 
5-1 (mod 26) is NOT 15. 5*15= 75= 2*26+ 23. 5*16= 23 (mod 26), not 1.

5-1 (mod 26)= 26+ (-5)= 21. 5*21= 105= 4*26+ 1. 5*21= 1 (mod 26).

-5= 21 (mod 26).
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...

Similar threads

Back
Top