Work out modular exponentiation instantly with clear inputs, formula shown and shareable results.
Repeated squaring computes bᵉ mod m in about log₂ e multiplications, reducing modulo m at each step so the numbers never grow. Computing bᵉ directly would be astronomically large.
Fast exponentiation
b^(2k) = (b^k)², b^(2k+1) = b·(b^k)², reducing mod m at every step
460. Since 561 = 3 × 11 × 17, the residues 1, 9 and 1 combine by the Chinese remainder theorem to give 460 — reached in just eight squarings.
RSA and Diffie-Hellman raise numbers to exponents with hundreds of digits; only modular exponentiation makes that feasible.