I am trying to calculate an x, such that t = g^x mod p (I need to crack a weak elgamal encryption for university). I found gdlog, but I cant figure out how I can use the input to calculate my x. Here is what we got (from gdlogs example code):
p:1000000000000000000000000000057 //prime number, modulus
t:519335238006017621936447751736 //member of the group
GDlogs result: Logarithm of the 519335238006017621936447751736 to the 5 is 142363323. My question is: What is the number that GDlog outputs (142363323)? This is what is written in the README:
Find 0 <= x < q - 1 such that g^(x*(p-1)/q) mod p = b^((p-1)/q) mod p (assuming that such x exists).
But I still can't figure out how to do it.