On 4 May 2014 13:20, Jan Medina <
janme...@gmail.com> wrote:
> But the log() function works on a finite field too. So its not correct if a
> i use the log on finite fields?
OK -- you did not explain at all what is was that you were doing, na d
I could not guess!
>
> I wan to calculate log(\theta+i,\theta) for i in a finte field and theta a
> primtive element
>
You can see the documentation of this function like this:
sage: F=GF(101)
sage: a=F(3)
sage: a.log?
and even the code using a.log??, which reveals that in prime fields it
calls the pari library while in the general case it uses the
discrete_log function which is a completely generic implementation
(using either baby-step-giant-step or rho), hence fine for
small-medium fields but no good for large ones.
e.g.
sage: F=GF(101^3,'a')
sage: theta = F.primitive_element()
sage: [log(theta+i,theta) for i in range(10)]
[1, 596770, 963004, 681797, 310936, 434845, 968831, 682947, 790282, 125599]
John