0% found this document useful (0 votes)
13 views

IS Lab Manual

The document provides information about an information security laboratory course. It includes the vision and mission statements of the institute and department. It also includes details of the course like objectives, outcomes, assignments and the list of experiments to be performed.

Uploaded by

nehagaikwad1611
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

IS Lab Manual

The document provides information about an information security laboratory course. It includes the vision and mission statements of the institute and department. It also includes details of the course like objectives, outcomes, assignments and the list of experiments to be performed.

Uploaded by

nehagaikwad1611
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Information Security Laboratory Practice II TE COMP, Sem-II

RajgadDnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune

Department of Computer Engineering

Lab Manual

Information Security
310254(A)

Prepared by

Prof. P. M. Shinde

Computer Engineering, RD’s SCSCOE, Pune-412205 1


Information Security Laboratory Practice II TE COMP, Sem-II

RajgadDnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune -412205 (MS), India.
Website: www.rajgad.edu.in, Email Id: [email protected]

Vision and Mission of Institute:

Vision

Excellent Institution for Education, Training and Research in Engineering.

Mission

1. Develop competent engineers along with professional skill and responsible


citizen.

2. Foster knowledge and technical skill of the highest standards to develop


sustainable engineering solution.

3. Prepare engineers to respond to needs if the industry, higher studies and


research through industry and institute interaction.

Computer Engineering, RD’s SCSCOE, Pune-412205 2


Information Security Laboratory Practice II TE COMP, Sem-II

Vision and Mission of Department:

Department of Computer Engineering

Vision

Excellence in Computer Engineering to meet Industrial and societal needs .

Mission

1. Develop competent Computer Engineers with good communication skill,


social and ethical values for development of society.

2. Cultivate quality technical education to reach at the highest standard.

3. Prepare and nurture the mind set for all civil services, higher studies and
research activity.

4. Promote exposure to green computing for developing sustainability


standards.

Computer Engineering, RD’s SCSCOE, Pune-412205 3


Information Security Laboratory Practice II TE COMP, Sem-II

Program Educational Outcomes (PEO)

1. To prepare globally competent graduates having strong fundamentals, domain


knowledge, updated with modern technology to provide the effective solutions for
engineering problems.

2. To prepare the graduates to work as a committed professional with strong professional


ethics and values, sense of responsibilities, understanding of legal, safety, health, societal,
cultural and environmental issues.

3. To prepare committed and motivated graduates with research attitude, lifelong learning,
investigative approach, and multidisciplinary thinking.

4. To prepare the graduates with strong managerial and communication skills to work
effectively as individual as well as in teams.

Computer Engineering, RD’s SCSCOE, Pune-412205 4


Information Security Laboratory Practice II TE COMP, Sem-II

Program Outcomes

Students are expected to know and be able –

PO1: To apply knowledge of mathematics, science, engineering fundamentals, problem solving


skills, algorithmic analysis and mathematical modeling to the solution of complex engineering
problems.

PO2: To analyze the problem by finding its domain and applying domain specific skills

PO3: To understand the design issues of the product/software and develop effective solutions
with appropriate consideration for public health and safety, cultural, societal, and environmental
considerations.

PO4: To find solutions of complex problems by conducting investigations applying suitable


techniques.

PO5: To adapt the usage of modern tools and recent software.

PO6: To contribute towards the society by understanding the impact of Engineering on global
aspect.

PO7: To understand environment issues and design a sustainable system.

PO8: To understand and follow professional ethics.

PO9: To function effectively as an individual and as member or leader in diverse teams and
interdisciplinary settings.

PO10: To demonstrate effective communication at various levels.

PO11: To apply the knowledge of Computer Engineering for development of projects, and its
finance and management.

PO12: To keep in touch with current technologies and inculcate the practice of lifelong learning.

Computer Engineering, RD’s SCSCOE, Pune-412205 5


Information Security Laboratory Practice II TE COMP, Sem-II

COURSE OBJECTIVES

Course
Description
Objective
To learn and apply various search strategies for AI
CEO310254A.1

CEO310254A.2 To Formalize and implement constraints in search problems

To understand the concepts of Information Security / Augmented


CEO310254A.3
Reality/Cloud Computing/Software Modeling and Architectures

COURSE OUTCOME - DETAILS

Course
Description
Outcome

CO310254A.1 Design a system using different informed search / uninformed search or heuristic
approaches
CO310254A.2 Apply basic principles of AI in solutions that require problem solving, inference,
perception, knowledge representation, and learning
CO310254A.3 Design and develop an interactive AI application

Use tools and techniques in the area of Information Security


CO310254A.4
Use the cryptographic techniques for problem solving
CO310254A.5
Design and develop security solution
CO310254A.6

Computer Engineering, RD’s SCSCOE, Pune-412205 6


