0% found this document useful (0 votes)
172 views147 pages

Cyber Security Evaluation Criteria

The document provides information about the summer term course CSE4003 - Cyber Security Theory and Project Based Component. It outlines the evaluation pattern and rubrics for assessing student performance in the theory and project components. For the theory component, students will be evaluated based on quizzes, digital assignments, a mid-term test, and a final assessment test. The project component involves three reviews to assess the students' cyber security project at different stages of implementation. Detailed rubrics are provided to evaluate students in the theory and project components. The document also provides information about the Google Classroom that will be used for the course.

Uploaded by

Sriram Vangaveti
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)
172 views147 pages

Cyber Security Evaluation Criteria

The document provides information about the summer term course CSE4003 - Cyber Security Theory and Project Based Component. It outlines the evaluation pattern and rubrics for assessing student performance in the theory and project components. For the theory component, students will be evaluated based on quizzes, digital assignments, a mid-term test, and a final assessment test. The project component involves three reviews to assess the students' cyber security project at different stages of implementation. Detailed rubrics are provided to evaluate students in the theory and project components. The document also provides information about the Google Classroom that will be used for the course.

Uploaded by

Sriram Vangaveti
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/ 147

Summer Term V

CSE4003 - Cyber Security


Theory and Project Based Component
Evaluation Pattern & Rubrics for the
Assessment
Theory
Evaluation Type Max Marks / Date / Deadline of Hour
Weightage % Test
Quiz I 10 / 10 30th July, 2022 5.00 pm to 5.50 pm
(Sat)
(Thursday order)
Digital Assignment 10 / 10 4th Aug, 2022 -
(Thursday) -
Deadline
Mid Term Test 50 / 30 6th (Sat), 7th -
(Sun),
8th Aug (Mon),
2022
Quiz II 10 / 10 23rd Aug, 2022 4.00 pm to 4.50 pm
(Tues)
FAT 100/40 - -
Theory - Rubrics for Assessment
Evaluation Type Rubrics

Quiz I Multiple choice type questions will be


uploaded in the google class room
and tick the correct answer in this
platform.
Digital Assignment Problems / case study topics will be
given and write the answer and
upload the same in VTOP.
a) Correct answer for the problem /
case study – (8 marks)
b) Formatting of the report
(2 marks)
Quiz II Multiple choice type questions will be
uploaded in the google class room
and tick the correct answer in this
platform.
Project Based Component
Deadline for Submission of the Project Title: 16.07.22

Evaluation Max Marks / Date / Deadline of Test Hour


Type Weightage %

Review I 20 / 20 21st (Thurs), July 2022 5.00 to 5.50 pm

22nd (Fri), July 2022 8.00 am to 8.50 am &


2.00 pm to 2.50 pm
Review II 30 / 30 12th Aug (Fri), 2022 2.00 pm to 2.50 pm

13th Aug (Sat), 2022 10.00 am to 10.50 am &


Tuesday order 4.00 pm to 4.50 pm
Review III 50 / 50 19th Aug (Fri), 2022 2.00 pm to 2.50 pm

20th Aug (Sat), 2022 8.00 am to 8.50 am &


Friday order 2.00 pm to 2.50 pm
Project - Rubrics for Assessment
Minimum 5 and Maximum 7 per batch
Evaluation Rubrics
Type

Review I (20 Identify the tool, Detailed description of the tool including the
marks) purpose, various features, advantages, etc and Installation
Team work - (15 marks)
Viva --- Individual’s performance - (5 marks)

Review II (30 80 % of the implementation – Team work – (25 marks)


marks) Viva --- Individual’s performance - (5 marks)

Review III Complete Demonstration of the tool – Team work – (30 marks)
(50 marks) Report Submission - Team work – (10 marks)
Viva --- Individual’s performance - (10 marks)
Google Class Room

• https://classroom.google.com/c/NDk2OTczNzk
3NDEx?cjc=5qkznnl
• Class code: 5qkznnl
Dr. V.Ilayaraja
Associate Professor
Department of IoT,
SCOPE
Class 1
Module 1
Introduction to Number Theory
Topic 1
Finite Fields and Number Theory
Finite Fields and Number Theory
• Number theory is pervasive in cryptographic algorithms.
• The main goal of number theory is to discover interesting and
unexpected relationships between different sorts of numbers
and to prove that these relationships are true.
How is number theory used in real life?

• The most important application of number theory is that it is


the key foundation of cryptography.
• Our strong encryption algorithms and systems have
developed because of the impetus provided by number
theory.
DIVISIBILITY AND THE DIVISION ALGORITHM
Divisibility
• We say that a nonzero b divides a if a = mb for some m, where
a, b, and m are integers.
• That is, b divides a if there is no remainder on division. The
notation b│a is commonly used to mean b divides a.
• Also, if b│a, we say that b is a divisor of a.
Cont…
• Example,
• The positive divisors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24.
• Subsequently, we will need some simple properties of
divisibility for integers, which are as follows:

a = 11, b = 66, c = 198


11 | 66 = 6 X 11 = 66, R = 0
66 | 198 = 3 X 66 = 198, R=0
So, 11|198=18X11=198, R=0
Division Algorithm
• Given any positive integer n and any nonnegative integer a, if
we divide a by n, we get an integer quotient q and an integer
remainder r that obey the following relationship:
• a = qn + r 0 ≤ r < n; q = [a/n]
• For ex, a = 15, n = 5,
• 15 = q (5) + r
So, 5│15, q = 3, r = 0 (15= 3 x 5 + 0)
• Another example, a = 29, n = 3,
• 29 = q (3) + r
So, 3│29, q = 9, r = 2 (29 = 9 X 3 + 2)
• Both examples satisfies the condition
Cont…
Example:
• qn ≤ a and (q+1)n > a

