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_log(K(1), K(3), bounds=(1,2^30), algorithm="lambda", operation="*") d <= 2^30 # False 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) On 6/30/24 4:10 PM, Georgi Guninski wrote: > 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 subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/5dbc76b5-c354-49b2-b721-ef29e7461716%40gmail.com.