Pollard Rho - DLP Algorithm Implementation

593 Views Asked by At

I am working with Pollard Rho Algorithm DLP. I have developed in Java and Python the way to calculate the table to find the collisions, and then using congruences and some others tricks I am getting a solution for

$g^x = h \bmod{p} $

(DLP)

So with normal numbers I can find solutions of $x$

for example $19^x = 24717 \bmod{48611}$, (we can see that $48611$ is prime number) in this case $x = 37869$

(this is the example of the book "An Introduction to Mathematical Cryptography"of Hoffstein, Pipher and Silverman )

but for example if I try to do:

$2^x = 2063614956960 \bmod{2199023255561}$

In Python is no working and in Java is taking long time (with some silly calculus calculus it will take 15 days to check all the options).

However I have realised that $2199023255561$ is no prime, is generated by $11$, that is, $2199023255561 \bmod{11} = 0$

and

$2063614956960 \bmod{11} = 7$

so I am remembering some basic concepts of discrete maths, but I am not sure which theorem is, maybe Euler o Lagrant (I am guessing),

I would like to reduce the equation to smallest possible like :

$2^x = 7 \mod{11}$

this equation I can process quickly and the result is $ x = 7$

my question is, if my logic is ok and can I do it ?

some mathematic rules is supporting me?

and If I am wrong (is more possible), Someone can help how can I reduce the equation?