• a = qn + r a = qn + r
• 7 (n) | 11 (a) = q = 1, r = 4 7 (n) | -11 (a) = q = -2, r = 3
• 11 = 1 X 7 + 4 -11 = (-2) X 7 + 3
• 7 ≤ 11 -7>-11
• When we have negative a value, q will be added one more value
in the procedure of positive a value
Exercise:
1. a = 123 and n = 9, q & r?
2. a = -123 and n = 9, q & r?
3. a = 36 and n = 5, q & n?
4. a = -36 and n = 5, q & n?
Answers
1. q = 13 & r = 6
2. q = -14 & r = 3
3. q=7&r=1
4. q = -8 & r = 4
Class 2
Module 1
Introduction to Number Theory
Topic
Modular Arithmetic & Congruence
Modular Arithmetic
Modulus
• If a is an integer and n is a positive integer, we define a mod n
to be the remainder when a is divided by n. The integer n is
called the modulus.
• Thus, for any integer a, we can rewrite the Equation as
follows:
• a = qn + r 0 ≤ r 6 < n; q = [a/n];
• a = [a/n] x n + (a mod n)
• Ex, 11 mod 7 = 4; Ex, -11 mod 7 = 3;
• 11 = 1 (7) + 4; = 7 – (11 mod 7);
• 11 = 11 =7–4=3
-11 = -2 (7) + 3
-11 = -14 + 3
-11 = -11
Congruent modulo

• Let us know the meaning of equality principle.


• Two numbers are equal. For example, if a = 8 and b = 8, then
we would say that a and b are equal. Similarly, a is congruent
(≡) to b(mod n) if and only if (a – b) is a multiple of n.
• Therefore, two unequal numbers let us say a and b may be
congruentially equal under the modulo divison operation.
• Let a, b and n be integers with n not equal to zero. We say
that a ≡ b(mod n) if (a – b) is a multiple of n or n │ (a – b).
• Ex, 73 ≡ 4 (mod 23) 73 – 4 = 69
• 73 mod 23 = 4 mod 23 23 │69
• 4=4
Congruent modulo
• Two integers a and b are said to be congruent modulo n, if
(a mod n) = (b mod n).
• a ≡ b (mod n)
• For ex,
 73 ≡ 4 (mod 23)
 73 mod 23 = 4 mod 23
4 = 4
• For ex,
 24 ≡ 2 (mod 10)
 24 mod 10 = 2 mod 10
 4≠2
Properties of Congruences
• 1. a ≡ b (mod n) if n │ (a - b).
• 2. a ≡ b (mod n) implies b ≡ a (mod n).
• 3. a ≡ b (mod n) and b ≡ c (mod n) imply a ≡ c (mod n).
Example for property 1
• a ≡ b (mod n) if n │ (a - b)
• 73 ≡ 4 (mod 23)
• 23 │ (73-4)
• 23 │ 69 = 3
• Yes. Condition is satisfied. 73 ≡ 4 (mod 23)
Example for property 2
• a ≡ b (mod n) implies b ≡ a (mod n)
• 73 ≡ 4 (mod 23)
• n│a–b
• 23 │ (73-4)
• 23 │ 69 = 3

• 4 ≡ 73 (mod 23)
• n│b–a
• 23 │ 4 – 73
• 23 │ – 69 = 3
• Condition is satisfied
Example for property 3
• a ≡ b (mod n) and b ≡ c (mod n) imply a ≡ c (mod n)
• a ≡ b (mod n) = n │a – b ------- 1
• b ≡ c (mod n) = n │b – c ------- 2
• 1+2
• n│a–b+b–c
• n │a – c
• a ≡ c (mod n)

• Ex, n= 5, a = 30, b= 15, c =10

• n │a – b = 5 │ 30 – 15 = 5 │ 15
• n │b – c = 5 │ 15 – 10 =5│5
• n │a – c = 5 │ 30 – 10 = 5 │ 20
• Condition is satisfied
Other Example 1
Other Example 2
Other Example 3
Properties of Modular Arithmetic
Example for the Properties of Modular
Arithmetic
Exponentiation
• Exponentiation is performed by repeated multiplication, as in
ordinary arithmetic.

117=1,94,87,171
=1,94,87,171 mod 13
=2
Additive and multiplicative
inverse modulo 8
Residue classes
Other Properties of Modular Arithmetic
Class 3
Module 1
Introduction to Number Theory

Topic 3 & 4
Euclidean and Extended Euclidean Algorithm
THE EUCLIDEAN ALGORITHM
• It is a simple procedure for determining the greatest common
divisor of two positive integers.
• The greatest common divisor of a and b is the largest
integer that divides both a and b.
Cont…
• More formally, the positive integer c is said to be the greatest
common divisor of a and b if
1. c is a divisor of a and of b.
2. any divisor of a and b is a divisor of c.
• For example,
GCD (30, 45) = 15
• Because we require that the greatest common divisor be
positive, gcd(a, b) = gcd(a, -b) = gcd(-a, b) = gcd(-a, -b).
• For example,
GCD (60, 24) = GCD (60, -24) = 12
Find GCD (710, 310) using Euclidean algorithm
a = 710, b = 310
Formulae Example
a≥b>0
• a = q1b + r1 0 ≤ r1 < b 710 = 2 X 310 + 90
• b = q2r1 + r2 0 ≤ r2 < r1 310 = 3 X 90 + 40
• r1 = q3r2 + r3 0 ≤ r3 < r2 90 = 2 X 40 + 10
• r2 = q4r3 + r4 0 ≤ r4 < r3 40 = 4 X 10 + 0
.
.
• rn−1 = qn+1 rn + 0
• d = GCD (a, b) = rn d=GCD (710, 310) = 10

