Cys535 Lecture04
Cys535 Lecture04
Finite Fields
• Ex1: If the group is {G, +}, for “a” as the group generator:
G = {…, -3a, -2a, -a, 0, a 2a, 3a, …}
(0 is the identity element for addition)
• Ex2: If the group is {G, x}, for “a” as the group generator:
G = {…, a-3, a-2, a-1, 1, a1 a2, a3, …}
(1 is the identity element for multiplication )
Cyclic Group
• Infinite Cyclic group {Z, +}
Ex: group of integers, where 1 is the group generator
Z = {… -3, -2, -1, 0, 1, 2, 3 ….}
• Ex:
▫ 11 mod 7 = 4
▫ -11 mod 7 = 3
Modular Arithmetic
• use the term congruence for: a ≡ b (mod n)
▫ when divided by n, a & b have same remainder
▫ eg. 100 ≡ 34 (mod 11)
▫ [100 mod 11 = 1 and 34 mod 11 = 1]
x3 + x + 1
x3 + x2 + 1.
Polynomial GCD
• can find greatest common divisor for polys
• GCD: the one with the greatest degree
▫ c(x) = GCD(a(x), b(x)) if c(x) is the poly of greatest degree which
divides both a(x), b(x)
▫ can adapt Euclid’s Algorithm to find it:
▫ EUCLID[a(x), b(x)]
1. A(x) = a(x); B(x) = b(x)
2. 2. if B(x) = 0 return A(x) = gcd[a(x), b(x)]
3. R(x) = A(x) mod B(x)
4. A(x) ¨ B(x)
5. B(x) ¨ R(x)
6. goto 2
Modular Polynomial Arithmetic
• can compute in field GF(2n)
▫ polynomials with coefficients modulo 2
▫ whose degree is less than n
▫ Coefficients always modulo 2 in an operation
▫ hence must modulo an irreducible polynomial of degree n
(for multiplication only)
• form a finite field
• can always find an inverse
▫ can extend Euclid’s Inverse algorithm to find
Example GF(23)
Computational Considerations
• since coefficients are 0 or 1, can represent any such
polynomial as a bit string
• addition becomes XOR of these bit strings
• multiplication is shift & XOR
• modulo reduction done by repeatedly substituting
highest power with remainder of irreducible poly
(also shift & XOR)
End.