Python Forum

Full Version: Finite fields (Galois library)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Say, I want a finite field containing $2^n$ elements for some positive $n$. How to get a single random primitive element in Python, different from that provided by the Conway polynomial, or a specific set of different primitive elements?

I know that Python's Galois library gives the option to calculate "GF.primitive_elements" or "GF.primitive_element" but I need two things:

1. Only one primitive element (not all) for each primitive polynomial (Referring to the method "GF.primitive_elements").

2. A single random primitive element different from that provided by the Conway polynomial (Referring to the method "GF.primitive_element")