Last non-zero reminder is GCD


Quick Understanding

GCD is 2
Find GCD (1180, 482) using Euclidean algorithm

q a b r
2 1180 482 216
2 482 216 50
4 216 50 16
3 50 16 2
8 16 2 0

GCD is 2
Relative Primes

• Two integers are relatively prime if and only if their only


common positive integer factor is 1.
 GCD (a, b) = 1
 GCD (8, 15) = 1
 15 = 1 x 8 + 7
8 = 1 x 7 + 1
7 = 7 X 1 + 0
Special points

• GCD (a, 0)=a


• GCD (0, b)=b
Exercise
1. Find GCD (2740, 1760) using Euclidean Algorithm.
2. Find GCD (25, 60) using Euclidean Algorithm. (Assume that
first number should be smaller than second number in the
initial step)
Answers

1. GCD (2740, 1760) = 20


2. GCD (25, 60) = 5
Extended Euclidean Algorithm
• Given two integers a & b, we often need to
find other two integers, s & t such that,
 s x a + t x b = GCD (a, b)
Difference between Euclidean and EEA
Euclidean EEA
Calculating the GCD (a, b) Calculating the GCD (a, b)
and two more variables s & t

Only one set of calculation 3 sets of calculations


Example 1: Find GCD of (161, 28) using EEA and
also find s & t
q a b r s1 s2 s t1 t2 t
5 161 28 21 1 0 1 0 1 -5
1 28 21 7 0 1 -1 1 -5 6
3 21 7 0 1 -1 4 -5 6 -23

5 Initial Assumptions are s1 = 1, s2 = 0


28 161 But, t1 = 0, t2 = 1
140
21 s = s1 – s2q, similarly, t = t1 – t2q,
s = 1 – 0 (5) t = 0 – 1 (5)
s=1 t = -5

So, GCD (161, 28) = 7 and S = -1 and t = 6


Testing of Answer
• s x a + t x b = GCD (a, b)
• (-1 x 161) + (6 x 28) = 7
• -161+168 = 7
• 7=7
• Proved
Exercise
• Find GCD (4864, 3458), s & t
Answer

• GCD (4864, 3458) = 38, s = 32 & t = -45


Class 4
Module 1
Introduction to Number Theory
Topic 5
Little Fermat’s Theorem
Topic 6
Euler’s Theorem
Little Fermat’s Theorem
• “P” is a prime number
• “a” is any positive integer
• “a” doest divide “P” and “P” doest divide “a”
• ap-1  1 (mod p)
Example 1
• P =5, a = 2
• ap-1  1 (mod p)
• Substitute the given numbers in the above equation
• 25-1  1 (mod 5)
• 24  1 (mod 5)
• 16  1 (mod 5)
• 16 mod 5 = 1 mod 5
• 1=1
• Now, Fermat’s theorem holds true
Example 2
• P =7, a = 3
• ap-1  1 (mod p)
• Substitute the given numbers in the above equation
• 37-1  1 (mod 7)
• 36  1 (mod 7)
• 32 32.32  1 (mod 7)
• 9.9.9  1 (mod 7)
• 2.2.2  1 (mod 7)
• 8  1 (mod 7)
• 8 mod 7 = 1 mod 7
• 1=1
• Now, Fermat’s theorem holds true
Example 3
• What is the remainder when 72001 is divided by 5?
• Here, p = 5, a = 7
• ap-1  1 (mod p)
• 74  1 (mod 5)
• 72.72  1 (mod 5)
• 4.4  1 (mod 5)
• 16  1 (mod 5) = 1
• 78  1 (mod 5)
• 712  1 (mod 5)
• 716  1 (mod 5)
• 72000  1 (mod 5) = 1
• 72000 .71 1 (mod 5)
• 1. 71 1 (mod 5) = 2
• 72001  2 (mod 5)
Exercise 1
• What is the remainder when 2438 is divided by
7?
Answer

• What is the remainder when 2438 is divided by 7?


• Answer = 2
Euler’s Theorem
• “a” and “n” can be any number
• But “a” and “n” should be relatively prime
• Relatively prime means ,
– Gcd (a, n) = 1
• a(n)  1 (mod n)
- where, (n) is Euler’s Totient function
Example 1
• a = 3, n=10
• a(n)  1 (mod n)
• Substitute the values in the above formulae
• 3(10)  1 (mod 10)
• Φ (10) = Factors of 10 are, 2 & 5
» 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
» GCD (10, 1), (10, 3), (10, 7), (10, 9) = 1
» Condition is satisfied
• So, Φ (10) = 4
• 34  1 (mod 10)
• 81  1 (mod 10)
• 81 mod 10 = 1 mod 10
• 1=1
• Now, Euler’s Theorem holds true
Example 2
• a = 5, n=12
• a(n)  1 (mod n)
• Substitute the values in the above formulae
• 5(12)  1 (mod 12)
• Φ (12) = Factors of 12 are, 2, 3, 4, 6
» 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
» GCD (12, 1), (12, 5), (12, 7), (12, 11) = 1
» Condition is satisfied
• So, Φ (12) = 4
• 54  1 (mod 12)
• 54 mod 12  1 mod 12
• 52.52 mod 12  1 mod 12
• 25.25 mod 12  1 mod 12
• 1.1 mod 12  1 mod 12
• 1=1
• Now, Euler’s Theorem holds true
Example 3
What is the value of Φ (13)?
Φ (n) = n-1 = 13-1 = 12
Class 5
Module 1
Introduction to Number Theory

