
Go to the first, previous, next, last section, table of contents.
Representation of finite fields
On Asir GF(p) and GF(2^n) can be defined, where
GF(p) is a finite prime field of charateristic p and
GF(2^n) is a finite field of characteristic 2. These are
all defined by [0] P=pari(nextprime,2^50); 1125899906842679 [1] setmod_ff(P); 1125899906842679 [2] field_type_ff(); 1 [3] load("fff"); 1 [4] F=defpoly_mod2(50); x^50+x^4+x^3+x^2+1 [5] setmod_ff(F); x^50+x^4+x^3+x^2+1 [6] field_type_ff(); 2
If p is a positive integer, Correctly speaking there is no actual object corresponding to a 'base field'. Setting a base field means that operations on elements of finite fields are done according to the arithmetics of the base field. Thus, if operands of an arithmetic operation are both rational numbers, then the result is also a rational number. However, if one of the operands is in a finite field, then the other is automatically regarded as in the same finite field and the operation is done in the finite field. A non zero element of a finite field belongs to the number and has object identifier 1. Its number identifier is 6 if the finite field is GF(p), 7 if it is GF(2^n).
There are several methods to input an element of a finite field.
An element of GF(p) can be input by [0] P=pari(nextprime,2^50); 1125899906842679 [1] setmod_ff(P); 1125899906842679 [2] A=simp_ff(2^100); 3025 [3] ntype(@@); 6 In the case of GF(2^n) the following methods are available. [0] setmod_ff(x^50+x^4+x^3+x^2+1); x^50+x^4+x^3+x^2+1 [1] A=@; (@) [2] ptogf2n(x^50+1); (@^50+1) [3] simp_ff(@@); (@^4+@^3+@^2) [4] ntogf2n(2^101); (@^9+@^8+@^7+@^6+@^5+@^4+@^3+@^2+@+1)
Elements of finite fields are numbers and one can apply field arithmetics
to them.
Go to the first, previous, next, last section, table of contents. 