Content deleted Content added
m fix incorrect use of i.e. versus e.g. |
→Using Euler's theorem: clarity |
||
Line 116:
This method is generally slower than the extended Euclidean algorithm, but is sometimes used when an implementation for modular exponentiation is already available. Some disadvantages of this method include:
*The value <math>\phi (m)</math> must be known and the most efficient known computation requires {{mvar|m}}'s [[factorization]]. Factorization is widely believed to be a computationally hard problem. However, calculating <math>\phi (m)</math> is straightforward when the prime factorization of {{mvar|m}} is known.
*The relative cost of exponentiation. Though it can be implemented more efficiently using [[modular exponentiation]], when large values of {{mvar|m}} are involved this is most efficiently computed with the [[Montgomery reduction]] method
One notable ''advantage'' of this technique is that there are no conditional branches which depend on the value of {{mvar|a}}, and thus the value of {{mvar|a}}, which may be an important secret in [[public-key cryptography]], can be protected from [[side-channel attack]]s. For this reason, the standard implementation of [[Curve25519]] uses this technique to compute an inverse.
|