CH 3
CH 3
Finite Fields
1
Introduction
• will now introduce finite fields
• of increasing importance in cryptography
– AES, Elliptic Curve, IDEA, Public Key
• concern operations on “numbers”
– where what constitutes a “number” and the type
of operations varies considerably
• start with concepts of groups, rings, fields
from abstract algebra
2
Group
• A group G, sometimes denoted by {G, ·} is a
set of elements with a binary operation,
denoted by ·, that associates to each ordered
pair (a, b) of elements in G an element (a · b)
in G, such that the following axioms are
obeyed:
• The operator · is generic and can refer to
addition, multiplication, or some other
mathematical operation.
3
• (A1) Closure:If a and b belong to G, then
a · b is also in G.
• (A2) Associative:a · (b · c) = (a · b) · c for all a, b, c
in G.
• (A3) Identity element:There is an element e in G
such that a · e = e · a = a for all a in G.
• (A4) Inverse element:For each a in G there is an
element a' in G such that a · a' = a' · a = e.
4
Cont…
If a group has a finite number of elements, it is
referred to as a finite group, and the order of
the group is equal to the number of elements
in the group. Otherwise, the group is an
infinite group.
• A group is said to be abelian if it satisfies the
following additional condition:
• (A5) Commutative: a · b = b · a for all a, b in G.
5
Cyclic Group
• define exponentiation as repeated application
of operator
– example: a3 = a.a.a
• and let identity be: e=a0
• a group is cyclic if every element is a power of
some fixed element
– i.e b = ak for some a and every b in group
• a is said to be a generator of the group
6
Ring
• A ring R, sometimes denoted by {R, +, x}, is a set of
elements with two binary operations, called addition
and multiplication, such that for all a, b, c in R the
following axioms are obeyed:
• (A1-A5) R is an abelian group with respect to
addition; that is, R satisfies axioms A1 through A5
• (M1) Closure under multiplication:If a and b belong
to R, then ab is also in R
• (M2) Associativity of multiplication:a(bc) = (ab)c for
all a, b, c in R.
• (M3) Distributive laws:a(b + c) = ab + ac for all a, b, c
in R, (a + b)c = ac + bc for all a, b, c in
• (M4) Commutativity of multiplication:
ab = ba for all a, b in R.
7
• (M5) Multiplicative identity:There is an
element 1 in R such that a1 = 1a = a for all a in
R.
• (M6) No zero divisors: If a, b in R and ab = 0,
then either a = 0 or b = 0.
8
Field
• A field F, sometimes denoted by {F, +, x}, is a set of
elements with two binary operations, called addition
and multiplication, such that for all a, b, c in F the
following axioms are obeyed:
• (A1M6) F is an integral domain; that is, F satisfies
axioms A1 through A5 and M1 through M6
• (M7) Multiplicative inverse:For each a in F, except 0,
there is an element a-1 in F such that aa-1 = (a-1)a = 1.
• group -> ring -> field
9
Modular Arithmetic
• define modulo operator “a mod n” to be
remainder when a is divided by n
• Given any positive integer n and any nonnegative
integer a, if we divide a by n, we get an integer
quotient q and an integer remainder r that obey the
following relationship:
a=qn+r
• integers a and b are said to be congruent modulo n,
if (a mod n) = (b mod n). This is written as aΞ b (mod
n)
10
Modular Arithmetic Operations
Modular arithmetic exhibits the following
properties:
• [(a mod n) + (b mod n)] mod n = (a + b) mod n
• [(a mod n) x (b mod n)] mod n = (a x b) mod n
11
Modulo 8 Addition Example
+ 0 1 2 3 4 5 6 7
0 0 1 2 3 4 5 6 7
1 1 2 3 4 5 6 7 0
2 2 3 4 5 6 7 0 1
3 3 4 5 6 7 0 1 2
4 4 5 6 7 0 1 2 3
5 5 6 7 0 1 2 3 4
6 6 7 0 1 2 3 4 5
7 7 0 1 2 3 4 5 6
12
Polynomial Arithmetic
• can compute using polynomials
f(x) = anxn + an-1xn-1 + … + a1x + a0 = ∑ aixi
• nb. not interested in any specific value of x
• which is known as the indeterminate
• several alternatives available
– ordinary polynomial arithmetic
– poly arithmetic with coords mod p
– poly arithmetic with coords mod p and
polynomials mod m(x)
13
Ordinary Polynomial Arithmetic
• add or subtract corresponding coefficients
• multiply all terms by each other
• eg
let f(x) = x3 + x2 + 2 and g(x) = x2 – x + 1
f(x) + g(x) = x3 + 2x2 – x + 3
f(x) – g(x) = x3 + x + 1
f(x) x g(x) = x5 + 3x2 – 2x + 2
14
Polynomial Division
• can write any polynomial in the form:
– f(x) = q(x) g(x) + r(x)
– can interpret r(x) as being a remainder
– r(x) = f(x) mod g(x)
• if have no remainder say g(x) divides f(x)
• if g(x) has no divisors other than itself & 1 say
it is irreducible (or prime) polynomial
• arithmetic modulo an irreducible polynomial
forms a field
15
Galois Fields
• finite fields play a key role in cryptography
• can show number of elements in a finite field
must be a power of a prime pn
• known as Galois fields
• denoted GF(pn)
• in particular often use the fields:
– GF(p)
– GF(2n)
16
Galois Fields GF(p)
• For a given prime, p, the finite field of order p,
GF(p) is defined as the set Zp of integers {0, 1,...,
p -1}, together with the arithmetic operations
modulo p.
• these form a finite field
– since have multiplicative inverses
• hence arithmetic is “well-behaved” and can do
addition, subtraction, multiplication, and
division without leaving the field GF(p)
17
GF(7) Multiplication Example
0 1 2 3 4 5 6
0 0 0 0 0 0 0 0
1 0 1 2 3 4 5 6
2 0 2 4 6 1 3 5
3 0 3 6 2 5 1 4
4 0 4 1 5 2 6 3
5 0 5 3 1 6 4 2
6 0 6 5 4 3 2 1
18