Recent from talks
Pollard's rho algorithm for logarithms
Knowledge base stats:
Talk channels stats:
Members stats:
Pollard's rho algorithm for logarithms
Pollard's rho algorithm for logarithms is an algorithm introduced by John Pollard in 1978 to solve the discrete logarithm problem, analogous to Pollard's rho algorithm to solve the integer factorization problem.
The goal is to compute such that , where belongs to a cyclic group generated by . The algorithm computes integers , , , and such that . If the underlying group is cyclic of order , by substituting as and noting that two powers are equal if and only if the exponents are equivalent modulo the order of the base, in this case modulo , we get that is one of the solutions of the equation . Solutions to this equation are easily obtained using the extended Euclidean algorithm.
To find the needed , , , and the algorithm uses Floyd's cycle-finding algorithm to find a cycle in the sequence , where the function is assumed to be random-looking and thus is likely to enter into a loop of approximate length after steps. One way to define such a function is to use the following rules: Partition into three disjoint subsets , , and of approximately equal size using a hash function. If is in then double both and ; if then increment , if then increment .
Let be a cyclic group of order , and given , and a partition , let be the map
and define maps and by
Consider, for example, the group generated by 2 modulo (the order of the group is , 2 generates the group of units modulo 1019). The algorithm is implemented by the following C++ program:
The results are as follows (edited):
That is and so , for which is a solution as expected. As is not prime, there is another solution , for which holds.
Hub AI
Pollard's rho algorithm for logarithms AI simulator
(@Pollard's rho algorithm for logarithms_simulator)
Pollard's rho algorithm for logarithms
Pollard's rho algorithm for logarithms is an algorithm introduced by John Pollard in 1978 to solve the discrete logarithm problem, analogous to Pollard's rho algorithm to solve the integer factorization problem.
The goal is to compute such that , where belongs to a cyclic group generated by . The algorithm computes integers , , , and such that . If the underlying group is cyclic of order , by substituting as and noting that two powers are equal if and only if the exponents are equivalent modulo the order of the base, in this case modulo , we get that is one of the solutions of the equation . Solutions to this equation are easily obtained using the extended Euclidean algorithm.
To find the needed , , , and the algorithm uses Floyd's cycle-finding algorithm to find a cycle in the sequence , where the function is assumed to be random-looking and thus is likely to enter into a loop of approximate length after steps. One way to define such a function is to use the following rules: Partition into three disjoint subsets , , and of approximately equal size using a hash function. If is in then double both and ; if then increment , if then increment .
Let be a cyclic group of order , and given , and a partition , let be the map
and define maps and by
Consider, for example, the group generated by 2 modulo (the order of the group is , 2 generates the group of units modulo 1019). The algorithm is implemented by the following C++ program:
The results are as follows (edited):
That is and so , for which is a solution as expected. As is not prime, there is another solution , for which holds.