Topic 6
Chinese Remainder Theorem
Chinese Remainder Theorem
• Chinese Remainder Theorem (CRT) is used to solve a set of
congruent equations with one variable but different moduli
(d) which are relatively prime as shown below:
 x ≡ a1 (mod m1)
 x ≡ a2 (mod m2)



 x ≡ ak (mod mk)
• CRT states that the above eqns have a unique solution if the
moduli are relatively prime.
• CRT is developed by the Chinese mathematician Sun-tzu
Example Problem
Find the Universal value for the following equations
1. x ≡ 2 mod 3
2. x ≡ 3 mod 5
3. x ≡ 2 mod 7

• ai = a1, a2, a3, ……


 a1 = 2, a2 = 3, a3 = 2
• mi = m1, m2, m3, ……
 m1 = 3, m2 = 5, m3 = 7
Relatively Prime?
• (3,5), (3,7), (5,7)
• GCD (a, b) = 1
• (3,5)
 5=3x1+2
 3=2x1+1
 2=1x2+0
• (3,7)
 7=3x2+1
 3=1x3+0
• (5,7)
 7=5x1+2
 5=2x2+1
 2=1x2+0
Steps

Step 1: M = m1 x m2 x ……….x mk
Step 2: M1 = M / m1, M2 = M / m2, ……. Mk = M / mk
Step 3: Find the multiplicative inverse of M1, M2, ………. Mk using
the corresponding moduli (m1, m2, ……….mk)
Call the inverse M1–1 , M2-1 ………..,Mk-1
M1–1 (mod m1), M2-1 (mod m2), ……..Mk-1 (mod mk)

Step 4: The solution to the simultaneous equation is


x=(a1M1M1-1 + a2M2M2-1 +, ……… akMkMk-1) (mod M)
Step 1

M = m1 X m2 X m3
M=3X5X7 m1 = 3, m2 = 5, m3 = 7
M = 105
Step 2
M1 = M / m1
= 105 / 3 M = 105, m1 = 3, m2 = 5, m3 = 7
M1 = 35
M2 = M / m2
= 105 / 5
M2 = 21
M3 = M / m3
= 105 / 7
M3 = 15
Step 3
–1 –1
M1 =M1 (mod m1) M1 = 35, M2 = 21, M3 = 15
=(35)-1 mod 3 m1 = 3, m2 = 5, m3 = 7
35 x ? mod 3 = 1
35 x 1 mod 3 = 2 so, not possible
35 x 2 mod 3 = 1
70 mod 3 = 1
–1
M1 =2

M2-1 = M2-1 (mod m2) M3-1 = M3-1(mod m3)


=(21)-1 (mod 5) =(15)-1 mod 7
21 x ? mod 5 = 1 15 x ? mod 7 = 1
21 x 1 mod 5 = 1 15 x 1 mod 7 = 1
21 mod 5 = 1 15 mod 7 = 1
M2-1 = 1 M3-1 = 1
Step 4
X=(a1M1M1-1 + a2M2M2-1 + a3M3M3-1) mod 105
X = ((2x35x2) + (3x21x1) + (2x15x1)) mod 105 a1 = 2, a2 = 3, a3 = 2
X = (140 + 63 + 30 ) mod 105 M1 = 35, M2 = 21, M3 = 15
–1
X = 233 mod 105 M1 =2, M2-1 = 1, M3-1 = 1
X = 23 M = 105
Testing of Answer
1. x ≡ 2 (mod 3)
23≡ 2 (mod 3)
23 mod 3 = 2 mod 3
2=2
2. x ≡ (3 mod 5)
23 ≡ (3 mod 5)
23 mod 5 = 3 mod 5
3=3
3. x ≡ (2 mod 7)
23 ≡ (2 mod 7)
23 mod 7 = 2 mod 7
2=2
Exercise:
• Find an integer that has a remainder of 3 when divided by 7
and 13, but is divisible by 12.
1. x ≡ 3 mod 7
2. x ≡ 3 mod 13
3. x ≡ 0 mod 12
Answer
• x = 276
Applications
• CRT has several applications in cryptography.
• To solve quadratic congruence
PROG
RAM MOBILE
ME REGISTER NO NAME NUMBER EMAIL

BCB 19BCB0056 SIGHAKOLLI SUSMITHA 9347669869 [email protected]


BCB 19BCB0108 S ANANYA SURABHI 7702588667 [email protected]

BCE 19BCE0067 BALUSU TARUN KUMAR 9596948899 [email protected]


BCE 19BCE0092 ANJALI KUMARI 8292313157 [email protected]
KARUTURI SURYA
BCE 19BCE0160 VENKATA RAGHURAM 9494354234 [email protected]

BCE 19BCE0214 AYUSHMAN BISWARI 9977188894 [email protected]


