Pohlig–Hellman algorithm: Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
Line 7:
'''Output''' Integer ''x'', such that ''e &#8801; g<sup>x</sup> (mod p)''.
 
#Use [[Euler's totient function]] to determine the prime factorization of the order of the group : <br><center><math>\varphi(p)\equiv= p_0\cdot p_1 \cdot \ldots \cdot p_n</math></center>
#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} \\