Multiplicative Inverse. Affine Cipher

  • Thread starter Thread starter cks
  • Start date Start date
  • Tags Tags
    Inverse
Click For Summary
SUMMARY

The discussion focuses on calculating the multiplicative inverse in the context of the Affine Cipher using modular arithmetic. Specifically, it demonstrates how to find the inverse of integers modulo 26 using the Extended Euclidean Algorithm. For example, the multiplicative inverse of 3 modulo 26 is 9, while for 5, it is 21. The calculations confirm that both results satisfy the condition of the multiplicative inverse, where the product of the number and its inverse equals 1 modulo 26.

PREREQUISITES
  • Understanding of modular arithmetic
  • Familiarity with the Extended Euclidean Algorithm
  • Basic knowledge of the Affine Cipher
  • Ability to perform calculations with integers modulo 26
NEXT STEPS
  • Study the Extended Euclidean Algorithm in detail
  • Learn about the Affine Cipher and its encryption/decryption processes
  • Explore other examples of finding multiplicative inverses in different moduli
  • Investigate the applications of modular arithmetic in cryptography
USEFUL FOR

Cryptography enthusiasts, mathematicians, and computer scientists interested in modular arithmetic and its applications in encryption algorithms like the Affine Cipher.

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).
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 48 ·
2
Replies
48
Views
16K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 12 ·
Replies
12
Views
11K