Ch 4: Finite Fields
Groups, Rings and Fields
A group is sometimes noted
Group
- Closure under addition
- Associativity of addition
- Additive identity
- Additive inverse
Abelian Group adds
- Commutativity of addition
Ring adds
- Closure under multiplication
- Associativity of multiplication
- Distributive laws
Commutative ring adds
- Commutativitiy of multiplication
Integral Domain
- Multiplicative Identity
- No zero divisors (note that by adding multiplication in a finite group, we automatically define the ability to divide because we can define division of a/b=c as b*c=a. What we don't know is if c exists. To get around the divide by zero problem we restrict the notion of division to exclude a divisor of zero.
Field adds
- Multiplicative inverse.
Modular Arithmetic
You should know about ModularArithmetic by now. If not research it and submit something for the topic. We only give one notation sample. We say that two integers a and b are said to be congruent modulo n, if
Euclid's Algorithm
Euclid's algorithm is used to find the GCD of two numbers
EUCLID(a,b) While b!=0 { r = a mod b a = b b = a } return a
Finite Fields of the form GF(p)
GF stands for Galois Field and p is a prime number.
If you have a field with p elements 0..p-1 and define + and * modulo p, then you have a field. Everything in this field uses normal addition and multiplication modulo p.
We can use an extended EUCLID(m,b) to find the both the GCD and the inverse in the GF(p).
EXTENDED EUCLIDS[m,b] A = [1,0,m] B = [0,1,b] while (B[3]>1) { q = quotient(A[3]/B[3]) T = A-qB A = B B = T } if B[3] = 0 return (gcd=A[3]) and ("No inverse") if B[3] = 1 return (gcd=B[3]) and (inverse = " + B[2])
Polynomial Arithmetic
You should already know how to do PolynomialArithmetic, but if you don't study up and put it in the link above. We give just a few terms related to Section 4.5.
- An nth degree polynomial is said to be monic if
. - When someone says indeterminate they are just refering to x.
Polynomial Arithmetic with Coefficients in Z_P
Addition and subtraction are easy because we are just doing modular addition
x^3 + x^2 + + 2 + x^2 - x + 3 ----------------- x^3 +2x^2 - x + 5 In Z_2 is x^3+x+1
Subtraction, multiplication and division are very similar except you may add P to the negative value to get a number in Z_p and then add for addition. Multiplication requires a possible table lookup or calculation, and division requires the knowledge of inverses which will also require a table look up.
Definition: A polynomial
Definition: The polynomial
- the function
divides both and , and - any divisor of
and is also a divisor of .
Thus we can use EUCLIDS algorithm and state
EUCLID[a(x),b(x)] //for polinomials a and b. while (b(x) != 0) { r(x)=a(x) mod b(x) b(x)=r(x) } return a(x)
Finite Fields of the form GF(2^n)
Here we are not dealing with the number 0 to 2^n-1 but the bit patterns represented by 00..0 to 11..1. These are elements of the set in the field. And we define addition subtraction etc to form a field.
Modular Plynomial Arithmetic
Consider the set S of polynomials of degree n-1 or less over the field
- Arithmetic follows the ordinary rules of polynomial arithmetic with the following two refinements.
Arithmetic on the coefficients is performed modulo p. That is, we use the rules of arithmetic for the finite field
. If multiplication results in a polynomial of degree greater than n-1, then the polynomial is reduced modulo some irreducible polynomial
of degree n. For a polynomial , the remainder is expressed as .
To find the GCD of two numbers in
EUCLIDS[a(x), b(x)] while (a(x) != 0) r(x) = a(x) mod b(x) a(x)=b(x) b(x)=r(x) return gcd=A(x).
To find the inverse (and the gcd) we use Euclid's extended algorithm where
EXTENDED EUCLIDS[m(x),b(x)] a = [1,0,m(x)] b = [0,1,b(x)] while (b.b3>1) { q = quotient(a.a3/b.b3) t = a-qb a = b b = t } if b.b3 = 0 return [gcd=a.a3] and ["No inverse"] if b.b3 = 1 return [gcd=b.b3] and ["inverse = " + b.b2]
Computational Considerations
Consider
Let the Galois field be defined by the set of polynomials of degree of 7 using a prime polynomial of
Addition/subtraction is defined in terms of XOR and multiplication is defined as: