Hi everyone, > > I was just doing a routine check for a Chaum-van Antwerpen Signature > Scheme public parameter set(p=2q+1, p,q both odd primes) and in checking a > small prime, it told me that it was composite. I'm not sure if it's just my > build, but obviously I can't have this happening without understanding why. > Any clues as to what could be wrong in my setup? > > thanks >
No, this is confusing, but it behaves as documented. The problem is: sage: parent(q) Rational Field so q is a rational number. In the rational numbers, non-zero elements are units and hence not prime. Division of integers yields a rational number. If you want to get an integer out, use // instead: sage: q=(p-1)//2 sage: q.is_prime() True -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
