# Revision history [back]

Sage allows you to construct finite fields with a root of any irreducible polynomial as a generator. Thus

sage: PF2.<x> = GF(2)[]
sage: f = x^5 + x^2 + 1
sage: F32.<a> = GF(32, modulus=f)
sage: a.minimal_polynomial()
x^5 + x^2 + 1
sage: PF32.<s> = F32[]
sage: PF32.random_element().roots()
[(a^2 + a + 1, 1), (a^4 + a^3 + a^2, 1)]