Cryptography and Network Security, Finite Fields: From Third Edition by William Stallings
Cryptography and Network Security, Finite Fields: From Third Edition by William Stallings
GF(7)
EXTENDED EUCLID(m, b)
1. [A1,A2,A3; B1,B2,B3][1,0,m;0,1,b];
2. if B3==0;
return(A3=gcd(m,b)); //no inverse
Finding the
3. if B3==1; Multiplicative
return(B3=gcd(m,b));
B2=b–1%m;
Inverse in GF(p)
4. Q = A3/B3;
5. [r1,r2,r3][A1–QB1, A2–QB2, A3–QB3];
6. [A1,A2,A3][B1,B2,B3]; If (m, b) are relatively prime,
7. [B1,B2,B3][r1,r2,r3]; then gcd(m, b) = 1, then b has a
8. goto 2 multiplicative inverse modulo m.
• If the coefficient set is the integers, then (5x2)/(3x) does not have a
solution, since not in the coefficient set.
• Suppose it is performed over Z7. Then (5x2)/(3x) = 4x which is a valid
polynomial over Z7.
GF(7)
Integer 1 2 3 4 5 6 7
Occurrences in Z8 4 8 4 12 4 8 4
Occurrences in GF(23) 7 7 7 7 7 7 7
Z8
GF(23)
In GF(2),
addition and
multiplication
are equivalent
to the XOR,
and the logical
AND,
respectively.
Addition and
subtraction are
equivalent.
Therefore
GF(2n) is of
most interest in.
• Consider the set S of all polynomials of degree n-1 or less over the
field Zp. Thus, each polynomial has the form
• where each ai takes on a value in the set {0, 1,..., p -1}. There are a
total of pn different polynomials in S.
• For p = 3 and n = 2, the 32 = 9 polynomials in the set are
• 0 x 2x
• 1 x + 1 2x + 1
• 2 x + 2 2x + 2
• For p = 2 and n = 3, the 23 = 8 the polynomials in the set are
• 0 x + 1 x2 + x
• 1 x2 x2 + x + 1
• X x2 + 1
• mod 2:
• 1 + 1 = 1-1 = 0;
• 1 + 0 = 1 - 0 = 1;
• 0 + 1 = 0 - 1 = 1.
• if f(x) has no divisors other than itself & 1 it is said irreducible (or prime)
polynomial, an irreducible polynomial forms a field.
• f(x) = x4 + 1 over GF(2) is reducible,
– because x4 + 1 = (x + 1)(x3 + x2 + x + 1)
• f(x) = x3 + x + 1 is irreducible residual 1.