0% found this document useful (0 votes)
18 views32 pages

Cns U1

Uploaded by

susmitha0728
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views32 pages

Cns U1

Uploaded by

susmitha0728
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Unit 1 – Module 1

INTRODUCTION
We are living in an information age. We need to keep information about every aspect of our
lives. In other words, information is an asset that has a value like any other asset. As an asset
information need to be secured from attacks. We store our information in a computer
system, we can call it as our information system.
Our Information system contains the hardware, software, and information in it. The act of
providing security to our information system is called information security.

SECURITY GOALS
There are three goals of security.
1. Protect the confidentiality of data.
2. Preserve the integrity of data.
3. Promote the availability of data for authorized users.
These goals form the confidentiality, integrity, availability (CIA) triad.

CONFIDENTIALITY
The first component of information security is confidentiality. This term covers two related
concepts:
Data confidentiality: Assures that private or confidential information is not made available
or disclosed to unauthorized individuals.
For example, suppose Alice want to send some data to Bob through internet, such that
during the transmission the intruder/attacker Trudy can not understand this data.

1
Privacy: The stored information about an individual need not be disclosed. For example, in
my laptop I have stored some important data, this data needs to be private means other than
me nobody should be able to access it.

INTEGRITY
This is the second component of information security. This term covers two related concepts:
Data integrity: It means that the data stored in an information system or the data during
transit in internet, can only be changed by authorized users and through authorized
mechanisms. For example, my account balance in by bank account can only be changed by
me or by the banker when I perform a transaction. It cannot be changed by the attacker.
System integrity: It means that the system should perform its set of predefined activities
without being modified by the intruder.

AVAILABILITY
The third component of information security is availability. The information created and
stored by an organization needs to be available to authorized entities. Information is useless if
it is not available. Information needs to be available to authorized users. Attackers may try to
stop the availability of information by lau nching various attacks.
A loss of availability is the disruption of access to or use of information or an information
system.

SECURITY RISKS
IF we cannot protect the confidentiality, integrity, and availability of our information system,
there may be low, moderate or high risks.

Low Risks: The loss could be expected to have a limited bad effect on organizational
operations, organizational assets, or individuals. A limited adverse effect means that, (i) cause
a degradation of the effectiveness of the functions; (ii) result in minor damage to
organizational assets; (iii) result in minor financial loss; or (iv) result in minor harm to
individuals.
For example: The website is not opening for 5 minutes. The bank account does not open for
1 hour.

2
Moderate Risk: The loss could be expected to have a serious adverse effect on
organizational operations, organizational assets, or individuals. A serious adverse effect
means that, for example, the loss might (i) cause a significant degradation in effectiveness
of the functions; (ii) result in significant damage to organizational assets; (iii) result in
significant financial loss; or (iv) result in significant harm to individuals that does not
involve loss of life or serious, life-threatening injuries.
Example: some body stolen money from my account online.

High: The loss could be expected to have a severe or catastrophic adverse effect on
organizational operations, organizational assets, or individuals. A severe or catastrophic
adverse effect means that, for example, the loss might (i) cause a severe degradation in
primary functions; (ii) result in major damage to organizational assets; (iii) result in major
financial loss; or (iv) result in severe or cata- strophic harm to individuals involving loss of
life or serious, life-threatening injuries.
For example: The satellite launching fails, the weapon mis-directed.