GURNEHMAT KAUR
BCE 19BCE0227 DHINDSA 7087269738 [email protected]
BCE 19BCE0277 PRANEEL JIMMY 9567765536 [email protected]
BCE 19BCE0315 RONIT ROHIT SAHU 9372620620 [email protected]
KEERTHANA
BCE 19BCE0347 BALAMURUGAN 9079116744 [email protected]
WAGHIRKAR PIYUSH [email protected]
BCE 19BCE0364 MANESH 9969953112 n
BCE 19BCE0366 AMBUJ GUPTA 6375197453 [email protected]
BCE 19BCE0395 RAJ YASH DEV 9867795734 [email protected]
BCE 19BCE0414 SHIVAM ADITYA 9870184678 [email protected]
BCE 19BCE0452 DEVAYANI M 9096375497 [email protected]
BCE 19BCE0478 LAGUPUDI ANKITH 9398791307 [email protected]
BCE 19BCE0499 NAKKA DEEPAK 7674036768 [email protected]

BCE 19BCE0561 YUVRAJ SINGH PATHANIA 9836679855 [email protected]


BCE 19BCE0583 KUMARMANGALAM 8356002591 [email protected]
BCE 19BCE0588 ADITHI KUSUPUDI 8985844880 [email protected]

BCE 19BCE0617 KAUSTUBH SHRIVASTAVA 8868888227 [email protected]


BCE 19BCE0637 SUHAAS RAO BADADA 9398274983 [email protected]

BCE 19BCE0650 THODUPUNOORI SAHITHI 9347662028 [email protected]


BCE 19BCE0653 ABHISHEK SHARMA 8529759229 [email protected]

BCE 19BCE0654 ANURAG CHOWDHURY 9005543649 [email protected]


MAJETY YASWANTH
BCE 19BCE0656 SUBRAMANYA SAI 9533887023 [email protected]
BCE 19BCE0672 UDIT GUPTA 9999304150 [email protected]
VEERABHADRA MOHAN
BCE 19BCE0673 KHANDELOT 9920637779 [email protected]
BCE 19BCE0691 YASH AGARWAL 9667116877 [email protected]

BCE 19BCE0692 HARPAL PATEL 6355705589 [email protected]


ANIKET PARAMHANS
BCE 19BCE0731 SINGH 8789129658 [email protected]
BCE 19BCE0823 CHINMAY AGARWAL 9205523228 [email protected]
KOTHA V V M SAI
BCE 19BCE0841 DIVYESH 8712393989 [email protected]
NAGIREDDY BHARATH
BCE 19BCE0854 REDDY 6281906470 [email protected]
PRAKASH KUMAR
BCE 19BCE2033 YADAVA 9955996290 [email protected]
BCE 19BCE2035 DHRUV 9643391425 [email protected]
TANMAY KUMAR
BCE 19BCE2106 AGRAWAL 9648376545 [email protected]
BCE 19BCE2114 RAJ D SINOJIA 7349427782 [email protected]
BCE 19BCE2134 ARYAN GUPTA 8851693282 [email protected]
BCE 19BCE2159 SANAT SHOURYA 8368633906 [email protected]

BCE 19BCE2334 MUTYAM SAI SWITHIKA 9150474455 [email protected]


BCE 19BCE2344 PRITHVI SARAN S 9095023456 [email protected]
BCE 19BCE2374 RUPESH YADAV 9519442770 [email protected]

BCE 19BCE2408 KANISHK SRIVASTAVA 9967140452 [email protected]


BCE 19BCE2503 AISWARYA SUDHIR 9746221354 [email protected]
BCE 19BCE2511 ARNIISH MAHENDAR 9884333202 [email protected]
SREERAMAGIRI KRISHNA
BCE 19BCE2540 VAMSEE 9849457434 [email protected]
KONDA BHAGIRATH
BCE 19BCE2576 REDDY 8919074300 [email protected]
BCE 19BCE2581 SOURABH AGARWAL 9549128274 [email protected]
BCE 19BCE2615 CHIRAG MISHRA 9933220386 [email protected]
BCE 19BCE2699 BERA SHAMIK AMIT 9967153442 [email protected]

BCI 19BCI0025 SHARMA ANSH MANISH 9920172209 [email protected]

BCI 19BCI0080 AKASH MOHAN JOSHI 8602191759 [email protected]


BCI 19BCI0250 GOWTHAMI A T 6382096319 [email protected]

BCI 19BCI0259 VISHWA SENTHILKUMAR 6374280105 [email protected]


BCT 19BCT0004 NALLURI SAI LIKHITHA 8639844869 [email protected]
BCT 19BCT0046 SHREYAS GUDURI 7010723960 [email protected]
DAHALE SAURABH
BCT 19BCT0179 SANDEEP 7447557598 [email protected]
BCT 19BCT0232 ESHIKA GOYAL 9361087305 [email protected]
BASI R VISHNU SAI
BDS 19BDS0032 VARDHAN REDDY 9494077500 [email protected]

BDS 19BDS0038 AYUSH DEVESH TRIPATHI 9919513103 [email protected]


BDS 19BDS0041 SOHAM MITTAL 9651495384 [email protected]
BDS 19BDS0056 ANMOL SHARMA 9518684079 [email protected]
MOHAMMED ISMAIL
BDS 19BDS0084 ZABIULLAH 6301623477 [email protected]
Class 7

Module 1
Introduction to Number Theory

Topic 7
Discrete logarithms
Discrete logarithms

• It is used in Diffie–Hellman key exchange and the digital signature algorithm (DSA).
• 28 = 256 – Easy calculation.
• 4X = 4294967296. Find X - Computationally intensive.
• X=log4(4294967296) - X=16 - using Logarithms
• Consider 34 mod 12. What is the solution for this??? 81 mod 12 = 9
• X = dlog3,12(9)
• 4=dlog3,12(9)
• It is easy to compute the solution.
Cont…

