Content deleted Content added
CRGreathouse (talk | contribs) complexity, attribution |
m p is not the order of the group. The totient is. |
||
Line 8:
:'''Output''' Integer ''x'', such that ''e ≡ g<sup>x</sup> (mod p)''.
:#Determine the prime factorization
:#From the [[remainder theorem]] we know that ''x = a<sub>1</sub> p<sub>1</sub> + b<sub>1</sub>''. We now find the value of ''b<sub>1</sub>'' for which the following equation holds using a fast algorithm such as [[Baby-step giant-step]] :<br> <center><math>
\begin{matrix}e^{\varphi(p)/p_1} & \equiv & (g^x)^{\varphi(p)/p_1} \pmod{p} \\
|