Information Security Laboratory Practice II TE COMP, Sem-II

CO-PO Mapping Matrix

Course Program Outcomes


Outcome (POs)
(COs) PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

C410245D.1 2 - 2 - 3 - - 2 2 2 1 2
C410245D.2 1 - 2 2 3 2 - 2 2 2 1 2
C410245D.3 1 - 2 2 3 2 - 2 2 2 2 2
C410245D.4 1 - 2 - 3 - - 2 2 2 2 2
C410245D.5 1 - 2 - 3 - - 2 2 2 2 2
C410245D.6 1 - 2 - 3 - - 2 2 2 2 2
1 - LOW , 2 - MEDIUM , 3 - HIGH

Computer Engineering, RD’s SCSCOE, Pune-412205 7


Information Security Laboratory Practice II TE COMP, Sem-II

Information Security
310254(A)
Teaching Scheme: 04 Hours/Week

Examination Scheme: Term Work: 50 Marks


Practical: 25 Marks

List of Assignments / Experiments

Assignment 1: Write a Java/C/C++/Python program that contains a string (char pointer) with
a value \Hello World’.The program should AND or and XOR each character in this string
with 127 a display the result.

Assignment 2:Write a Java/C/C++/Python program to perform encryption and decryption using


the method of Transposition technique.

Assignment 3: Write a Java/C/C++/Python program to implement DES algorithm.

Assignment 4: Write a Java/C/C++/Python program to implement AES Algorithm.

Assignment 5: Write a Java/C/C++/Python program to implement RSA algorithm.

Assignment 6: Implement the different Hellman Key Exchange mechanism using HTML
and JavaScript. Consider the end user as one of the parties (Alice) and the JavaScript application
as other party (bob).

Assignment 7: Calculate the message digest of a text using the MD5 algorithm in JAVA.

Subject In-charge

Prof. P. M. Shinde

Computer Engineering, RD’s SCSCOE, Pune-412205 8


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 1

Title: -
Write a Java/C/C++/Python program that contains a string (char pointer) with a value \Hello
World’. The program should AND or and XOR each character in this string with 127 an
display the result.

Objective:-

In this experiment, we will be able to do the following:

 To understand String and the declaration of string by char array.

 To understand AND and XOR operations.

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java/Python

Theory:-

(a) String

The string is the one-dimensional array of characters. The string is terminated by a null ('\0').
Each and every character in the array allocated one byte of memory, and the last character must
always be 0. The end of string is identified by using character ('\0').

The string declaration can be done in two ways.

1. The declaration of string by char array in C language.

For example:

Computer Engineering, RD’s SCSCOE, Pune-412205 9


Information Security Laboratory Practice II TE COMP, Sem-II

char ch[17]={'t', 'h', 'i', 's', 'i', 's', 't', 'e', 'c', 'h', 'n', 'e', 'o', 'b', 'o', 'o', 'k', 's', '\0'};

As we know, array index starts from 0, so it will be represented as in the figure given below.

While declaring string, size is not mandatory. So we can write the above code as given below:

char ch[ ]={'t', 'h', 'i', 's', 'i', 's', 't', 'e', 'c', 'h', 'n', 'e', 'o', 'b', 'o', 'o', 'k', 's', '\0'};

2. The declaration of string by string by the string literal in C language.

For example:

char str[ ]="thisistechneobooks";

In such case, '\0’ will be appended at the end of the string by the compiler

(b) AND Operation

The binary AND operation needs two inputs and one output. The inputs and result to a binary
AND operation can only be 0 or 1. In binary AND operation if both the input are 1 then output
will be 1 and if both inputs are 0 the output will be 0. For two different inputs, the output will be
0.

Computer Engineering, RD’s SCSCOE, Pune-412205 10


Information Security Laboratory Practice II TE COMP, Sem-II

(c) XOR Operation

In XOR two inputs and one output in binary XOR (exclusive OR) operation. It is similar to
ADD operation which takes two inputs and produces one result i.e., one output. The inputs and
result to a binary XOR operation can only be 0 or 1. The binary XOR operation will always
produce a 1 output if either of its inputs is 1 and will produce a 0 output if both of its inputs are 0
or 1.

Algorithm:-

1. Start

2. Take the input 'hello world' which is assigned to variable 'str'

3. Perform AND and XOR operation between the string and 127.
Computer Engineering, RD’s SCSCOE, Pune-412205 11
Information Security Laboratory Practice II TE COMP, Sem-II

4. Print the result

5. Stop.

Output:-

Conclusion:-

Thus ,we successfully implemented Java program that contains a string (char pointer) with a
value \Hello World.

Computer Engineering, RD’s SCSCOE, Pune-412205 12


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 2

Title: - Write a Java/C/C++/Python program to perform encryption and decryption using the
method of Transposition technique.

