Professional Documents
Culture Documents
Field
A set of elements with two binary operations, called addition and multiplication Obeys: Closure under addition and multiplication Associativity of addition and multiplication Commutativity of addition and multiplication Additive and Multiplicative Identity Distributive laws No Zero divisors Additive and Multiplicative Inverse
Finite Fields
All encryption algorithm, both symmetric and public key, involve arithmetic operations on integers. If one of the operation is division, then we need to work in arithmetic defined over fields. Number of elements in finite fields must be a power of a prime number : pn Also known as Galois Fields Denoted by: GF(pn) In particular often used:
GF(pn) n=1 GF(pn) p=2 & n1
We can perform addition, subtraction, multiplication and division without leaving the field GF(p).
Arithmetic Modulo 7
Set of elements {0,1,2,3,4,5,6} Addition:
+ 0 1 0 0 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 0
2
3 4 5 6
2
3 4 5 6
3
4 5 6 0
4
5 6 0 1
5
6 0 1 2
6
0 1 2 3
0
1 2 3 4
1
2 3 4 5
Contd..
Multiplication:
X 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
Modulo 8 Addition:
+ 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7
Additive Inverse Additive Identity Both Additive Identity and Inverse
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
Modulo 8 Multiplication
X 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 2 0 2 4 6 0 2 4 6 3 0 3 6 1 4 7 2 5 4 0 4 0 4 0 4 6 4 5 0 5 2 7 4 1 4 3 6 0 6 4 2 0 6 2 2 7 0 7 6 5 4 3 6 1
Observations
Modulo 7 Multiplication inverse is defined for each element of the set.
Hence, Arithmetic modulo 7 is a Finite Field where as Arithmetic modulo 8 is not a Finite Field Arithmetic modulo 7 is a Galois Field of type GF(pn) and can be represented as GF(7)
where p is a prime number and n = 1 .
Polynomial Arithmetic
can be computed using polynomials
Modulo 2 arithmetic
Addition - XOR Multiplication first multiply using ordinary polynomial multiplication then add using addition modulo 2
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
Example: GF(23)
Computational Example
in GF(23) have (x2+1) is 1012 & (x2+x+1) is 1112 so addition is and multiplication is
(x2+1) + (x2+x+1) = x 101 XOR 111 = 0102 (x+1).(x2+1) = x.(x2+1) + 1.(x2+1) = x3+x+x2+1 = x3+x2+x+1 011.101 = (101)<<1 XOR (101)<<0 = 1010 XOR 101 = 11112
Using Generator
Another way of forming finite fields A generator g of a finite field F of order q is an element whose powers generate all non-zero elements
i.e. {0,g0,g1,g2,,gq-2}
Can create generator from root of the irreducible polynomial Multiplication by adding exponents of generator
gk = gk mod (2^n 1)
010
100 011 110 111 101
g1
g2 g3 g4 g5 g6
g
g2 g+1 g2+g g2+g+1 g2+1
g+1
g2+1 g g2+g+1 g2+g g2
0
g2+g 1 g2 g2+1 g2+g+1
g2+g
0 g2+g+1 g g+1 1
1
g2+g+1 0 g2+1 g2 g2+g
g2
g g2+1 0 1 g+1
g2+1
g+1 g2 1 0 g
g2+g+1
1 g2+g g+1 g 0