Pollard's rho algorithm for logarithms: Difference between revisions

Content deleted Content added
The modulus p was wrong, since we are tracking the exponents in the group of unit Z/pZ^x, hence the modulus p-1 should be right (by Fermat's little theorem).
No edit summary
Line 23:
g(x,n) &= \begin{cases}
n & x\in S_0\\
2n \pmod {p-1} & x\in S_1\\
n+1 \pmod {p-1} & x\in S_2
\end{cases}
\\
h(x,n) &= \begin{cases}
n+1 \pmod {p-1} & x\in S_0\\
2n \pmod {p-1} & x\in S_1\\
n & x\in S_2
\end{cases}