CNS Unit I
CNS Unit I
CNS Unit I
in
Dr.T.LOGESWARI
DEPT OF COMPUTER SCIENCE
File Downloaded
Cryptography NEW HORIZON COLLEGE
From www.Bustudymate.in
& Network Security - Behrouz
A. Forouzan
1
File Downloaded From www.Bustudymate.in
UNIT - I
Introduction
Dr.T.Logeswari
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
2
A. Forouzan
File Downloaded From www.Bustudymate.in
Objectives
To define three security goals
To define security attacks that threaten security
goals
To define security services and how they are
related to the three security goals
To define security mechanisms to provide security
services
To introduce two techniques, cryptography and
steganography, to implement security mechanisms.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
3
A. Forouzan
File Downloaded From www.Bustudymate.in
INTRODUCTION
• Computer data often travels from one
computer to another, leaving the safety of its
protected physical surroundings.
• Once the data is out of hand, people with bad
intention could modify or forge your data,
either for amusement or for their own benefit.
• Cryptography can reformat and transform our
data, making it safer on its trip between
computers.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
4
A. Forouzan
File Downloaded From www.Bustudymate.in
• The technology is based on the essentials of
secret codes, augmented by modern
mathematics that protects our data in powerful
ways.
• Computer Security - generic name for the
collection of tools designed to protect data and
to frustrate hackers
• Network Security - measures to protect data
during their transmission
• Internet Security - measures to protect data
during their transmission over a collection of
interconnected networks
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
5
A. Forouzan
File Downloaded From www.Bustudymate.in
Cryptography
• Cryptography is the science of writing in
secret code so that no other person except
the intended recipient could read
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
6
A. Forouzan
File Downloaded From www.Bustudymate.in
SECURITY GOALS
•Data Privacy(confidentiality)
•Data Authenticity(it came from where it claims)
•Data integrity(it has not been modified on the way) in
the digital world
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
7
A. Forouzan
Continued
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
8
A. Forouzan
Confidentiality
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
9
A. Forouzan
Integrity
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
10
A. Forouzan
Availability
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
11
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
12
A. Forouzan
File Downloaded From www.Bustudymate.in
Cryptographic Attacks
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
14
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
16
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
17
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
18
A. Forouzan
Attacks Threatening Confidentiality
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
19
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
20
A. Forouzan
Attacks Threatening Integrity
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
22
A. Forouzan
Attacks Threatening Availability
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
23
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
24
A. Forouzan
File Downloaded From www.Bustudymate.in
Passive Attacks
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
25
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
26
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
27
A. Forouzan
File Downloaded From www.Bustudymate.in
Active attacks
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
28
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
29
A. Forouzan
Passive Versus Active Attacks
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
30
A. Forouzan
File Downloaded From www.Bustudymate.in
• Security Services
• Security Mechanism
• Relation between Services and Mechanisms
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
31
A. Forouzan
Security Services
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
32
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
34
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
35
A. Forouzan
Security Mechanism
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
36
A. Forouzan
File Downloaded From www.Bustudymate.in
• Encipherment
– It is hiding or covering of data ( crypto and
steganography)
• Data Integrity
– This mechanism append to the data a short check
value that has been created by a specific process
from data itself
• Digital signature
– The sender electronically sign the data and
receiver can electronically verify the signature
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
37
A. Forouzan
File Downloaded From www.Bustudymate.in
• Authentication Exchange
– Two entities exchange some message to prove their
identify to each other
– Something the user knows(unique secret)
– Something the user has(security card)
– Something the user is(fingerprint, retina voice)
• Traffic padding
– It means inserting some bogus data into a data
traffic to thwart the adversary attempt to use the
traffic analysis
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
38
A. Forouzan
File Downloaded From www.Bustudymate.in
• Routing Control
– It means selecting and continuously changing
different available routes between the sender and
the receiver to prevent eavesdropping
• Notarization
– It means selecting third trusted party to control the
communication between two parties. This can be
done to prevent repudiation
• Access Control
– It uses method to prove that user has to right to the
data or resources owned by a system
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
39
A. Forouzan
Relation between Services
File Downloaded and Mechanisms
From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
40
A. Forouzan
File Downloaded From www.Bustudymate.in
TECHNIQUES
•Cryptography
• Steganography
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
41
A. Forouzan
Cryptography
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
42
A. Forouzan
File Downloaded From www.Bustudymate.in
Cryptography
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
43
A. Forouzan
File Downloaded From www.Bustudymate.in
Cryptography
• Cryptographic systems are generally classified
along 3 independent dimensions:
• Type of operations used for transforming
plain text to cipher text
– All the encryption algorithms are based on two
general principles:
– substitution, in which each element in the
plaintext is mapped into another element.
– transposition, in which elements in the plaintext
are rearranged.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
44
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
45
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
46
A. Forouzan
Steganography
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
47
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
48
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
49
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
50
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
51
A. Forouzan
File Downloaded From www.Bustudymate.in
Types of steganography
• Technical steganography uses scientific
methods to hide a message, such as the use of
invisible ink or microdots and other size-
reduction methods.
• Linguistic steganography hides the message in
the carrier in some nonobvious ways and is
further categorized as semagrams or open
codes.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
52
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
54
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
55
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
56
A. Forouzan
File Downloaded From www.Bustudymate.in
Mathematics of
Cryptography
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
57
A. Forouzan
File Downloaded From www.Bustudymate.in
Objectives
To review integer arithmetic, concentrating on divisibility
and finding the greatest common divisor using the Euclidean
algorithm
To understand how the extended Euclidean algorithm can be
used to solve linear Diophantine equations, to solve linear
congruent equations, and to find the multiplicative inverses
To emphasize the importance of modular arithmetic and
the modulo operator, because they are extensively used in
cryptography
To emphasize and review matrices and operations on residue
matrices that are extensively used in cryptography
To solve a set of congruent equations using residue matrices
File Downloaded From www.Bustudymate.in
Cryptography & Network Security - Behrouz
58
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
60
A. Forouzan
2.1.2 Binary Operations
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
61
A. Forouzan
2.1.2 Continued
File Downloaded From www.Bustudymate.in
Example 2.1
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
62
A. Forouzan
2.1.3 Integer Division
File Downloaded From www.Bustudymate.in
a=q×n+r
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
63
A. Forouzan
2.1.3 Continued File Downloaded From www.Bustudymate.in
Example 2.2
Assume that a = 255 and n = 11. We can find q = 23 and R = 2 using
the division algorithm.
Figure 2.3 Example 2.2, finding the quotient and the remainder
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
64
A. Forouzan
Restriction on integer division relation
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
65
A. Forouzan
2.1.3 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.3
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
66
A. Forouzan
2.1.3 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
67
A. Forouzan
2.1.4 Divisbility
File Downloaded From www.Bustudymate.in
a=q×n
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
68
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Example 2.4
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
69
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Properties
Example 2.5
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
71
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Example 2.6
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
72
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
73
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
74
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Note
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
77
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Example 2.7
Find the greatest common divisor of 2740 and 1760.
Solution
We have gcd (2740, 1760) = 20.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
78
A. Forouzan
2.1.4 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.8
Find the greatest common divisor of 25 and 60.
Solution
We have gcd (25, 65) = 5.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
79
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
80
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
81
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
82
A. Forouzan
2.1.4 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.9
Given a = 161 and b = 28, find gcd (a, b) and the values of s and t.
Solution
We get gcd (161, 28) = 7, s = −1 and t = 6.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
83
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
Example 2.10
Given a = 17 and b = 0, find gcd (a, b) and the values of s
and t.
Solution
We get gcd (17, 0) = 17, s = 1, and t = 0.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
84
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
Example 2.11
Solution
We get gcd (0, 45) = 45, s = 0, and t = 1.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
85
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
86
A. Forouzan
2.1.4 Continued
File Downloaded From www.Bustudymate.in
Note
Particular solution:
x0 = (c/d)s and y0 = (c/d)t
Note
General solutions:
x = x0 + k (b/d) and y = y0 − k(a/d)
where k is an integer
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
87
A. Forouzan
2.1.4 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.12
Solution
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
88
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
Example 2.13
(0, 20), (1, 16), (2, 12), (3, 8), (4, 4), (5, 0).
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
89
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
91
A. Forouzan
2.1.4 Continued File Downloaded From www.Bustudymate.in
Example 2.14
Find the result of the following operations:
a. 27 mod 5 b. 36 mod 12
c. −18 mod 14 d. −7 mod 10
Solution
a. Dividing 27 by 5 results in r = 2
b. Dividing 36 by 12 results in r = 0.
c. Dividing −18 by 14 results in r = −4. After adding the modulus
r = 10
d. Dividing −7 by 10 results in r = −7. After adding the modulus
to −7, r = 3.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
92
A. Forouzan
2.2.2 Set of Residues
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
93
A. Forouzan
2.2.3 Congruence
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
94
A. Forouzan
2.2.3 ContinuedFile Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
95
A. Forouzan
2.2.3 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
96
A. Forouzan
2.2.3 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.15
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
97
A. Forouzan
2.2.4 Operation in Zn
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
98
A. Forouzan
2.2.4 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.16
Perform the following operations (the inputs come from Zn):
a. Add 7 to 14 in Z15.
b. Subtract 11 from 7 in Z13.
c. Multiply 11 by 7 in Z20.
Solution
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
99
A. Forouzan
2.2.4 Continued
File Downloaded From www.Bustudymate.in
Properties
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
100
A. Forouzan
2.2.4 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
101
A. Forouzan
2.2.4 ContinuedFile Downloaded From www.Bustudymate.in
Exampleshows
The following 2.18 the application of the above properties:
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
102
A. Forouzan
2.2.5 Inverses File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
103
A. Forouzan
2.2.5 Continue File Downloaded From www.Bustudymate.in
Additive Inverse
Note
Example 2.21
Solution
The six pairs of additive inverses are (0, 0), (1, 9), (2, 8), (3, 7), (4,
6), and (5, 5).
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
105
A. Forouzan
2.2.5 Continue File Downloaded From www.Bustudymate.in
Multiplicative Inverse
In Zn, two numbers a and b are the multiplicative inverse of each
other if
Note
Example 2.22
Find the multiplicative inverse of 8 in Z10.
Solution
There is no multiplicative inverse because gcd (10, 8) = 2 ≠ 1. In
other words, we cannot find any number between 0 and 9 such
that when multiplied by 8, the result is congruent to 1.
Example 2.23
Find all multiplicative inverses in Z10.
Solution
There are only three pairs: (1, 1), (3, 7) and (9, 9). The numbers
0, 2, 4, 5, 6, and 8 do not have a multiplicative inverse.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
107
A. Forouzan
2.2.5 Continued File Downloaded From www.Bustudymate.in
Example 2.24
Find all multiplicative inverse pairs in Z11.
Solution
We have seven pairs: (1, 1), (2, 6), (3, 4), (5, 9), (7, 8), (9, 9), and
(10, 10).
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
108
A. Forouzan
2.2.5 Continued
File Downloaded From www.Bustudymate.in
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
109
A. Forouzan
2.2.5 Continued File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
110
A. Forouzan
2.2.5 Continued File Downloaded From www.Bustudymate.in
Example 2.25
Find the multiplicative inverse of 11 in Z26.
Solution
Example 2.26
Find the multiplicative inverse of 23 in Z100.
Solution
Example 2.27
Find the inverse of 12 in Z26.
Solution
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
113
A. Forouzan
2.2.6 Addition and Multiplication Tables
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
114
A. Forouzan
2.2.7 Different Sets
File Downloaded From www.Bustudymate.in
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
116
A. Forouzan
File Downloaded From www.Bustudymate.in
2-3 MATRICES
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
117
A. Forouzan
2.3.1 Definition
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
118
A. Forouzan
2.3.1 Continued
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
119
A. Forouzan
2.3.2 Operations and Relations
File Downloaded From www.Bustudymate.in
Example 2.28
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
120
A. Forouzan
2.3.2 Continued File Downloaded From www.Bustudymate.in
Example 2. 29
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
121
A. Forouzan
2.3.2 Continued File Downloaded From www.Bustudymate.in
Example 2. 30
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
122
A. Forouzan
2.3.2 Continued File Downloaded From www.Bustudymate.in
Example 2. 31
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
123
A. Forouzan
2.3.3 Determinant
File Downloaded From www.Bustudymate.in
Note
Example 2. 32
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
125
A. Forouzan
2.3.3 Continued File Downloaded From www.Bustudymate.in
Example 2. 33
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
126
A. Forouzan
2.3.4 Inverses
File Downloaded From www.Bustudymate.in
Note
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
127
A. Forouzan
2.3.5 Residue Matrices
File Downloaded From www.Bustudymate.in
Example 2. 34
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
128
A. Forouzan
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
129
A. Forouzan
2.4.1 Single-Variable Linear Equations
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
130
A. Forouzan
2.4.1 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.35
Solve the equation 10 x ≡ 2(mod 15).
Solution
First we find the gcd (10 and 15) = 5. Since 5 does not divide 2,
we have no solution.
Example 2.36
Solve the equation 14 x ≡ 12 (mod 18).
Solution
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
131
A. Forouzan
2.4.1 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.37
Solution
First we change the equation to the form ax ≡ b (mod n). We add
−4 (the additive inverse of 4) to both sides, which give
3x ≡ 2 (mod 13). Because gcd (3, 13) = 1, the equation has only
one solution, which is x0 = (2 × 3−1) mod 13 = 18 mod 13 = 5. We
can see that the answer satisfies the original equation:
3 × 5 + 4 ≡ 6 (mod 13).
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
132
A. Forouzan
2.4.2 Single-Variable Linear Equations
File Downloaded From www.Bustudymate.in
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
133
A. Forouzan
2.4.2 ContinuedFile Downloaded From www.Bustudymate.in
Example 2.38
Solve the set of following three equations:
Solution
The result is x ≡ 15 (mod 16), y ≡ 4 (mod 16), and z ≡ 14 (mod
16). We can check the answer by inserting these values into the
equations.
File Downloaded
Cryptography From www.Bustudymate.in
& Network Security - Behrouz
134
A. Forouzan