• But finding the value of 'i' is Computationally intensive.


• 14i mod 29867 = 26067. i=12
• i=dlog14,29867(26067)
• Computing Discrete logarithms for large number - Computationally intensive - Take
long time.
• 5i mod 13 = 8 (i=??? 3)
• Hacker can go with Brute force approach to find the value of i. But it is not easy.
Cont…

• 5i mod 13 = 8 (i=??? 3) and 57 mod 13 = 8 511 mod 13 = 8


• The solution for “i” is not unique. I may be 3 or 7 or 11 or …
• But we need a unique solution for I
• Discrete logarithms will give a unique and distinct value.
• Primitive Roots

• If b is a Primitive Root of modulo m (m-prime number) then we can get unique solution for
i.
Primitive Roots
• 2,3 is a primitive root of mod 5. And 3 and 5 is a primitive root of mod 7
Cont…
Class 9
Module 2
Cryptographic Techniques

Topic 1
Symmetric encryption
Symmetric encryption
• It is also called as conventional encryption or single-key
encryption, was the only type of encryption in use prior to the
development of public key encryption in the 1970s.
Fundamental terms
• An original message is known as the plaintext, while the coded
message is called the ciphertext.
• The process of converting from plaintext to ciphertext is known
as enciphering or encryption.
• Restoring the plaintext from the ciphertext is deciphering or
decryption.
• The many schemes used for encryption constitute the area of
study known as cryptography. Such a scheme is known as a
cryptographic system.
• Techniques used for deciphering a message without any
knowledge of the enciphering details fall into the area of
cryptanalysis.
• The areas of cryptography and cryptanalysis together are called
cryptology.
Symmetric Cipher Model
Cont…
• Plaintext: This is the original intelligible message or data that
is fed into the algorithm as input.

• Encryption algorithm: It performs various substitutions and


transformations on the plaintext.
 Substitutions - plain text characters are replaced with other characters,
numbers and symbols and character’s identity is changed while its
position remains unchanged.
 Transformations - rearranges the position of the plain text’s characters
and the position of the character is changed but character’s identity is
not changed.

• Secret key: It is also input to the encryption algorithm. The key


is a value independent of the plaintext and of the algorithm.
The algorithm will produce a different output depending on
the specific key being used at the time.
Cont…
• Ciphertext: This is the scrambled message produced as
output. It depends on the plaintext and the secret key.

• Decryption algorithm: This is essentially the encryption


algorithm run in reverse. It takes the ciphertext and the secret
key and produces the original plaintext.
Requirements
• We need a strong encryption algorithm.
• Sender and receiver must have obtained copies of the secret key
in a secure fashion and must keep the key secure.
Cryptography
• The type of operations used for transforming plaintext to
ciphertext. All encryption algorithms are based on two general
principles:
– Substitution : mapped into another element
– Transposition : plaintext are rearranged.
• The number of keys used.
– symmetric, single-key, secret-key, or conventional encryption.
– asymmetric, two-key, or public-key encryption.
• The way in which the plaintext is processed.
– Block Cipher Converts the plain text into cipher text by taking
plain text’s block at a time.
– Stream Cipher Converts the plain text into cipher text by
taking 1 byte of plain text at a time.
Class 10
Module 2
Cryptographic Techniques

Topic 2
Data Encryption Standard (DES)
Data Encryption Standard (DES)
• DES is symmetric-key block cipher published by the National
Institute of Standards and Technology (NIST).
Overview
DES STRUCTURE

• 2 Permutations (P box)
• Plain text 64 bits
• Key is 56 bits
• 16 rounds
• Feistel cipher
Initial and Final Permutations
• Each of these permutations takes a 64-bit input and permutes them
according to a predefined rule.
• These permutations are keyless straight permutations that are the inverse of
each other.
Initial and final permutation tables
• The reason they are included in DES is not clear and has not been revealed by
the DES designers.
• The guess is that DES was designed to be implemented in hardware (on chips)
and that these two complex permutations may prevent / deny a software
simulation of the mechanism.
Example
• Find the output of the initial permutation box when the input is
given in hexadecimal as:
0x0002 0000 0000 0001
• Solution
0: 0000 (bits 1-4)
0: 0000 (bits 5-8)
0: 0000 (bits 9-12)
2: 0010 (bits 13-16) <--bit 15 is 1

Bits 17-48 are all 0.

0: 0000 (bits 49-52)


0: 0000 (bits 53-56)
0: 0000 (bits 57-60)
1: 0001 (bits 61-64) <--bit 64 is 1
Cont…
• The input has only two 1s (bit 15 and bit 64); the output must
also have only two 1s (the nature of straight permutation).
• we can find the output related to these two bits.
• Bit 15 in the input becomes bit 63 in the output.
• Bit 64 in the input becomes bit 25 in the output.
• 0000 0000 0000 0000 0000 0000 1000 0000 (bits 1-32, bit 25 set)
• 0000 0000 0000 0000 0000 0000 0000 0010 (bits 33-64, bit 63 set)
• So the output has only two 1s, bit 25 and bit 63. The result in
hexadecimal is
• 0x0000 0080 0000 0002
• The initial and final permutations are straight D-boxes that are
inverses of each other and hence are permutations. They have
no cryptography significance in DES.
Feistel Structure
DES Function
1. Expansion P - Box

