Research Article

An Efficient Collision Detection Method for Computing Discrete Logarithms with Pollard's Rho

Algorithm 1

The new algorithm for collision detection.
Input: Initial value 𝑌 0 , iteration function 𝐹 𝐺 𝐺 , fixed integer 𝑁
Output: 𝑚 and 𝑛 , such that 𝑌 𝑚 = 𝑌 𝑛
(1) 𝑤 𝑌 0 , 𝑚 0 , 𝑛 0
(2) for 𝑖 = 1 to | 𝐺 | / 𝑁   do
(3)  for 𝑗 = ( 𝑖 1 ) 𝑁 + 1 to 𝑖 𝑁 1   do
(4)    𝑌 𝑗 𝐹 ( 𝑌 𝑗 1 )
(5)   if 𝑌 𝑗 < 𝑤 then
(6)     𝑤 𝑌 𝑗 , 𝑛 𝑗
(7)   else if 𝑌 𝑗 = 𝑤   then
(8)     𝑚 𝑗
(9)    return   𝑚 , 𝑛
(10)  end if
(11)   end for
(12)
(13)   for 𝑘 = 1 to 𝑖 1   do
(14)     if 𝑢 𝑘 = 𝑤   then
(15)      𝑚 𝑣 𝑘
(16)     return   𝑚 , 𝑛
(17)   end if
(18)  end for
(19)   𝑢 𝑖 𝑤 , 𝑣 𝑖 𝑛
(20)   𝑤 𝐹 ( 𝑌 𝑖 𝑁 1 ) , 𝑛 𝑖 𝑁
(21) end for