How to Use
Enter a and m:
- a: Number to invert
- m: Modulus
- Output: a⁻¹ mod m
Extended Euclidean
Compute gcd(a,m) while tracking coefficients x,y such that ax+my=gcd. If gcd=1, x mod m is the inverse.
Cryptography
RSA: choose e, compute d = e⁻¹ mod φ(n). d is the private key. Without efficient modular inverse, RSA key generation is impossible.
Step-by-Step Instructions
- 1Enter a.
- 2Enter modulus m.
- 3View inverse (if exists).
- 4See algorithm steps.
- 5Verify a × a⁻¹ ≡ 1 (mod m).