How to calculate the Modular Multiplicative inverse of a number in the context of RSA encryption?
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.
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).
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.
Use the Extended Euclidean Algorithm, which is significantly faster than direct modular exponentiation in practice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With