Objective:-

In this experiment, we will be able to do the following:

 To understand Transposition technique.

 To make use of the method of Transposition technique to perform encryption and


decryption

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java/Python

Theory:-

Transposition Cipher is a cryptographic algorithm. In this algorithm the order of alphabets in the
plaintext is rearranged to form a cipher text.

For Example ,Consider transposition cipher is columnar transposition cipher where each
character in the plain text is written horizontally with specified alphabet width. The cipher is
written vertically, which creates an entirely different cipher text. Consider the plain text hello
world, and let us apply the simple columnar transposition technique as shows below

Computer Engineering, RD’s SCSCOE, Pune-412205 13


Information Security Laboratory Practice II TE COMP, Sem-II

The plain test characters are placed horizontally and the cipher text is created with vertical
format as: holewdlo lr. Also, the receiver has to use the same table to decrypt the cipher text to
plain text.

Transposition Techniques:-

There are 4 different transposition techniques used encrypt and decrypt the message. For this
program we used columnar transposition technique.

1 Rail Fence Transposition

2. Columnar Transposition

3. Improved Columnar Transposition

4. Book Cipher/Running Key Cipher

Algorithm:-

Columnar transposition techniques

Step 1: Write all the characters of plain text message row by row in a rectangle of predefined
size.

Step 2: Read the message in a columnar manner, i.e column by column.

Note: For reading the message, it needs not to be in the order of columns. It can happen in any
random sequence.

Step 3: The resultant message is ciphertext.

Computer Engineering, RD’s SCSCOE, Pune-412205 14


Information Security Laboratory Practice II TE COMP, Sem-II

Output:-

Conclusion:-

Thus , we successfully implemented Java program to perform encryption and decryption using the
method of Transposition technique.

Questions:-

1. What is the transposition technique for encryption and decryption?


2. How many types of transposition techniques are there?
3. What are the advantages of transposition technique?
4. What are the uses of transposition?

Computer Engineering, RD’s SCSCOE, Pune-412205 15


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 3

Title: - Write a Java/C/C++/Python program to implement DES algorithm.

Objective:-

In this experiment, we will be able to do the following:

 To understand Data Encryption Standard (DES) algorithm.

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java/Python

Theory:-

DES is an implementation of Feistel Cipher. DES is a symmetric encryption system that uses 64-
bit blocks, 8 bits of which are used for parity checks. The key therefore has a "useful" length of
56 bits, which means that only 56 bits are actually used in the algorithm. The algorithm involves
carrying out combinations, substitutions and permutations between the text to be encrypted and
the key, while making sure the operations can be performed in both directions. The key is
ciphered on 64 bits and made of 16 blocks of 4 bits, generally denoted k1 to k16. Given that
"only" 56 bits are actually used for encrypting, there can be 256 different keys.

Algorithm:-

1. First get the key generator instance using DES algorithm.

2. Generate secure key that will be used for encryption and decryption.

3. Get Cipher instance using DES algorithm. One for encrypt mode and another for decrypt
mode.
Computer Engineering, RD’s SCSCOE, Pune-412205 16
Information Security Laboratory Practice II TE COMP, Sem-II

4. Through encryption create function generate encrypt cipher.

5. For decryption, create object of input stream using decrypt cipher.

6. Read the input stream and write the output stream.

Output:-

Conclusion:-

Thus ,we successfully implemented Java program to implement DES algorithm.

Questions:-

1. What is DES? How does it work?


2. Why was DES replaced by AES?

3. What are some common applications of DES?


4. What happens when you use a weak key with DES?

Computer Engineering, RD’s SCSCOE, Pune-412205 17


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 4

Title: - Write a Java/C/C++/Python program to implement AES Algorithm.

Objective:-

In this experiment, we will be able to do the following

 To understand Advanced Encryption Standard (AES) algorithm.

 To understand operation of AES.

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java/Python

Theory:-

The most popular and widely used symmetric encryption algorithm is Advanced Encryption
Standard (AES). AES is 6 times faster than the triple DES.

Operation of AES:

AES is an iterative rather than Feistel cipher. It is based on 'substitution-permutation network'. It


includes a series of linked operations, some of which involve replacing inputs by specific outputs
(substitutions) and others involve shuffling bits around (permutations).

AES performs all its computations on bytes rather than bits. Hence, AES treats the 128 bits of a
plaintext block as 16 bytes. These 16 bytes are arranged in four columns and four rows for
processing as a matrix.

Computer Engineering, RD’s SCSCOE, Pune-412205 18


Information Security Laboratory Practice II TE COMP, Sem-II

The number of rounds in AES is variable and depends on the length of the key. AES uses 10
rounds for 128- bit keys, 12 rounds for 192-bit keys and 14 rounds for 256-bit keys. Each of
these rounds uses a different 128-bit round key, which is calculated from the original AES key.

