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(p) but 5 is. (Since 5 is also a prime, you could also have done g2.divides(p-1) instead) Best, Johan Panos Phronimos writes: > 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 calculate it? > > Thanks in advance, > Panos -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.