Re: [sage-support] Discrete Logarithm

2017-05-12 Thread Justin C. Walker
On May 12, 2017, at 20:52 , Venkataraman S wrote: > I vaguely remember that if one can quickly find a quadratic non-residue, one > can find a primitive root fast. I don't remember the exact connection now. > Does anybody in the group have any reference? Internet search can be helpful in times

Re: [sage-support] Discrete Logarithm

2017-05-12 Thread Venkataraman S
I vaguely remember that if one can quickly find a quadratic non-residue, one can find a primitive root fast. I don't remember the exact connection now. Does anybody in the group have any reference? -- You received this message because you are subscribed to the Google Groups "sage-support" gro

Re: [sage-support] Discrete Logarithm

2017-05-12 Thread Dima Pasechnik
One way or the other, the bottleneck is in the primitivity test. On Friday, May 12, 2017 at 4:36:20 AM UTC+1, Venkataraman S wrote: > > The German school thinks differently. There is a different (well known) > algorithm due to Gauss. Take an arbitrary number a coprime to p. Find its > order. If

Re: [sage-support] Discrete Logarithm

2017-05-11 Thread Venkataraman S
The German school thinks differently. There is a different (well known) algorithm due to Gauss. Take an arbitrary number a coprime to p. Find its order. If it is the primitive root, we are done. If not, choose another b and check whether order of ab is greater than the order of a. If it is, repl

Re: [sage-support] Discrete Logarithm

2017-05-11 Thread Johan S . H . Rosenkilde
> Not really: generators of the additive group are coprime to p, not to p-1. > > Perhaps Johan was thinking of the fact that if g is one multiplicative > generator (aka primitive root) then g^k is another if and only if > gcd(k,p-1)=1. I think I should just not answer sage-support questions before

Re: [sage-support] Discrete Logarithm

2017-05-11 Thread Johan S . H . Rosenkilde
> "primitive element" is meant as "generator for the multiplicative group > GF(p)^*" and not the additive group GF(p). The OP question is about the > former and Johan answer is about the latter. Yes, I just realised that too - sorry about the noise. I'll think more about the multiplicative group

Re: [sage-support] Discrete Logarithm

2017-05-11 Thread John Cremona
On 11 May 2017 at 08:16, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > Hi, > > "primitive element" is meant as "generator for the multiplicative group > GF(p)^*" and not the additive group GF(p). The OP question is about the > former and Johan answer is about the latter. Not really: gener

Re: [sage-support] Discrete Logarithm

2017-05-11 Thread Vincent Delecroix
Hi, "primitive element" is meant as "generator for the multiplicative group GF(p)^*" and not the additive group GF(p). The OP question is about the former and Johan answer is about the latter. For very large p such as what you asked for is likely to be delicate (but I am not a specialist).

Re: [sage-support] Discrete Logarithm

2017-05-10 Thread Johan S . H . Rosenkilde
Hi Panos In GF(p) then an element g is primitive if its embedding into ZZ is coprime with p-1. Since Euclidean algorithm is so fast, you can test this: sage: p = Primes().next(2^2048) #long sage: g1 = 3 sage: gcd(g1, p-1) 3 sage: g2 = 5 sage: gcd(g2, p-1) 1 So 3 is not a primitive element in GF(

[sage-support] Discrete Logarithm

2017-05-10 Thread Panos Phronimos
Hello everyone, I am trying to calculate a primitive element (g) of a big Finite Field: GF(p) where p is prime number > 2^2048 So then, i could share a secret integer (r) as: m=g^r, but it seems impossible to calculate it with function primitive_element() Is there another way i can use to calcu

Re: [sage-support] Discrete Logarithm Algorithm

2014-05-04 Thread John Cremona
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

Re: [sage-support] Discrete Logarithm Algorithm

2014-05-04 Thread Jan Medina
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

Re: [sage-support] Discrete Logarithm Algorithm

2014-05-04 Thread 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_l

[sage-support] Discrete Logarithm Algorithm

2014-05-03 Thread Jan Medina
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,

Re: [sage-support] Discrete logarithm

2012-05-26 Thread Robert Bradshaw
sage: var('x,y') (x, y) sage: E = EllipticCurve(y^2 == x^3 - 36*x) sage: P=E(-3,9) sage: Q=E(12,36) sage: discrete_log(Q, P, operation='+', bounds=(0,100)) --- ValueErrorTraceback (most recent c

[sage-support] Discrete logarithm

2012-05-26 Thread raman kurdi
Hi Dears, I have the elliptic curve Y^2=X^3-36X and P=(-3,9) as the its generator. Q=(12,36) is the other point on this curve. I would like to solve Discrete Logarithm but I do not know. Please tell me how I can find the "n" which nQ=p. Best, Raman -- To post to this group, send email to sage-sup