MODULE 3
Basic Concepts of Number Theory and Finite Fields: Groups, Rings and Fields, Finite fields of the form GF(p), Prime Numbers, Fermat’s and Euler’s theorem, discrete logarithm. (Text 1: Chapter 3 and Chapter 7: Section 1, 2, 5)
Text Books:
Education Inc., 6th Edition, 2014, ISBN: 978-93-325-1877-3
2. Bruce Schneier, “Applied Cryptography Protocols, Algorithms, and Source code in C”, Wiley
Publications, 2nd Edition, ISBN: 9971-51-348-X.
Reference Books:
1. Cryptography and Network Security, Behrouz A. Forouzan, TMH, 2007.
2. Cryptography and Network Security, Atul Kahate, TMH, 2003.
Group
Cyclic Group
Ring
Field
Group, Ring, Field
Finite (Galois) Fields
Galois Fields GF(p)
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 |
Polynomial Arithmetic
f(x) = anxn + an-1xn-1 + … + a1x + a0 = ∑ aixi
Ordinary Polynomial Arithmetic
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
Polynomial Arithmetic with Modulo Coefficients
f(x) + g(x) = x3 + x + 1
f(x) x g(x) = x5 + x2
Polynomial Division
Polynomial GCD
Euclid(a(x), b(x))
if (b(x)=0) then return a(x);
else return
Euclid(b(x), a(x) mod b(x));
Modular Polynomial Arithmetic
Example GF(23)
Computational Considerations
Computational Example
= x3+x+x2+1 = x3+x2+x+1
1010 XOR 101 = 11112
Computational Example (con't)
Using a Generator
Prime Numbers
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199
Prime Factorisation
Relatively Prime Numbers & GCD
Fermat's Theorem
Euler Totient Function ø(n)
Euler Totient Function ø(n)
ø(37) = 36
ø(21) = (3–1)x(7–1) = 2x6 = 12
Euler's Theorem
a=3;n=10; ø(10)=4;
hence 34 = 81 = 1 mod 10
a=2;n=11; ø(11)=10;
hence 210 = 1024 = 1 mod 11
Primality Testing
Miller Rabin Algorithm
TEST (n) is:
1. Find integers k, q, k > 0, q odd, so that (n–1)=2kq
2. Select a random integer a, 1<a<n–1
3. if aq mod n = 1 then return (“inconclusive");
4. for j = 0 to k – 1 do
5. if (a2jq mod n = n-1)
then return(“inconclusive")
6. return (“composite")
Probabilistic Considerations
Prime Distribution
Chinese Remainder Theorem
Chinese Remainder Theorem
Primitive Roots
Powers mod 19
Discrete Logarithms
x = log3 4 mod 13 has no answer
x = log2 3 mod 13 = 4 by trying successive powers
Discrete Logarithms mod 19