# How to list all elements of finite field (e.g., GF(2^5)) with trace 1.

Note that trace is defined over finite field GF(2^n) as Tr(x)=\sum_{ i=1}^{k} X^{2^{n-1}}.

edit retag close merge delete

1

What did you try? Do you know how to list all elements of GF(2^5) in SageMath?

( 2017-08-14 19:51:20 +0200 )edit

The lines

sage: K.<a> = GF( 2^5 )
sage: K
Finite Field in a of size 2^5


initialize the field $K$. Since the generator $a$ has minimal polynomial

sage: a.minpoly()
x^5 + x^2 + 1


its trace, resp. norm are unsurprisingly (coefficients in degrees four and zero)

sage: a.trace()
0
sage: a.norm()
1


The list of the elements of norm one can be computed by list comprehension, just take a glance at:

sage: [ x for x in K if x.norm() == 1 ]


and the mathematical version of it: $${ \ x \ : \ x\in K\text{ with norm}(x) = 1\ }\ .$$

Which is the command line for the list of elements of trace one in $K$?

How many elements of trace one are in $K$?

How many elements of norm one are in $K$?

( 2017-08-15 19:22:23 +0200 )edit