Re: [sage-support] Discrete Logarithm Algorithm
On 4 May 2014 13:20, Jan Medina 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 > > 2014-05-04 6:07 GMT-05:00 John Cremona : >> >> log() is a function you would apply to numbers, say real or complex: >> >> sage: a = RealField(100)(2) >> sage: a.log() >> 0.69314718055994530941723212146 >> >> while discrete_log() is something to do in a finite cyclic group. For >> example: >> >> sage: F = FiniteField(101) >> sage: a = F(2) >> sage: b = a^67 >> sage: discrete_log(b,a) >> 67 >> >> John >> >> On 4 May 2014 02:17, Jan Medina wrote: >> > Hi everybody. >> > >> > I want to know what algorithm are implemented for calculate log() and >> > discrete log(). and what are the differences? >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "sage-support" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to sage-support+unsubscr...@googlegroups.com. >> > To post to this group, send email to sage-support@googlegroups.com. >> > Visit this group at http://groups.google.com/group/sage-support. >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "sage-support" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/sage-support/mbx4_5AN208/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> sage-support+unsubscr...@googlegroups.com. >> >> To post to this group, send email to sage-support@googlegroups.com. >> Visit this group at http://groups.google.com/group/sage-support. >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Discrete Logarithm Algorithm
But the log() function works on a finite field too. So its not correct if a i use the log on finite fields? I wan to calculate log(\theta+i,\theta) for i in a finte field and theta a primtive element 2014-05-04 6:07 GMT-05:00 John Cremona : > log() is a function you would apply to numbers, say real or complex: > > sage: a = RealField(100)(2) > sage: a.log() > 0.69314718055994530941723212146 > > while discrete_log() is something to do in a finite cyclic group. For > example: > > sage: F = FiniteField(101) > sage: a = F(2) > sage: b = a^67 > sage: discrete_log(b,a) > 67 > > John > > On 4 May 2014 02:17, Jan Medina wrote: > > Hi everybody. > > > > I want to know what algorithm are implemented for calculate log() and > > discrete log(). and what are the differences? > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sage-support" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to sage-support+unsubscr...@googlegroups.com. > > To post to this group, send email to sage-support@googlegroups.com. > > Visit this group at http://groups.google.com/group/sage-support. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sage-support" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-support/mbx4_5AN208/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Discrete Logarithm Algorithm
log() is a function you would apply to numbers, say real or complex: sage: a = RealField(100)(2) sage: a.log() 0.69314718055994530941723212146 while discrete_log() is something to do in a finite cyclic group. For example: sage: F = FiniteField(101) sage: a = F(2) sage: b = a^67 sage: discrete_log(b,a) 67 John On 4 May 2014 02:17, Jan Medina wrote: > Hi everybody. > > I want to know what algorithm are implemented for calculate log() and > discrete log(). and what are the differences? > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.