Math 2.0

Number theory Concept

Modular exponentiation

Summary

Modular exponentiation computes be mod mb^e \bmod m for integers bb, e≥0e \ge 0 and m≥1m \ge 1. The binary method writes ee in base 22. It squares bb again and again modulo mm, and it multiplies the squares b2ib^{2^i} for the bits ii of ee that are 11. It needs about 2log⁡2e2 \log_2 e multiplications modulo mm, and each intermediate number is smaller than m2m^2.

Remarks

The method is correct because of compatibility with multiplication: one can reduce modulo mm after each multiplication. The Fermat primality test, the RSA cryptosystem and the Diffie–Hellman key exchange all use modular exponentiation. The inverse problem, to find ee from bb, mm and be mod mb^e \bmod m, is the discrete logarithm problem. It seems much harder.

Where this leads

5 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Modular_exponentiation, Right-to-left binary method
About this page
Tag04DR5PM25N
URIm2://04DR5PM25N
Aliasesbinary-exponentiation, square-and-multiply
Kindconcept
WritingW0 stub
MSC11Y16
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by