CONFIDENTIALITY
Student grade information is an asset whose confidentiality is considered to be highly
important by students. Grade information should only be available to students, their
parents, and employees that require the information to do their job. Student enrollment
information may have a moderate confidentiality rating. Directory information, such as lists
of students or faculty or departmental lists, may be assigned a low confidentiality rating or
indeed no rating. This information is typically freely available to the public and published
on a school’s Web site.
INTEGRITY
Several aspects of integrity are illustrated by the example of a hospital patient’s allergy
information stored in a database. The doctor should be able to trust that the information is
correct and current. Now suppose that an employee (e.g., a nurse) who is authorized to view
and update this information deliberately falsifies the data to cause harm to the hospital. The
database needs to be restored to a trusted basis quickly, and it should be possible to trace the
error back to the person responsible. Patient allergy information is an example of an asset
with a high requirement for integrity. Inaccurate information could result in serious harm or
death to a patient and expose the hospital to massive liability.
3
An example of an asset that may be assigned a moderate level of integrity requirement is a
Web site that offers a forum to registered users to discuss some specific topic. Either a
registered user or a hacker could falsify some entries or deface the Web site. If the forum
exists only for the enjoyment of the users, brings in little or no advertising revenue, and is not
used for something important such as research, then potential damage is not severe. The
Web master may experience some data, financial, and time loss.
An example of a low integrity requirement is an anonymous online poll. Many Web sites, such
as news organizations, offer these polls to their users with very few safeguards. However, the
inaccuracy and unscientific nature of such polls is well understood.
AVAILABILITY
The more critical a component or service, the higher is the level of availability required.
Consider a system that provides authentication services for critical systems, applications, and
devices. An interruption of service results in the inability for customers to access computing
resources and staff to access the resources they need to perform critical tasks. The loss of
the service translates into a large financial loss in lost employee productivity and potential
customer loss.
An example of an asset that would typically be rated as having a moderate availability
requirement is a public Web site for a university; the Web site provides information for
current and prospective students and donors. Such a site is not a critical component of the
university’s information system, but its unavailability will cause some embarrassment.
An online telephone directory lookup application would be classified as a low availability
requirement. Although the temporary loss of the application may be an annoyance, there are
other ways to access the information, such as a hardcopy directory or the operator.

Unit 1 – Module 2

CRYPTOGRAPHIC ATTACKS
Cryptography attack can be broadly categorized into two distinct types, (1) Cryptanalytic
Attacks, and (2) Non cryptanalytic Attacks.

4
Cryptanalytic Attacks
These attacks are combinations of statistical and algebraic techniques aimed to obtain the
secret key of the cipher. These methods inspect the mathematical properties of the
cryptographic algorithms to identify the keys. If the property is detected, the guess is correct,
otherwise the next guess is tried. However, such attack surely points out a flaw in the design.

Non-cryptanalytic Attacks
The other types of attacks are non-cryptanalytic attacks, which do not exploit the
mathematical weakness of the cryptographic algorithm. However, the goals of the security
namely, confidentiality, integrity, and availability can be very much threatened by this class
of attacks.

Security Attacks

Snooping Modification Denial of


Traffic analysis Masqueradin service
g
(Threat to confidentiality)
Replaying
(Threat to availability)
Repudiation

(Threat to integrity)

ATTACKS THREATENING CONFIDENTIALITY


In general, two types of attacks threaten the confidentiality of information: snooping and
traffic analysis.
Snooping: It refers to unauthorised access to or interception of data. For example, a file
transferred through the internet may contain confidential information. To prevent snooping,
the data can be made non-intelligible to the interceptor by using encipherment techniques.

5
Traffic analysis: Although encipherment of data may make it non-intelligible for the
interceptor, she can obtain some other type information by monitoring online traffic. For
example, she can find the e-mail address of the sender or receiver. she can collect pair of
request responses to help he guess the nature of transaction.

ATTACK THREATENING INTEGRITY


Modification: After intercepting or accessing information, the attacker modifies the
information to make it beneficial to herself. For example, a customer sends a message to a
bank to do some transaction. The attacker intercepts the message and changes the type of
transaction to benefit herself.

6
Masquerading: Masquerading, or spoofing, happens when the attacker impersonates
somebody else. For example, an attacker might steal the bank card and PIN of a bank
customer and pretend that she is that customer. For example, a user tries to contact a bank,
but another site pretends that it is the bank, but another site pretends that it is the bank and it
again to receive another payment from the user.

Replaying: The attacker obtains a copy of a message sent by a user and later tries to replay it.
For example, a person sends a request to her bank to as for payment. The attacker intercepts
the message and sends it again to receive another payment from the bank.

7
Repudiation: This type of attack is performed by one of the two parties, i.e. sender or
receiver. The sender of the message might deny that she has sent the message. The receiver of
the message might deny that she has received the message.
For example, suppose want to I purchase gold through bank. Today gold price is Rs 50,000
per 10 grams. I sent a message to bank, saying that Mr banker, kindly purchase 10 grams of
gold, and deduct the amount from my account. Tomorrow gold price comes down to
Rs.45,000 per 10 grams. I will be in loss side. Tomorrow I say to bank that, that message was
not sent by me.

ATTACKS THREATING AVAILABILITY


Denial of service: It may slow down or totally interrupt the service of a system. The attacker
can use several strategies to achieve this. She might send many bogus requests to a server that
server that the server crashes because of the heavy load. The attacker might intercept and
delay the server response to a client, making the client to believe that the server is not
responding.

8
In the present era, not only business but almost all the aspects of human life are driven by
information. Hence, it has become imperative to protect useful information from malicious
activities such as attacks. Let us consider the types of attacks to which information is
typically subjected to.

PASSIVEVERSUS ACTIVE ATTACKS


Basically, the Attacks are categorized based on the action performed by the attacker. An
attack, thus, can be passive or active.

PASSIVE ATTACKS
The main goal of a passive attack is to obtain unauthorized access to the information. For
example, actions such as intercepting and eavesdropping on the communication channel can
be regarded as passive attack.
These actions are passive in nature, as they neither affect information nor disrupt the
communication channel. A passive attack is often seen as stealing information. The only
difference in stealing physical goods and stealing information is that theft of data still leaves
the owner in possession of that data. Passive information attack is thus more dangerous than
stealing of goods, as information theft may go unnoticed by the owner.

Note: Snooping and traffic analysis are passive attacks, threatens the confidentiality.

ACTIVE ATTACKS
An active attack involves changing the information in some way by conducting some
process on the information. For example,
 Modifying the information in an unauthorized manner.

9
 Initiating unintended or unauthorized transmission of information.
 Alteration of authentication data such as originator name or timestamp associated
with information
 Unauthorized deletion of data.
 Denial of access to information for legitimate users (denial of service).

Note: Modification, masquerading, replaying, and repudiation are active attacks, threatens
the integrity. Denial of service is an active attack, threatens to the Availability.

Unit 1 Module 3

SECURITY SERVICES
The International Telecommunication Union - Telecommunication Standardization Sector
(ITU-T) X.800 has defined five services related security goals and attacks.

Data Confidentiality: It is designed to protect data from disclosure attacks. The service as
defined by X.800 is very broad and encompasses confidentiality of the whole message or part

10
of a message and protection against traffic analysis. That is, it is designed to prevent
snooping and traffic analysis attack.

Data Integrity: It is designed to protect from modification, insertion, deletion and replying
by an adversary may protect from the whole message or part of the message.

Authentication: This service provides the authentication of the party at the other end of the
line. In connection -oriented communication, it provides authentication of the sender or
receiver during the connection establishment(peer entity authentication).In connectionless
communication, it authenticates the source of the data(data origin authentication).

Nonrepudiation: It provides the services against repudiation by either the sender or the
receiver of the data. In repudiation with proof of origin, the receiver of the data can later
prove the identity of the sender it denied. In nonrepudiation with of delivery, the sender of
data can later prove that data were delivered to the intended recipient.

Access control: It provides protection against unauthorized access to data. The term access
in this definition is very broad and can involve reading, writing, modifying, executing
programs and so on.

SECURITY MECHANISMS
ITU-T(X.800) also recommends some security mechanisms to provide the security services.

11
Encipherment: This technique is hiding or covering data, can provide confidentiality. It
can also be used to complement other mechanisms to provide other services. Generally
using two techniques – Cryptography and steganography are using for enciphering.

Data Integrity:
The data integrity mechanism appends to the data a short check value that has been created
by a specific process from the data itself. The receiver receives the data and check the value.
She creates a new check value from the receive data and compare new related check value
with the one received. If the two values are the same, the integrity of data has been
preserved.

Data Signature: A digital signature is a means by which the sender can electronically sign
the data and the receiver can electronically verify the signature. The sender uses a person
that she owns a private key related to the public key that she has announced publicly.

Authentication Exchange: In authentication exchange, two entities exchange some


messages to prove their identity to each other. For example, one entity can prove that she
knows a secret that only she is supposed to know.

12
Traffic Padding: Traffic padding means inserting some bogus data into the data the data
traffic to thwart the adversary’s attempt to use the traffic analysis.

Routing Control: Routing control means selecting and continuously changing different
available routes between the sender and the receiver to prevent the opponent from
eavesdropping on a route.

Notarization: Notarization means selecting a third trusted party to content the communication
between two entities. This can be done, for example, to prevent repudiation. The receiver can
involve the trusted party to store the sender request in order to prevent the sender from later
denying that she has made such a request.

Access Control: Access control uses methods to prove that a user has access right to the data
or resources owned by a system. Example of proofs are passwords and PINs.

Relation between security services and security mechanisms


Security Service Security Mechanism
Data Confidentiality Encipherment and routing control
Data Integrity Encipherment, digital signature, data integrity
Authentication Encipherment, digital signature, authentication exchange
Nonrepudiation Digital signature, data integrity, and notarization
Access control Access control mechanism

MODEL FOR NETWORK SECURITY


Model 1: model for network security

13

Using this model require us to:
 Design a suitable algorithm for the security transformation.
 Generate the secret information (key) used by algorithm.
 Develop method to distribute and share the secret information (key).
 Specify the protocol that enabling the sender and receiver to use the transformation
and key for a security service.

Model 2: model for network access security

Using this model require us to:


 select the appropriate gatekeeper function to identify the users.
 implement security controls to ensure only authorized access designated information or
resources.
Note that this model does not include:
 Monitoring of system for successful penetration
 Monitoring for authorized users for reuse
14
 Auditing for forensic uses.

Unit 1- Module 4
INTEGER ARITHMETIC
In integer arithmetic we use a set and a few operations. You are familiar with this set and the
corresponding operations. but they are reviewed here to create a background for modular
arithmetic.

Set of Integers: The set of integers, denoted by Z, contains all integral numbers (with no
fraction) from negative infinity to positive infinity.

Binary Operations: In cryptography, we are interested in three binary operations applied to


the set of integers. A binary operation takes two inputs and creates one output. Three binary
operations for the set of integers are +, -, and ×.

15
Examples: The following shows the results of the three binary operations on two integers.
Because each input can be either positive or negative, we can have four cases for each
operation.

Integer Division: In integer arithmetic, if we divide a by n, we can get q and r. The


relationship between these four integers can be shown as a = q × n + r
Example: Assume that a = 255 and n = 11. We can find q = 23 and r = 2, using the division
algorithm.

Division algorithm for integers:


We impose two restrictions, first we require that the divisor be be a positive integer (n > 0),
second we require that the remainder be a non-negative integer (r ≥ 0)

Integer Division Example: When we use a computer or a calculator, r and q are negative
when a is negative. How can we apply the restriction that r needs to be positive? The
solution is simple, we decrement the value of q by 1 and we add the value of n to r to make it
positive.

We have determined -23 to become -24 and added n to -2 to make it 9.

16
The Graph of the relation: We can show the above relationwith the two restrictions on n and
r using two graphs below. The first one shows the case when a is positive and the second one
shows when a is negative.

Divisibility
If a is not zero and we let r = 0 in the division relation, we get a = q × n. If the remainder is

zero, then we write it as , If the remainder is not zero, we write it as

Example : The integer 4 divides the integer 32, because 32 = 8 × 4. So, we write

The number 8 does not divide the number 42,because 42 = 5 × 8 + 2, So we

Divisibility Properties
Property 1: if a|1, then a = ±1.
Property 2: if a|b and b|a, then a = ±b.
Property 3: if a|b and b|c, then a|c.
Property 4: if a|b and a|c, then
a|(m × b + n × c), where m and n are arbitrary integers.
Divisibility

Divisibility Example

17
Divisibility
Fact 1: The integer one has only one divisor, itself.
Fact 2: Any positive integer has at least two divisors, 1 and itself. (but it can have more).

GREATEST COMMON DIVISOR (GCD)


Figure below shows the Common divisors of two integers 140 and 12.

GCD of two positive integers is the largest integer that can divide both integers. The GCD of
140 and 12 is 4.

EUCLIDEAN ALGORITHM TO FIND GCD


Fact 1: gcd (a, 0) = a
Fact 2: gcd (a, b) = gcd (b, r), where r is the remainder of dividing a by b
Example- gcd (36,10) = gcd (10,6) = gcd (6,4) = gcd (4,2 )= gcd (2,0 )= 0
Euclidean Algorithm

18
When gcd (a, b) = 1, we say that a and b are relatively prime.

Example: Find the greatest common divisor of 2740 and 1760.


Solution: We have gcd (2740, 1760) = 20.

Example: Find the greatest common divisor of 25 and 60.


We have gcd (25, 65) = 5.

19
Unit 1- Module 5

MODULAR ARITHMETIC
The division relationship (a = q × n + r) discussed, in the previous section has two inputs (a
and n) and two outputs (q and r). In modular arithmetic, we are interested in only one of the
outputs, the remainder r.
Modulo Operator: The modulo operator is shown as mod. The second input (n) is called the
modulus. The output r is called the residue.
Figure below shows the relation between division algorithm and modulo operator

Modulo Operator Example: 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.
20
c. Dividing −18 by 14 results in r = −4.
After adding the modulus to r = 10.
d. Dividing −7 by 10 results in r = −7.
After adding the modulus to −7, r = 3.

Note: −X mod Y=Y − X mod Y

SET OF RESIDUES
The modulo operation creates a set, which in modular arithmetic is referred to as the set of
residues Zn. Some Zn sets are given below.

Congruence: To show that two integers are congruent, we use the congruence operator (≡).
For example, we write:

Concept of congruence

Residue Classes: A residue class [a] or [a]n is the set of integers congruent modulo n. In
other words it is the set of all integers x, such that x=a (mod n). For example, if n=5 we have
five sets [0], [1], [2], [3], and [4].

21
CIRCULAR NOTATION COMPARISON OF Z AND ZN
Figure below shows Comparison of Z and Zn using graphs

Example: We use modular arithmetic in our daily life; for example, we use a clock to
measure time. Our clock system uses modulo 12 arithmetic. However, instead of a 0 we use
the number 12.

OPERATION IN ZN
The three binary operations that we discussed for the set Z, can also be defined for the set Zn.
The result may need to be mapped to Zn using the mod operator.

22
Example: 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

Example:Perform the following operations (the inputs come from either Z or Zn):
a. Add 17 to 27 in Z14 b. Subtract 43 from 12 in Z13 c. Multiply 123 by −10 in Z19.
Solution

Properties of operation in Zn

23
The following shows the application of the above properties:
1. (1,723,345 + 2,124,945) mod 11 = (8 + 9) mod 11 = 6
2. (1,723,345 − 2,124,945) mod 11 = (8 − 9) mod 11 = 10
3. (1,723,345 × 2,124,945) mod 11 = (8 × 9) mod 11 = 6

Unit 1- Module 6
INVERSES
When we are working in modular arithmetic, we often need to find the inverse of a number
relative to an operation. We are normally looking for an additive inverse (relative to an
addition operation) or a multiplicative inverse (relative to a multiplication operation).

Additive Inverse: In Zn, two numbers a and b are additive inverses of each other if

In modular arithmetic, each integer has an additive inverse. The sum of an integer and its
additive inverse is congruent to 0 modulo n.

24
Example: Find all additive inverse pairs in Z10.
Solution: The six pairs of additive inverses are (0, 0), (1, 9), (2, 8), (3, 7), (4, 6), and (5, 5).

Multiplicative Inverse
In Zn, two numbers a and b arethe multiplicative inverse of each other if

In modular arithmetic, an integer may or may not have a multiplicative inverse. When it does,
the product of the integer and its multiplicative inverse is congruent to 1 modulo n.
Example: 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: 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.
Example: 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).

EXTENDED EUCLIDEAN ALGORITHM


The extended Euclidean algorithm finds the multiplicative inverses of b in Zn when n and b
are given and gcd (n, b) = 1. The multiplicative inverse of b is the value of t after being
mapped to Zn.
Figure 2.15 Using extended Euclidean algorithm to find multiplicative inverse

25
Find the multiplicative inverse of 11 in Z26.

The gcd (26, 11) is 1, which means that the multiplicative inverse of 11 exists. The extended
Euclidean algorithm gives .The multiplicative inverse is (-7) mod 26=19. In other words 11
and 19 are multiplicative inverses in . We can see that (11×19) mod 26=209 mod 26=1.

Find the multiplicative inverse of 23 in Z100.

The gcd (100, 23) is 1, which means that the inverse of 23 exists The extended Euclidean
algorithm gives .The multiplicative inverse is (-13) mod 100=87. In other words 13 and 87
are multiplicative inverses in . We can see that (23×87) mod 100=2001 mod 100=1.

Find the inverse of 12 in Z26.

26
The gcd (26, 12) is 2 ≠1; the inverse does not exist.

ADDITION AND MULTIPLICATION TABLES


Figure below represents Addition and multiplication table for Z10

Different Sets: We need to use Zn when additive inverses are needed; we need to use Zn*
when multiplicative inverses are needed. Figure 2.17 Some Zn and Zn* sets

Two More Sets: Cryptography often uses two more sets: Zp and Zp*. The modulus p in these
two sets is a prime number.

MATRICES
In cryptography we need to handle matrices. Although this topic belongs to a special branch
of algebra called linear algebra, the following brief review of matrices is necessary
preparation for the study of cryptography.
Figure: A matrix of size l x m

27
Figure Examples of matrices

Operations and Relations: Equality, Addition, Subtraction, multiplication


Figure shows an example of addition and subtraction.

Figure shows the product of a row matrix (1 × 3) by a column matrix (3 × 1).The result is a
matrix of size 1 × 1.

Figure shows the product of a 2 × 3 matrix by a 3 × 4 matrix. The result is a 2 × 4 matrix.


Figure : Multiplication of a 2 × 3 matrix by a 3 × 4 matrix

Figure 2.23 shows an example of scalar multiplication

28
Determinant: The determinant of a square matrix A of size m × m denoted as det (A) is a
scalar calculated recursively as shown below:

The determinant is defined only for a square matrix


Figure 2.24 shows how we can calculate the determinant of a 2 × 2 matrix based on the
determinant of a 1 × 1 matrix.
Figure Calculating the determinant of a 2 × 2 matrix

Figure: shows the calculation of the determinant of a 3 × 3 matrix.

INVERSES OF MATRICES
Additive inverse of a matrix is another matrix B such that A + B = 0.
Multiplicative inverse of a matrix A is another matrix B such that A × B = B × A = I.
Multiplicative inverses are only defined for square matrices. Multiplicative inverse exists
only if the det(A) has a multiplicative inverse in the corresponding set.
RESIDUE MATRICES
Cryptography uses residue matrices: matrices with all elements in Zn. All operations on
residue matrices are performed the same as for the integer matrices except that the operations
are done in modular arithmetic. One interesting result is that a residue matrix has a
29
multiplicative inverse if the determinant of the matrix has a multiplicative inverse in . In other
words, a residue matrix has a multiplicative inverse if gcd(det(A), n)=1.
Figure: A residue matrix and its multiplicative inverse in Z26

Two matrices are congruent modulo n, written as A≡B (mod n). if they have the same
number of rows columns and all corresponding elements are congruent modulo n. In other
words, A≡B (mod n), if ≡ (mod n) for all i’s and j’s.

LINEAR CONGRUENCE
Cryptography often involves solving an equation or a set of equations of one or more
variables with coefficient in Zn. This section shows how to solve equations when the power of
each variable is 1 (linear equation).

SINGLE-VARIABLE LINEAR EQUATIONS


Equations of the form ax ≡ b (mod n ) might have no solution or a limited number of
solutions.

If d|b, we use the following strategy to find solutions:


1. Reduce the equation by dividing both sides by d.
2. Multiply both sides of the reduced equation by multiplicative inverse of a (including the
modulus) to find the particular solution x0.
3. The general solutions are x = x0 + k(n/d) for k = 0, 1, 2, …, (d-1).
Example: Solve the equation 10 x ≡ 2(mod 15).
First, we find the gcd (10 and 15) = 5.
Since 5 does not divide 2, we have no solution.

30
Example Solve the equation 14 x ≡ 12 (mod 18). We have exactly two equations, but first we
reduce the equation.

Example Solve the equation 3x + 4 ≡ 6 (mod 13).


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).

SET OF LINEAR EQUATIONS


We can also solve a set of linear equations with the same modulus if the matrix formed from
the coefficients of the variables is invertible. We make three matrices. The first is the square
matrix made from the collection of coefficients of the variables. The second is the column
matrix made from the variables. The third is a column matrix made from the values of the
right-hand side of the congruence operator. We can interpret the set of equations as matrix
multiplication.

Example: Solve the set of 3 equations


3x+5y+7z ≡ 3 (mod 16)
x+4y+13 z ≡ 5 (mod 16)
31
2x +7y+3 z ≡ 4 (mod 16)
Solution:
× = , this implies that mod 16

32

You might also like