lOMoARcPSD|38089892
Network and information security project
computer engineer (Savitribai Phule Pune University)
Scan to open on Studocu
Studocu is not sponsored or endorsed by any college or university
Downloaded by CO-4th sem-17-kartik (
[email protected])
lOMoARcPSD|38089892
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
TSSM’S
BHIVARABAI SAWANT COLLEGE OF ENGINEERING & RESEARCH
POLYTECHNIC NARHE PUNE - 41
Academic Year: 2021-2022
MICRO PROJECT
ON
Implement Client/ Server Communication Using Cryptography Tools
In Your Laboratory
Program : Computer Program Code : CO6I
Course : Network And Information Security(NIS) Course Code : 22620
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify that Mr. Samarth Balaji Patil, Roll No. 13 of the Semester VI of Diploma in
Computer Engineering of Institute, TSSM’S BSCOER POLYTECHNIC (CODE : 1606) has
completed the Micro-project satisfactorily in subject - Network And Information Security (NIS -
22620) for the academic year 2021 - 2022 as prescribed in the curriculum.
Place : Narhe, Pune Enrolment No. : 1916060037
Date : Seat No :
Subject Teacher Head Of The Department Principal
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
INDEX
Sr.No Content Page No
1 Abstract 4
2 Introduction 5
3 Method 7
4 Proposed System 11
5 Experimental Result 14
6 Conclusion 17
7 Weekly Progress Report 18
8 Annexure II 19
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
1. ABSTRACT
The effectiveness of the information system in many ways depends on its architecture and how
data is transmitted among different parties. One of the most popular architectures is a client/server
architecture. Practically, one of such advantages were the centralization of data storage and processing
and the flexibility for applying authentication methods and encryption algorithms. While the number
of clients increases it requires increasing the authentication and encryption level as high as possible.
Client/server is a technology that allows the user to open an interactive session between the user's
browser and the server. In this study, we used client/server architecture to accomplish secure chat
between clients without the server being able to decrypt the message by using one layer of encryption
between the clients and the server, and then a second layer of encryption between the clients in a chat
room. All the encryption processes are based on the RSA (RivestShamir-Adelman) algorithm.
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
2. INTRODUCTION
In today's world, computer networking has become an integral part of life. There are many
different networks available to share information between groups of devices through a shared
communication medium . They are mainly differentiated by the physical medium and protocol
standards. Ethernet is a prime wired networking standard which is an obvious choice for many network
applications due to reliability, efficiency, and speed. The Ethernet standard is used in various
application segments. Figure 1 shows the Client/Server model architecture that has been used in most
network systems and in this study.
Figure 1: A Client/Server Architecture.
The client side could be any type of smart devices (desktop, laptop, smart phone, etc.). The
server part is one device that controls and passes messages and opens the connections among clients
and/or between clients and server. The Internet part could be one device to isolate the network overall
into two main parts: client(s) and server, it could be a switch or hub or router or just a cable.
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
A very important aspect in the world of software development is the security of data that flows
through open communication channels. In our web applications, there is an intensive exchange of data
via different protocols, like http, between client applications which are presented as browser, mobile
and desktop applications and server side applications. The importance and confidentiality of data may
be different depending on the specifics of the web application, and the possibility of interception by a
third party increases with perfection of hacking techniques in the world of IT. What can be done to
prevent access to the data by your traffic listener? If we exchange data between the client applications
and server we don’t want the information to be stored as open text on the server, which will be
accessible in case of server crack.
Everyday people use the chat area, through the users (clients) scan chat or send messages to
selected users. However, the security components in chat area applications are to make sure all
information from clients is protected from hackers. The chat messages from users can easily be
transformed by expert hackers, without a good enough security component. In this way, a chat area
interface (CAI) is a required technique to secure a chat message from hackers. The cryptography is
significant to keep private data secure to avoid unauthorized access.
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
3. METHOD
Building a Client/Server architecture for an encrypted chat system to communicate between
clients via a server using encryption based on RSA. The goal for this study is to use client/server
architecture to accomplish secure chat between clients without the server being able to decrypt the
message by using one layer of encryption between the clients and the server, and then a second layer
of encryption between the clients in a chat room. All the used encryption processes are based on the
RSA algorithm. The implementation of this study is held in the MATLAB environment.
The very term "client-server" was initially applied to the software architecture, which
described the distribution of the execution process by the principle of interaction of two software
processes, one of which in this model was called the client and the other the server. The client process
requested some services, and the server process ensured their execution. It was assumed that one server
process can serve a lot of client processes. One of the client/server applications is “chatting”. Chatting
alludes to one kind of correspondence over the Internet that offers a continuous transmission of instant
messages from sender to beneficiary or over a server that controls and deals with the gatherings
(customers) to convey.
1. Client/Server The used client/server model describes how a server provides resources and
services to one or more clients. Examples of servers including web servers, chat servers, and
file servers. Each of these servers provide resources to client devices. Most servers have a one-
to-many relationship with clients, meaning a single server can provide resources to m
Computers. In order to meet the main requirements of businesses, networks themselves are
becoming quite complex with multiple clients at one time.
2. Chat Service A secure chat service provides the ability to have real time secure discussions
among users electronically, one-to-one or in group sessions. A public network accumulates
information slightly, rather than on a user’s individual computer that is used to keep in touch
with people. A secure chatting between client and server to make a safe and reliable
communication, the benefits are :
● Allows for instant communications between users.
● Uses real time chat over the network that can eliminate costly long distance charges.
● Allows for rapid query and rapid responses.
While the negative points of chat service can be listed as following :
● Security problems of instant messaging programs.
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
● Secure chats in most cases are routed through a server system, where the service is
provided and that is a single point where all messages can be intercepted.
● Chat programs can provide an open avenue of attack for hackers, crackers, spies and
thieves.
3. RSA Encryption
In this study, an encrypted chat program designed to ensure a safe mode of communication
between two users. It uses RSA encryption to encode and decode messages in a terminal
window. Clients exchange public keys and encrypt outgoing text with the intended recipient’s
public key.
Each user connects to a central server which forwards messages to the intended recipient. On
the receiving end, the program utilizes a client’s private key to decrypt received messages. In
1977, Ron Rivest, Adi Shamir and Leonard Adleman introduced a cryptographic algorithm,
RSA, which is named for the first letter in each of its inventors’ last name. RSA’s motivation
is DiffieHellman Algorithm which describes the idea of such an algorithm that enables public-
key cryptosystem. Here are the steps of RSA Algorithm :
● The first step of the RSA Algorithm is to select two different prime numbers p and q.
● The second step is the calculation of n where N=p*q ● The calculation of φ(N)=(p-
1)*(q-1) is the third step.
● As the fourth step, an integer e is selected as a public-key which is co-prime with φ(N)
● Finally, the inverse of e modulus φN) is taken to produce d, the private-key. By using
e and d modulus N, the encryption and decryption are done.
In the RSA Algorithm, the public-key involves two numbers N and e while the private-key is N
together with a different number d. To encrypt message M (plain text):
M→Me (mod N)=C
To dencrypt message C (cipher text):
C→Cd (mod N)=M
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
For the implementation of RSA, the number N is a product of two large prime numbers p and q.
If p and q are known then d can be obtained from e. As N is a part of the public-key and the
multiplication of p and q then factoring N to find p and q is possible. Figure 2 shows the main
components and processes for the RSA algorithm.
Figure 2: RSA algorithm main components and processes.
● RSA Key distributions
Each person or a party who desires to participate in communication using encryption
and decryption operations. Assume that Bob needs to send data to Alice. In the event that
they choose to utilize RSA, Bob must know Alice's public key to encode the message and
Alice must utilize her private key to unscramble the message. To empower Bob to send his
encoded messages, Alice transmits her open key (n, e) to Bob through a dependable, yet not
really mysterious, course. Alice's private key (d) is never dispersed.
● Encryption
After Bob acquires Alice's public key, he can send a message specific M to Alice. To
do it, he initially turns M (entirely, the un-cushioned plaintext) into a whole number m (entirely,
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
the cushioned plaintext), with the end goal that 0 ≤ m < n by utilizing a settled upon reversible
convention known as a cushioning plan. He at that point processes the ciphertext c, utilizing
Alice's public key e, corresponding to
c ≡ me (mod n)
This should be possible sensibly immediately, notwithstanding for 500-piece numbers,
utilizing secluded exponentiation. Weave at that point transmits c to Alice.
● Decryption
Alice can recuperate m from c by utilizing her private key type d by registering
cd ≡ (me ) d ≡ m (mod n)
Given m, she can recuperate the first message M by turning around the cushioning plan.
10
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
4. PROPOSED SYSTEM
Encryption algorithm is deployed to encrypt messages exchanged with the proposed chat
gateway. This study is about developing a new model to create a private messaging network to transmit
message contents over the network / intranet between client terminals. The chat messaging
environment showed a great potential to host a real time interactive interaction system which is
supported by RSA encryption methodology to preserve the security of the message stream.
Choosing the key size in RSA encryption is of great importance. As the size of the key
increases, the security level of the system, the complexity and the resistance of encrypted text increases.
These advantages make it difficult to decrypt ciphertexts and break passwords. However, in addition
to these advantages, the encryption key creation time, text encryption time, and mobile device RAM
consumption increase. These disadvantages are factors that will influence the effective use of the
application. For this reason, the advantages and disadvantages of key dimensions should be determined
and the most suitable key size should be preferred.
To accomplish the chatting and meet the goals of this study in client/server architecture, the
need for authentication methods and encryption algorithms will be urgent. The flowchart of the secure
chat system is presented in Figure 3.
11
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
In this study, we used one
authentication level and two encryption
levels.We used GUI in MATLAB to ask the
user for the server IP and the port that made the
connection and the client ID and password. We
used the RSA algorithm to encrypt messages
between clients and the server as the first
encryption level and then encrypt messages
between clients and chat rooms.
Figure 3: Flowchart of the proposed work.
12
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
5. EXPERIMENTAL RESULTS
The results that we get after implementing the proposed chatlab system in Figure 3 will be followed
figure by figure below (Figures 4, 5, 6, 7, 8, and 9).
Figure 4: Starting the messaging environment.
Figure 5: Initialize the server.
Figure 6: Authentication level.
13
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
Figure 7: Initialize client(s).
Figure 8: Client asking to join a chat room.
Figure 9: Chatting between two clients.
14
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
6. CONCLUSION
Demonstrating appropriate client/server applications is a basic figure of their plan, sending, and
later adaptability. The demonstrating advances required in this exertion are not for the most part
accessible, and not prepared for wide dispersion to application originators and organizers. This paper
highlights the usefulness requirements for client/server models and depicts configuration inquiries to
be tended to. A model reenactment demonstrates executed a large number of the prerequisites recorded,
and its utilization was shown in a few genuine and speculative illustrations.
We developed a client/server encrypted chat based on RSA by using MATLAB software
encryption policies. The result gave one authentication level and two encryption levels by secure chat
data based on the RSA algorithm. We have implemented the system in client/server architecture and
in real-time network. We believe that the system provides a high level in encryption and more
flexibility in implementation. However, as a future work other encryption algorithms might be used
and a hybrid algorithm can be developed for further purposes such as faster or wider messaging needs.
15
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
WEEKLY PROGRESS REPORT
MICRO PROJECT
Sr.No Week Activity Performed Sign Of Guide Date
1 Discussion and finalization of topic
1st
2 2nd Preparation and submission of abstract
3 3th Collection of data
4 4th Discussion and outline of content
5 5th Formulation of content
6 Editing and proofreading of content
6th
7 7th Compilation of content
8 8th Seminar / viva voce
9 9th Final submission of micro project
Sign Of The Student Sign Of The Faculty
16
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
ANNEXURE II
Evaluation Sheet For The Micro Project
Academic year : 2021 - 2022 Name Of The Faculty : Prof. Karajgar M.D. (KMD)
Course : Network & Information Security Course Code : 22620
Semester : VI
Title Of The Project : Implement Client/ Server communication using cryptography tools in your
laboratory
CO’s addressed by the Micro Project: Make a comparative statement to calculate page fault
for given page reference string by using different page replacement algorithms.
Identify risks related to Computer security & Information hazard in various
C620.1
situations.
C620.2 Apply user identification & Authentication methods.
C620.3 Apply cryptographic algorithms & protocols to maintain computer security.
C620.4 Apply measures to prevent attacks on network using firewall.
Maintain secured networks & describe Information security compliance
C620.5
standards.
Major Learning Outcomes Achieved By Students By Doing The Project :
I. Practical outcome
1. Set up passwords to operating system and applications.
2. Apply security to file folder or application using access permissions and verify.
3. Write a program to implement Caesar Cipher
4. Write a program to implement Vernam Cipher
5. Create and verify Hash Code for given message
6. Write a program to implement Rail fence technique
7. Write a program to implement Simple Columnar Transposition
8. Create and verify digital signature using tool (e.g. Cryptool)
9. Use Steganography to encode and decode the message using any tool.
a. Install firewall on any operating system.
b. Configure firewall settings on any operating system.
10. Create and verify Digital Certificate using tool (e.g. Cryptool)
17
Downloaded by CO-4th sem-17-kartik ([email protected])
lOMoARcPSD|38089892
II. Unit outcomes in cognitive domain:
2d. Describe features of the given access control policy.
3a. Encrypt/Decrypt the given text using different substitution techniques.
3b. Convert plain text to cipher text and vice versa using the given transposition technique.
3c. Convert the given message using steganography.
3d. Explain the given technique of cryptography using example.
Student Name Mark Out Of 12 For Marks Out Of 8
Seat Performance In For Performance In Total Out
No Group Activity (D5 Oral/Presentation Of 20
Col.8) (D5 Col.90
Samarth Balaji Patil
Name & Signature Of Faculty
Prof. Karajgar M.D.
18
Downloaded by CO-4th sem-17-kartik ([email protected])