The arithmetic underneath RSA, Diffie-Hellman and every classical cipher on this site. Six calculators, each showing the full working rather than just an answer — because in cryptography the algorithm is the point.
Finds gcd(a, b) and integers x, y with ax + by = gcd(a, b).
Finds a−1 with a · a−1 ≡ 1 (mod m). Exists exactly when gcd(a, m) = 1.
Square-and-multiply: a 2048-bit exponent takes about 2048 squarings, not 22048 multiplications. This is what makes RSA possible.
Factors n, tests primality, and computes φ(n) — the count of integers below n coprime to it. RSA's private key depends on φ(n).
Solves a system of congruences with pairwise coprime moduli. RSA decryption is roughly four times faster done this way.
a^-1 a = 1 mod m a^phi(n) = 1 mod n c = m^e mod n
Euclidean algorithm. Repeated division to find gcd(a, b). It is astonishingly fast — the number of steps is proportional to the number of digits, not the size of the numbers.
Extended Euclid. The same divisions run backwards give x and y with ax + by = gcd(a, b). Setting gcd = 1 yields the modular inverse, which is how RSA computes the private exponent d from e.
Square-and-multiply. Computing me mod n by repeated squaring turns an impossible calculation into a few thousand multiplications. Without it, public-key cryptography would not exist.
Euler's φ. For a prime p, φ(p) = p − 1; for n = pq, φ(n) = (p−1)(q−1). Euler's theorem then says aφ(n) ≡ 1, and RSA is built directly on that.
The answers here are easy to get from any calculator. The algorithms are the content, for two reasons:
The tool shows the mechanism — the slides show why it is built that way.
gcd, modular inverses and Euler's theorem stop being abstract the moment you see RSA built out of them. One-on-one tutoring makes that connection explicit.