|[ << ]||[ < ]||[ Up ]||[ > ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
On Asir GF(p), GF(2^n), GF(p^n) can be defined, where
GF(p) is a finite prime field of charateristic p,
GF(2^n) is a finite field of characteristic 2 and
GF(p^n) is a finite extension of GF(p). These are
all defined by
 P=pari(nextprime,2^50); 1125899906842679  setmod_ff(P); 1125899906842679  field_type_ff(); 1  load("fff"); 1  F=defpoly_mod2(50); x^50+x^4+x^3+x^2+1  setmod_ff(F); x^50+x^4+x^3+x^2+1  field_type_ff(); 2  setmod_ff(x^3+x+1,1125899906842679); [1*x^3+1*x+1,1125899906842679]  field_type_ff(); 3  setmod_ff(3,5); [3,x^5+2*x+1,x]  field_type_ff(); 4
If p is a positive integer,
GF(p) as the current base field.
If f is a univariate polynomial of degree n,
setmod_ff(f) sets GF(2^n) as the current
base field. GF(2^n) is represented
as an algebraic extension of GF(2) with the defining polynomial
f mod 2. Furthermore, finite extensions of prime finite fields
can be defined. See section Types of numbers.
In all cases the primality check of the argument is
not done and the caller is responsible for it.
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
 P=pari(nextprime,2^50); 1125899906842679  setmod_ff(P); 1125899906842679  A=simp_ff(2^100); 3025  ntype(@@); 6
In the case of GF(2^n) the following methods are available.
 setmod_ff(x^50+x^4+x^3+x^2+1); x^50+x^4+x^3+x^2+1  A=@; (@)  ptogf2n(x^50+1); (@^50+1)  simp_ff(@@); (@^4+@^3+@^2)  ntogf2n(2^10-1); (@^9+@^8+@^7+@^6+@^5+@^4+@^3+@^2+@+1)
Elements of finite fields are numbers and one can apply field arithmetics
@ is a generator of GF(2^n) over GF(2).
See section Types of numbers.
|[ << ]||[ < ]||[ Up ]||[ > ]||[ >> ]|
This document was generated on July 17, 2018 using texi2html 5.0.