• RE is divided into 8, 4-bit sections and 4-bit section is then expanded to


6 bits.
• For each section, input bits 1, 2, 3, and 4 are copied to output bits 2, 3,
4, and 5, respectively.
• Output bit 1 comes from bit 4 of the previous section; output bit 6 comes
from bit 1 of the next section.
Expansion P-box table

Note that the number of output ports is 48, but the value range is only
1 to 32.
2. Whitener (XOR)
• After the expansion permutation, DES uses the XOR operation
on the expanded right section and the round key.
• Both the right section and keys are 48 bits in length.
3. Group of S-Boxes
• The S-boxes do the real mixing (confusion). DES uses 8 S-boxes,
each with a 6-bit input and a 4-bit output.
S- Box Rule
S-Box Tables
S-Box Tables
S-Box Tables
S-Box Tables
Example 1
• The input to S-box 1 is 100011. What is the output?

• Solution
 100011 11 (B) – 3 (D)
 100011 0001(B) – 1 (D)
 We look for the value in row 3 & Column 1
 Result is 12 (D)  1100 (B)
Example 2
• The input to S-box 8 is 000000. What is the output?

• Solution
 000000 00 (B) – 0 (D)
 000000 0000(B) – 0 (D)
 We look for the value in row 0 & Column 0
 Result is 13 (D)  1101 (B)
4.Straight P-box

• The last operation in the DES function is a permutation with a


32-bit input and a 32-bit output.
• For example, the seventh bit of the input becomes the second
bit of the output.
28.07.22

Module 2
Cryptographic Techniques

Advanced Encryption Standard (AES)


• Introduction - Advanced Encryption Standard
• AES is a block cipher algorithm that can process a 128-bit block
of plaintext at a time.
• AES uses a large 128-bit key size to perform encryption and
decryption process. AES increases the key size to 128 bits, 192
bits and 256 bits.
• AES cipher uses 10 rounds of operation for performing
encryption and decryption processes.
• The number of rounds used in three versions of AES can differ.
EX: AES-128 - 10 rounds
AES-192 - 12 rounds
AES-256 - 14 rounds
• In each round, AES performs substitution and permutation
operations.
• AES is not using Feistel structure and hence entire data block is
processed in a parallel way during each round.
AES Encryption
• To generate a ciphertext, the AES perform number of rounds of
operation on the plaintext based on the key size.
• In each round, it performs 4 transformations
– SubBytes
– ShiftRows
– MixColumns
– AddRoundKey
• SubBytes and MixColumns are used to perform simple
substitution operation.
• ShiftRows is used to perform the permutation operation.
• AddRoundKey is used to perform the XOR operation in the
encryption and decryption process.
AES Decryption
• Similar to the substitution and transposition
performed in the encryption process, there are
inverse transformations in the decryption
process.
• The inverse transformations are
• InvSubBytes
• InvShiftRows
• InvMixColumns
• AddRoundKey
SubBytes
• The first transformation used at the encryption side is called
subBytes.
• The given 128 bit block is represented as a (4 × 4) square matrix that
consists of 16 cells.
• In each cell, one byte of the plaintext is placed.
• The first four bytes are placed in the first column and the second four
bytes are placed in the second column and so on.
• Each element of the matrix is replaced by the an element of s-box
matrix.
For example: if the input
to the S-box is 75, then it
will select the value
which is located in the
7th row and 5th column
which contains the value
9D.
S-box

S-Box
InvSubBytes

Inverse S-box

InvSubBytes is the inverse of SubBytes.


For example: During the decryption process, the hexadecimal
value 9D is used to select the value 75 from the inverse S-box
defined for decryption process.
ShiftRows
• The first row of input/State is not altered.
• For the second row, a 1-byte circular left shift is performed.
• For the third row, a 2-byte circular left shift is performed.
• For the fourth row, a 3-byte circular left shift is performed.
InverseShiftRows
• The first row of input/State is not altered.
• For the second row, a 1-byte circular right shift is
performed.
• For the third row, a 2-byte circular right shift is
performed.
• For the fourth row, a 3-byte circular right shift is
performed.
MixColumns
• Each column is operated on individually in the Mixcolumns()
transformation.
• The transformation can be determined by performing a
matrix multiplication based on GF(28) with respect to a
matrix defined for Mixcolumns() transformation.
Mix Columns

Inverse Mix Columns


Example of Mix columns
Calculation of 02 X 4A

• GF (28) = x7+x6+x5+x4+x3+x2+x+1
• 02 X 4A
• 0000 0010 X 0100 1010
• x (x6+x3+x)
• x7+x4+x2
• 1001 0100
• 94
AddRoundKey
• In Addroundkey() transformation, the output produced by
the mixcolumn() transformation is XOR-ed with the
subkey value produced by the key expansion algorithm.
Key Expansion
• A 128-bit key, the key is arranged in the form of
an array of 4 × 4 bytes.
• Each column of 4 bytes represented as one
word. Similarly, 4 word forms one round key.
• For a 128-bit encryption algorithm, the total
number of keys required is 11.
• Each key should have the key length of 128 bits
(4 words).
W0 W1 W2 W3 – Master Key
W4 W5 W6 W7 – Round 1 Key

W4=w0⊕g(w3)
W5=w1⊕w4
W6=w2⊕w5
W7=w3⊕w6
Function g consists:
• RotWord performs a one-byte circular left shift on a
word.
• SubWord performs a byte substitution on each byte
of its input word, using the S-box.
• The result of steps 1 and 2 is XORed with a round
constant, Rcon[j].
– The round constant is a word in which the three rightmost
bytes are always 0.