Algorithm:-

1. Derive the set of round keys from the cipher key

2. Initialize the state array with the block data(plain text)

3. Add the initial round key to the starting state array

4. Perform nine rounds of state manipulation

5. Perform the tenth and final round of state manipulation

6. Copy the final state array out as the encrypted data(cipher text)

7. Stop

Output:-

Computer Engineering, RD’s SCSCOE, Pune-412205 19


Information Security Laboratory Practice II TE COMP, Sem-II

Conclusion:-

Thus ,we successfully implemented Java program to implement AES Algorithm.

Questions:-

1. Why Was the AES Encryption Algorithm necessary?


2. What are the Features of AES?
3. How Does AES Work?

Computer Engineering, RD’s SCSCOE, Pune-412205 20


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 5

Title: - Write a Java/C/C++/Python program to implement RSA algorithm.

Objective:-

In this experiment, we will be able to do the following

 To understand RSA algorithm.

 To understand procedure to generate public and private keys by using RSA algorithm.

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java/Python

Theory:-

RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means that it


works on two different keys i.e. Public Key and Private Key. As the name describes that the
Public Key is given to everyone and the Private key is kept private.

An example of asymmetric cryptography:

1. A client (for example browser) sends its public key to the server and requests some data.
2. The server encrypts the data using the client’s public key and sends the encrypted data.
3. The client receives this data and decrypts it.

Computer Engineering, RD’s SCSCOE, Pune-412205 21


Information Security Laboratory Practice II TE COMP, Sem-II

Algorithm:-

RSA algorithm uses the following procedure to generate public and private keys:

Computer Engineering, RD’s SCSCOE, Pune-412205 22


Information Security Laboratory Practice II TE COMP, Sem-II

Output:-

Conclusion:-
Thus ,we successfully implemented Java program to implement RSA algorithm.

Questions:-
1. What is the RSA algorithm?
2. What is the difference between AES and RSA?
3. What are two applications of RSA algorithm?
4. Where is RSA key used?

Computer Engineering, RD’s SCSCOE, Pune-412205 23


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 6

Title: -Implement the different Hellman Key Exchange mechanism using HTML and
JavaScript. Consider the end user as one of the parties (Alice) and the JavaScript application as
other party (bob).

Objective:-

In this experiment, we will be able to do the following

 To understand Implemention the different Hellman Key Exchange mechanism using


HTML and JavaScript..

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: -
Information Security : - C/C++/Java

Theory:-

Computer Engineering, RD’s SCSCOE, Pune-412205 24


Information Security Laboratory Practice II TE COMP, Sem-II

Algorithm:-

Output:-

Computer Engineering, RD’s SCSCOE, Pune-412205 25


Information Security Laboratory Practice II TE COMP, Sem-II

Conclusion:-
Thus , we successfully implement the different Hellman Key Exchange mechanism using HTML
and JavaScript

Questions:-

Computer Engineering, RD’s SCSCOE, Pune-412205 26


Information Security Laboratory Practice II TE COMP, Sem-II

Assignment No. 7

Title: -
Calculate the message digest of a text using the MD5 algorithm in JAVA.

Objective:-

In this experiment, we will be able to do the following

 To understand Working of the MD5 Algorithm.

 To understand the use of MD5 algorithm.

Software and Hardware Requirement:-

Operating System recommended :- 64-bit Windows OS


Programming tools recommended: - Java

Theory:-

MD5 is a cryptographic hash function algorithm that takes the message as input of any length and changes it
into a fixed-length message of 16 bytes. MD5 algorithm stands for the message-digest algorithm. MD5 was
developed as an improvement of MD4, with advanced security purposes. The output of MD5 (Digest size) is
always 128 bits. MD5 was developed in 1991 by Ronald Rivest.

Computer Engineering, RD’s SCSCOE, Pune-412205 27


Information Security Laboratory Practice II TE COMP, Sem-II

Use Of MD5 Algorithm:

 It is used for file authentication.


 In a web application, it is used for security purposes. e.g. Secure password of users etc.
 Using this algorithm, We can store our password in 128 bits format.

Algorithm:-

Step 1: Create a MessageDigest object.


Step 2: Pass data to the created MessageDigest object
Step 3: Generate the message digest

Output:-

Computer Engineering, RD’s SCSCOE, Pune-412205 28


Information Security Laboratory Practice II TE COMP, Sem-II

Conclusion:-
In This way we have studied how to calculate the message digest of a text using the MD5
algorithm in JAVA.

Questions:-
1. What is the MD5 algorithm?
2. What is use of MD5 algorithm?
3. What are the applications of MD5 algorithm?

Computer Engineering, RD’s SCSCOE, Pune-412205 29

You might also like