Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to calculate the Modular Multiplicative inverse of a number in the context of RSA encryption?

How to calculate the Modular Multiplicative inverse of a number in the context of RSA encryption?

like image 570
Marc Hoffer Avatar asked Jul 27 '10 14:07

Marc Hoffer


People also ask

How do you find the multiplicative inverse of a number modulo?

To find the multiplicative inverse of 'A' under 'M', we put b = M in the above formula. Since we know that A and M are relatively prime, we can put the value of gcd as 1. We can remove the second term on left side as 'My (mod M)' would always be 0 for an integer y.

Does RSA use modular arithmetic?

The RSA cipher, like the Diffie-Hellman key exchange we have already worked with, is based on properties of prime numbers and modular arithmetic. Alice chooses two different prime numbers, P and Q, which she keeps secret (in practice, P and Q are enormous — usually about 100 digits long).

Does RSA use modular exponentiation?

Rivest-Shamir-Adleman (RSA) is a widely used public key cryptographic method. The main operation performed in this method, for encryption and decryption, is modular exponentia- tion. The way modular exponentiation is computed make the system vulnerable to side- channel attacks.


1 Answers

Use the Extended Euclidean Algorithm, which is significantly faster than direct modular exponentiation in practice.

like image 185
BlueRaja - Danny Pflughoeft Avatar answered Sep 30 '22 18:09

BlueRaja - Danny Pflughoeft