> Instead, the algorithm should error out, since number theory shows there's no
> non-zero (mod 2^61 - 2) solution to 3^a = 1 mod (2^61 - 1)
Why do you reduce (mod p-1)?
(p-1) is valid integer solution by Euler's theorem.
--
You received this message because you are subscribed to the Google Grou
I think so too. Here's a more minimal version (note a == 1 in your example):
p = 31
g = GF(31)(3)
discrete_log(1, g, bounds=(1, 6), algorithm="lambda", operation="*")
# 6
g^6
# 16
It seems there's some serious bugs going on, as the return value isn't in the
bounds:
K = GF(2^61 - 1)
d = discrete_
I think this is bug:
p=2**61-1;Kp=GF(p);g=Kp(3);X=p//3;a=g**X
dl=discrete_log(a,g,bounds=(1,p.isqrt()),algorithm="lambda",operation="*")
dl2=discrete_log(a,g,bounds=(1,p),algorithm="lambda",operation="*")
(g**dl==a,g**dl2==a)
#(False, True)
--
You received this message because you are subscribe