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

asked 2017-08-14 07:26:19 -0500

Mmath gravatar image

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

edit retag flag offensive close merge delete

Comments

1

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

vdelecroix gravatar imagevdelecroix ( 2017-08-14 12:51:20 -0500 )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$?

dan_fulea gravatar imagedan_fulea ( 2017-08-15 12:22:23 -0500 )edit