Cryptography and Network Security Syllabus
Cryptography and Network Security Syllabus
Security
C OURSE I NFORMATION
2
S YLLABUS
4
Text & Reference Books
5
Mode of Evaluation - Theory
6
M ODULE - 1
7
Number Theory
8
Natural Number
• Natural Number is an integer greater than 0
• It is a member of the set {1,2,3,4….}
• Natural Numbers are also known as counting
numbers.
9
Whole Number
10
Number System
Some of the fundamental number system are:
• The natural numbers, N, (also known as non negative
numbers). Ex: 1,2,3,4,…
• The whole numbers, W , are the set of natural numbers along
with the number 0. Ex: 0,1,2,3,4…
• The integers, Z , obtained by adding negative numbers to W.
Ex: …-2,-1,0,1,2,3,4,…
• The rational numbers, Q, obtained by adjoining reciprocals
of nonzero intergers to Z . Form of p/q where ‘q’ is not equal
to zero. Ex: 1/2, 1/5, 3/4
• The real numbers, R, any number that we can think of,
except complex numbers, is a real number.
11
Factor
12
Factor
• A factor is a number that divides another
number evenly with no remainder
• Factors are numbers you multiply to get other
numbers
Factors of 24: ?
13
Factor
14
Factor
Factors of 24:
1,2,3,4,6,8,12,24
15
Factor
Factors of 48 : ?
Factors of 32: ?
16
Factor
Factors of 48:
1,2,3,4,6,8,12,16, 24, 48
17
Factor
Factors of 32:
1, 2, 4, 8, 16, 32
18
Prime Number
• They have no other factors except for 1 and the
number itself
• A number that can only be factored as 1 times
itself is called "prime".
• 1 is not a prime number. It doesn’t have two
distinct factors.
• 2, 3, 5, 7, 11, 13, 17, 19, 23 ,29. ...
Composite Number
• Numbers that have more than 2 factors are called
as Composite numbers
• Positive Integers that have more than 2 factors
• Numbers that are divisible by more than two
numbers.
• 4, 6, 8, 9, 10, 12, 14, 15, 16, ...
Co-Prime Number
• Set of numbers that have GCD as 1 are called as Co-
Prime Numbers
• For instance 7 and 8 are co-prime numbers
22
Greatest Common Divisor
• GCD of two or more integers which are not
zero is the greatest positive integer that divides
each of the integers.
• GCD of two numbers is the greatest number
that divides both the numbers.
• Ex: GCD of 12 and 8 is 4
23
GCD using Factorization
24
GCD(12,33)=?
25
GCD using Factorization
EX:1
GCD(12,33)=3
26
GCD(25,150)=?
27
GCD using Factorization
EX:2
GCD(25,150)=25
28
GCD(13,33)=?
29
GCD using Factorization
EX:3 - Prime numbers
GCD(13,33)=?
30
Identify the co-prime numbers
• 24, 36
• 20, 21
• 542, 446
Identify the co-prime numbers
24, 36
24 = 2 × 2 × 2 × 3
36 = 2 × 2 × 3 × 3
Common factors: 2 × 2 × 3 = 12
Identify the co-prime numbers
20, 21
20 = 2 × 2 × 5
21 = 3 × 7
No common factors other than 1
Identify the co-prime numbers
542, 446
542 = 2 × 271
446 = 2 × 223
Common factors: 2
Identify the co-prime numbers
24, 36
24 = 2 × 2 × 2 × 3
36 = 2 × 2 × 3 × 3
Common factors: 2 × 2 × 3 = 12
20, 21
20 = 2 × 2 × 5
21 = 3 × 7
No common factors other than 1
542, 446
542 = 2 × 271
446 = 2 × 223
Common factors: 2
GCD by Division Method
36
GCD by Division Method
1. First take two of the given numbers
2. Divide the greater by the smaller number
3. Then divide the divisor by the remainder
4. The divisor which does not leave a remainder
is the gcd of the two numbers.
37
GCD(1785,546)=?
38
EXAMPLE
39
GCD(48,60)=?
40
EXAMPLE
GCD(48,60)=?
48)60(1
48
12)48(4
48
0
GCD (48,60)=12
41
GCD(48,60,38)=?
42
GCD(48,60,38)=?
gcd(a,b,c)=gcd(gcd(a,b),c)
43
EXAMPLE
GCD(48,60,38)=?
48)60(1
48
12)48(4
48
0
GCD (48,60,38)=2
44
GCD(48,60,54,12)=?
45
GCD(48,60,54,12)=?
Gcd(a,b,c,d)=gcd(gcd(a,b),gcd(c,d))
46
GCD(48,60,54,12)=6
47
GCD by Division Method - Exercise
• Find the GCD of 30 and 45
54
Divisibility
55
Divisibility Property
56
Divisibility Property
EX: a=4, b=4, 4|4=0
Ex: 0|2, 0|4,…
57
Divisibility Property
58
Division algorithm
Non-negative Integer
Positive Integer
Dividing -11 by 7:
We repeatedly add until we get a number from 0 to 7-1=6 .
-11+7=-4
-4+7=3
2 times 7 is added to get number from 0 to 6
3+7=10
So, (-2)*7+3=-11 59
Division algorithm
a=70, n=15
60
Division algorithm
61
Euclidean Algorithm
62
Euclidean Algorithm
63
Euclidean Algorithm
gcd(a,b)=c
64
Euclidean Algorithm
65
Euclidean Algorithm
66
Euclidean Algorithm
67
Euclidean Algorithm
68
Euclidean Algorithm
69
Euclidean Algorithm
EX:6
GCD(25,60)=?
70
Euclidean Algorithm
71
Euclidean Algorithm
72
Euclidean Algorithm
EX:7
GCD(2740,1760)=?
73
Euclidean Algorithm
74
gcd(2740,1760)=?
gcd(2740,1760)=20 75
Euclidean Algorithm
EX:1
GCD(33,12) = ?
76
Euclidean Algorithm
R1 R2
77
Euclidean Algorithm
R1 R2
78
Euclidean Algorithm
EX:1
R1 R2
79
Euclidean Algorithm
EX:2
80
Euclidean Algorithm
EX:2
R1 R2
81
Euclidean Algorithm
EX:3
82
Euclidean Algorithm
EX:3
R1 R2
83
Euclidean Algorithm
EX:4
GCD(1005,105)=?
84
Euclidean Algorithm
EX:4
GCD(1005,105)=15
85
Euclidean Algorithm
EX:5
GCD(710,310)=?
86
Euclidean Algorithm
EX:5
GCD(710,310)=10
87
Euclidean Algorithm
88
GCD(710,310)=10
Euclidean Algorithm
Example:
Example:
Proof
91
Euclidean Algorithm
92
Euclidean Algorithm
93
Euclidean Algorithm
94
Euclidean Algorithm
Example:
95
Euclidean Algorithm
96
Euclidean Algorithm
97
Extended Euclidean Algorithm
98
Extended Euclidean Algorithm
99
Extended Euclidean Algorithm
a. Process
100
Extended Euclidean Algorithm
b. Algorithm
a b 1 0 0 1
Extended Euclidean Algorithm
EX:8
GCD(161,28)=?
102
Extended Euclidean Algorithm
(-1) * 161 + 6 * 28 = 7
Or
161 (-1) + 28 (6) = 7
-161+168 = 7
7=7 103
Extended Euclidean Algorithm
EX:9
GCD(17,0)=?
104
Extended Euclidean Algorithm
105
Extended Euclidean Algorithm
EX:11
GCD(0,45)=?
106
Extended Euclidean Algorithm
107
Extended Euclidean Algorithm
GCD(188,46)=?
108
Extended Euclidean Algorithm
GCD(188,46)=?
gcd(188, 46) = 2
s = -11
t = 45
109
Extended Euclidean Algorithm
GCD(258,62)=?
110
Extended Euclidean Algorithm
GCD(258,62)=?
gcd(258, 62) = 2
s = -6
t = 25
111