Rcon [1] = 01 00 00 00
Example
The main key also act as key K0 for
encryption and will be directly used for
pre-round computation.
Key for Round1:
W4=w0⊕g(w3)
W5=w1⊕w4
W6=w2⊕w5
W7=w3⊕w6

Main key K

Before perform XoR operation we need to find g(w3)


g(w3) = g(af 7f 67 98)
1.RotWord:
af 7f 67 98 = 7f 67 98 af
2.SubWord:
7f 67 98 af = d2 85 46 79
3.Rcon(1) = 01 00 00 00 (we are finding a subkey for round 1)

g(w3) = SubWord XOR Rcon(1)


= (d2 85 46 79) XOR (01 00 00 00)
g(w3)= d3 85 46 79

W4=w0⊕g(w3)
= (0f 15 71 c9) ⊕(d3 85 46 79) = dc 90 37 b0

W5=w1⊕w4
= (47 d9 e8 59) ⊕(dc 90 37 b0) = 9b 49 df e9

W6=w2⊕w5
= (0c b7 ad d6) ⊕(9b 49 df e9) = 97 fe 72 3f

W7=w3⊕w6
= (af 7f 67 98) ⊕(97 fe 72 3f) = 38 81 15 a7
Class 11_26.07.22
Module 4
Cryptographic Techniques

RSA Algorithm
RSA Algorithm

• One of the first successful responses to the challenge was


developed in 1977 by Ron Rivest, Adi Shamir, and Len
Adleman at MIT and first published in 1978
• The Rivest-Shamir-Adleman (RSA) scheme – most widely
accepted and implemented general-purpose approach to
public-key encryption.
Description of the Algorithm
• RSA makes use of an expression with exponentials.
Plaintext is encrypted in blocks, with each block having a
binary value less than some number n.
• Encryption and decryption are of the following form, for
some plaintext block M and ciphertext block C.
• C = Me mod n
• M = Cd mod n
• Public key encryption algorithm with a public key of PU =
{e, n} and a private key of PR = {d, n}.
• The preceding relationship holds if e and d are multiplicative
inverses modulo ø(n), where ø(n) is the Euler totient function.
• p, q are prime numbers
• ø(n) = (p - 1) * (q - 1).
• The relationship between e and d can be expressed as
• ed mod ø(n) =1
• ed ≡ 1 mod ø(n)
• d ≡ e-1 mod ø(n)
Example 1
Inputs are p = 17, q = 11 and M = 88
1. Two prime numbers such as p = 17, q=11
2. Calculate n = p * q
n = 17 * 11
n = 187
3. Calculate ø(n) = (p - 1) * (q - 1)
= (17 – 1) * (11 – 1)
= 16 * 10
ø(n) = 160
4. Select e such that e is relatively prime to ø(n) = 160 and less
than ø(n); we choose e = 7.
GCD (ø(n), e) = 1
GCD (160, 7) = 1 ------ Possible values are, 3, 7, 11,…..
4. Find d (private key) such that de ≡ 1 mod ø(n) and d < ø(n)
d ≡ e-1 mod ø(n)
d ≡ 7-1 mod 160
7 x ? mod 160 = 1
7 x 23 mod 160 = 1
161 mod 160 = 1
d = 23
23 x 7 ≡ 1 mod 160
161 ≡ 1 mod 160
Alternate Method _ Finding d value using EEA

q a b r t1 t2 t
22 160 7 6 0 1 -22

1 7 6 1 1 -22 23
6 6 1 0
Cont…
5. To do encryption
C = Me mod n PU = (e, n) = (7, 187) M = 88
C = 887 mod 187,
887 mod 187 = [(884 mod 187) * (882 mod 187)
* (881 mod 187)] mod 187
881 mod 187 = 88
882 mod 187 = 7744 mod 187 = 77
884 mod 187 = 772 mod 187 = 5929 mod 187 = 132
887 mod 187 = (88 * 77 * 132) mod 187
= 894,432 mod 187
C = 11
Cont…
6. To do Decryption
M = Cd mod n PR = (d, n) = (23, 187) C = 11
M = 1123 mod 187
1123 mod 187 = [(111 mod 187) * (112 mod 187) *
(114 mod 187) * (118 mod 187) * (118 mod 187)] mod 187
111 mod 187 = 11
112 mod 187 = 121
114 mod 187 = 1212 = 14,641 mod 187 = 55
118 mod 187 = 552 = 3025 mod 187 = 33
1123 mod 187 = (11 * 121 * 55 * 33 * 33) mod 187
M = 79,720,245 mod 187
M = 88
Example 2
Inputs are p = 3, q = 5, e (public key) = 3 and m=2

1. Two prime numbers such as p = 3, q=5


2. Let n= p * q
n=3*5
n = 15
3. Let ø(n) = (p-1)*(q-1).
= (3 – 1) * (5 – 1)
ø(n) = 8
Cont…
4. Find d (private key) such that de =1 mod ø(n)
d = e-1 mod ø(n)
d = 3-1 mod 8
3 x d mod 8 = 1
3 x 3 mod 8 = 1
9 mod 8 = 1
d=3
Cont…
5. To do encryption
C = me mod n
C = 23 mod 15, C = 8 mod 15, C = 8
6. To do Decryption
m = Cd mod n
m = 83 mod 15, m = 512 mod 15, m = 2

You might also like