[Primes Home][Home]
In cryptography, such as in the RSA, Diffie Hellman and Discrete Logarithm methods, we often use the operation of \(a^p \pmod N\). Unfortunately \(a^p\) can be extremely large and difficult to compute. So in this example we use a faster algorithm where we significantly reduce the number and complexity of the operations: