Professional Documents
Culture Documents
3
Course Outlines
Matrices:
4
Course Outlines
Algebra:
5
Prerequisite
Advanced Mathematics
6
Key References/Textbooks
1. D.S. Dummit and R.M. Foote, “Abstract
Algebra”, John Wiley
2. Michael Artin, “Algebra”, Pearson Education.
3. N. Jacobson, “Basic Algebra I”, Hindustan
Publishing Company.
4. William Stallings, "Cryptography and Network
Security Principles and Practice", Pearson
Education. 7
Delivery Modes
Lecture: Two Hrs per week
Laboratory Practical's: Two Hrs per week
Tutorial: One Hr per week
8
Assessments
Course Work: 40 Marks
9
Introduction
What is IT Security?
Why Information System Security
To prevent theft of or damage to the hardware
To prevent theft of or damage to the information
To prevent disruption of service
11
Principle of Security
Confidentiality:
The principle of confidentiality specifies that only the
sender and the intended recipient should be able to
access the content of the message.
12
Principle of Security
Integrity
The term 'integrity' means guarding against improper
information modification or destruction, and includes
ensuring information non-repudiation and authenticity
13
Principle of Security
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 constantly changed, which
means it must be accessible to authorized entities.
14
Principle of Security
Availability:
The unavailability of information is just as harmful
for an organization as the lack of confidentiality or
integrity. Imagine what would happen to a bank if the
customers could not access their accounts for
transactions.
15
Security Attacks
What is security attacks?
16
Security Attacks
Diagram
17
Security Attacks
Snooping
Snooping refers to unauthorized access to or
interception of data. For example, a file transferred
through the Internet may contain confidential
information. An unauthorized entity may intercept the
transmission and use the contents for her own benefit.
To prevent snooping, the data can be made non
intelligible to the interceptor by using encipherment
18
Security Attacks
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 electronic address (such
as the e-mail address) of the sender or the receiver.
She can collect pairs of requests and responses to help
her guess the nature of transaction
19
Security Attacks
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. Note that sometimes the
attacker simply deletes or delays the message to harm
20
Security Attacks
Masquerading/Spoofing
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.
Sometimes the attacker pretends instead to be the
receiver entity. For example, a user tries to contact a
bank, but another site pretends that it is the bank and
21
Security Attacks
Replaying
Replaying is another attack. 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 ask for payment to the attacker, who has done
a job for her. The attacker intercepts the message and
sends it again to receive another payment from the
bank.
22
Security Attacks
Repudiation
This type of attack is different from others because it
is performed by one of the two parties in the
communication: the sender or the receiver. The sender
of the message might later deny that she has sent the
message; the receiver of the message might later deny
that he has received the message.
23
Security Attacks
Repudiation
An example of denial by the sender would be a bank
customer asking her bank to send some money to a
third party but later denying that she has made such a
request. An example of denial by the receiver could
occur when a person buys a product from a
manufacturer and pays for it electronically, but the
manufacturer later denies having received the
24
Security Attacks
Denial of Service
Denial of service (DoS) is a very common attack. It
may slow down or totally interrupt the service of a
system. The attacker can use several strategies to
achieve this. She might send so many bogus requests
to a server that the server crashes because of the
heavy load.
25
Security Attacks
Denial of Service
The attacker might intercept and delete a server’s
response to a client, making the client to believe that
the server is not responding. The attacker may also
intercept requests from the clients, causing the clients
to send requests many times and overload the system
26
Mathematics in Security
How does mathematics relate to IT security?
Integer Arithmetic
Set of Integers
The set of integers, denoted by Z, contains all integral
numbers (with no fraction) from negative infinity to
positive infinity
Integer Arithmetic
Binary Operations
Integer Arithmetic
Divisibility
When we are not interested in the value of q, we can
write the above relationship as a|n.
If the remainder is not zero, then n does not divide a
and we can write the relationship as a n.
Integer Arithmetic
Divisibility
Examples:
We have 13|78, 7|98, −6|24, 4|44, and 11|(−33).
Integer Arithmetic
Properties of divisibility
Example:
Since 3|15 and 15|45, according to the third property,
3|45.
Integer Arithmetic
All Divisors
A positive integer can have more than one divisor. For
example, the integer 32 has six divisors: 1, 2, 4, 8, 16,
and 32. We can mention two interesting facts about
divisors of positive integers:
Integer Arithmetic
Perfect integer
What is perfect integer?
Integer Arithmetic
Greatest Common Divisor
One integer often needed in cryptography is the
greatest common divisor of two positive integers. Two
positive integers may have many common divisors,
but only one greatest common divisor. For example,
the common divisors of 12 and 140 are 1, 2, and 4.
However, the greatest common divisor is 4.
The greatest common divisor of two positive integers
35
Integer Arithmetic
Example: evaluate the followings
1. gcd(18,30)
2. gcd(48,96)
3. gcd(225,120)
36
Integer Arithmetic
Euclidean Algorithm
37
Integer Arithmetic
Euclidean Algorithm using Table:
Consider the table below:
38
Integer Arithmetic
Euclidean Algorithm
39
Integer Arithmetic
Euclidean Algorithm
40
Integer Arithmetic
Extended Euclidean Algorithm
Given two integers a and b, we often need to find
other two integers, s and t, such that:
43
Integer Arithmetic
Extended Euclidean Algorithm
Consider the table below
44
Integer Arithmetic
Extended Euclidean Algorithm
Examples:
Using extended Euclidean algorithm evaluate gcd of
the following numbers and their respective values of s
and t.
1. 88 and 220
2. 300 and 42
45
Linear Diophantine Equations
linear Diophantine equations of two variables, an
equation of type ax + by = c. We need to find
integer values for x and y that satisfy the equation.
This type of equation has either no solution or an
infinite number of solutions.
46
Linear Diophantine Equations
Let d = gcd (a, b)
If then the equation has no solution
If d | c, then we have an infinite number of
solutions. One of them is called the particular; the
rest, general
47
Linear Diophantine Equations
Particular solution
If d| c, a particular solution to the above equation can
be found using the following steps:
1. Reduce the equation to a1x + b1y = c1 by dividing
both sides of the equation by d. This is possible
because d divides a, b, and c by the assumption.
48
Linear Diophantine Equations
Particular solution
2. Solve for s and t in the relation a1s + b1t = 1 using
the extended Euclidean algorithm.
3. The particular solution can be found:
49
Linear Diophantine Equations
General solution
After finding the particular solution, the general
solutions can be found:
50
Linear Diophantine Equations
Example:
51
Discussion Questions
Example:
52
Discussion Questions
Example:
53
Modular Arithmetic
What is modular arithmetic?
54
Modular Arithmetic
The division relationship (a = q × n + r) discussed
in binary operation 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. We don’t care about
the quotient q.
In other words, we want to know what is the value
of r when we divide a by n. 55
Modular Arithmetic
This implies that we can change the above relation
into a binary operator with two inputs a and n and
one output r.
56
Modulo Operator
The above-mentioned binary operator is called the
modulo operator and is shown as mod. The second
input (n) is called the modulus. The output r is
called the residue.
57
Modulo Operator
Diagram below shows the division relation
compared with the modulo operator
58
Application of Modulo Arithmetic in
Security
Key Generation:
In public-key cryptography, you generate a pair of
keys - a public key and a private key. Modular
arithmetic helps ensure that these keys are related in a
way that is computationally difficult to reverse.
59
Application of Modulo Arithmetic in
Security
Encryption:
When you encrypt a message with someone's public
key, modular arithmetic is used to perform
mathematical operations that transform the plaintext
into ciphertext. The modulus ensures that the
ciphertext stays within a certain numerical range,
preventing information leakage
60
Application of Modulo Arithmetic in
Security
Decryption:
To decrypt the ciphertext and obtain the original
message, modular arithmetic with the private key is
used. Again, the modulus is crucial in reversing the
encryption process.
61
Application of Modulo Arithmetic in
Security
RSA Security:
Modular arithmetic relies on the difficulty of certain
mathematical problems, like factoring large numbers
into their prime factors (RSA's security is based on
this). It's computationally challenging, which
enhances the security of the encryption scheme.
62
Properties of Modulo Operation
The result of the modulo operation with modulus n
is always an integer between 0 and n − 1
In other words, the result of a mod n is always a
nonnegative integer less than n.
a mod n, if a<n then the answer is a
63
Set of Residues: Zn
Consider the followings:
64
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
65
Congruence
In cryptography, we often used the concept of
congruence instead of equality.
For example, the result of 2 mod 10 = 2, 12 mod 10
= 2, 22 mod 2 = 2, and so on. In modular
arithmetic, integers like 2, 12, and 22 are called
congruent mod 10
66
Congruence
To show that two integers are congruent, we use the
congruence operator (≡). We add the phrase (mod n)
to the right side of the congruence to define the
value of modulus that makes the relationship valid
67
Congruence
The congruence operator looks like the equality
operator, but there are differences.
First, an equality operator maps a member of Z to
itself; the congruence operator maps a member
from Z to a member of Zn.
Second, the equality operator is one to-one; the
congruence operator is many-to-one.
68
Operations in Zn
The three binary operations (addition, subtraction,
and multiplication) that we discussed for the set Z
can also be defined for the set Zn. The result may
need to be mapped to Zn
69
Operations in Zn
Example 1
Perform the following operations
a. Add 7 to 14 in Z15.
b. Subtract 11 from 7 in Z13.
c. Multiply 11 by 7 in Z20
70
Operations in Zn
Example 2
Perform the following operations:
a. Add 17 to 27 in Z14.
b. Subtract 43 from 12 in Z13.
c. Multiply 123 by −10 in Z19
71
Properties of Operations in Zn
The following properties allow us to first map the
two inputs to Zn (if they are coming from Z) before
applying the three binary operations (+, −, ×).
72
Operations in Zn
Example 3
Evaluate the followings:
1. (1,723,345 + 2,124,945) mod 11
2. (1,723,345 − 2,124,945) mod 16
3. (1,723,345 × 2,124,945) mod 16
73
Powers of 10
In arithmetic, we often need to find the remainder
of powers of 10 when divided by an integer.
74
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).
75
Inverses
Additive Inverse
In Zn, two numbers a and b are additive inverses of
each other if
76
Inverses
Additive Inverse
In Zn, the additive inverse of a can be calculated as
b = n − a.
For example, the additive inverse of 4 in Z10 is 10 −
4 = 6.
77
Inverses
Additive Inverse
Note that in modular arithmetic, each number has an
additive inverse and the inverse is unique; each
number has one and only one additive inverse.
However, the inverse of the number may be the
number itself
78
Inverses
Additive Inverse
Example:
Find all additive inverse pairs in Z10
79
Inverses
Multiplicative Inverse
In Zn, two numbers a and b are the multiplicative
inverse of each other if:
81
Inverses
Multiplicative Inverse
It can be proved that a has a multiplicative inverse in
Zn if and only if gcd (n, a) = 1. In this case, a and n
are said to be relatively prime.
82
Inverses
Multiplicative Inverse
Example 1:
Find the multiplicative inverse of 8 in Z10
83
Inverses
Multiplicative Inverse
Example 2:
Find all multiplicative inverses in Z10
84
Inverses
Multiplicative Inverse
Example 3:
Find all multiplicative inverse pairs in Z11
85
Inverses
Multiplicative Inverse
Example 3:
Find all multiplicative inverse pairs in Z11
86
Multiplicative Inverse Using Extended
Euclidean Algorithm
The extended Euclidean algorithm we discussed
earlier can find the multiplicative inverse of b in Zn
when n and b are given and the inverse exists. To
show this, let us replace the first integer a with n
(the modulus). We can say that the algorithm can
find s and t such s × n + b × t = gcd (n, b).
87
Multiplicative Inverse Using Extended
Euclidean Algorithm
However, if the multiplicative inverse of b exists,
gcd (n, b) must be 1. So the relationship is:
88
Multiplicative Inverse Using Extended
Euclidean Algorithm
Now we apply the modulo operator to both sides. In
other words, we map each side to Zn. We will have
89
Multiplicative Inverse Using Extended
Euclidean Algorithm
Example 1
By using extended Euclidean algorithm, Find the
multiplicative inverse of 11 in Z26.
90
Multiplicative Inverse Using Extended
Euclidean Algorithm
Example 2
By using extended Euclidean algorithm, Find the
multiplicative inverse of 23 in Z100.
91
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).
92
Single- Variable Linear Equations
Let us see how we can solve equations involving a
single variable, that is, equations of the form
ax ≡ b (mod n). An equation of this type might have
no solution or a limited number of solutions.
93
Single- Variable Linear Equations
Assume that the gcd (a, n) = d
If , there is no solution. If d|b, there are d
solutions
94
Single- Variable Linear Equations
If d|b, we use the following strategy to find the
solutions:
1. Reduce the equation by dividing both sides of the
equation (including the modulus) by d.
2. Multiply both sides of the reduced equation by the
multiplicative inverse of a to find the particular
solution x0.
3. The general solutions are x = x0 + k (n/d) for k = 0,
1, . . . , (d − 1). 95
Single- Variable Linear Equations
Example 2
Solve the equation 14x ≡ 12 (mod 18).
96
Single- Variable Linear Equations
Example 2
Solve the linear congruences
1. 9x ≡ 6 (mod 15).
2. 10x ≡ 15 (mod 45).
3. 183x ≡ 15(mod 31).
97