0% found this document useful (0 votes)
8 views44 pages

Project Report Dheena

The project report titled 'Packet Data Transmission in Wireless Network' by Dheenadayalan B focuses on efficient packet transmission using wireless sensor networks, developed with C#.Net and MS-SQL Server. It discusses the importance of firewalls in network security, detailing various modules such as firewall splitting, encryption, and detection modes. The report includes system specifications, design, testing, and implementation processes, emphasizing the need for efficient algorithms to handle packet matching in modern firewalls.

Uploaded by

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

Project Report Dheena

The project report titled 'Packet Data Transmission in Wireless Network' by Dheenadayalan B focuses on efficient packet transmission using wireless sensor networks, developed with C#.Net and MS-SQL Server. It discusses the importance of firewalls in network security, detailing various modules such as firewall splitting, encryption, and detection modes. The report includes system specifications, design, testing, and implementation processes, emphasizing the need for efficient algorithms to handle packet matching in modern firewalls.

Uploaded by

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

PACKET DATA TRANSMISSION IN WIRELESS

NETWORK

Project report submitted to Bharathiar University in partial fulfillment of the requirement for
the award of the Degree of Master Of Computer Applications

DHEENADAYALAN.B
21AMCAN0897
21MCA1897
<PCP CENTRE>

Under the guidance of


Mr. P. BALAMURUGAN
Professor, Department of Computer Application

SCHOOL OF DISTANCE EDUCATION


BHARATHIAR UNIVERSITY
COIMBATORE – 641 046
APRIL 2023
CERTIFICATE
This is to certify that the project work titled Packet Data Transmission In Wireless
Network submitted to Bharathiar University in partial fulfillment of the requirements for the
award of the Degree of Computer Applications is a record of the original work done by
Dheenadayalan B under my supervision and guidance and that this project work has not
formed the basis for the award of any Degree/Diploma/Associateship/Fellowship or similar
title to any candidate of any University.

(Seal)

Signature of the Guide


(With Seal)

Forwarded by

Director
School of Distance Education
Bharathiar University
Coimbatore – 46

Submitted for University Examination held on ______________________

Internal Examiner External Examiner


DECLARATION
I hereby declare that this project work titled Packet Data Transmission In Wireless
Network submitted to the School of Distance Education, Bharathiar University is a record of
original work done by Dheenadayalan B under the supervision and guidance of
Mr.P.BALAMURUGAN and that this project work has not formed the basis for the award
of any Degree/Diploma/Associate ship/Fellowship or similar title to any candidate of any
University.

Signature of the Candidate

Name :

Enrolment No :

Course :

PCP Centre :

Place :

Date :

Countersigned by Signature Countersigned by the


of the Guide Co-Ordinator
(With Seal) (With Seal)
ABSTRACT

EFFICIENT PACKET TRANSMISSION IN WIRELESS SENSOR NETWORK

The project is entitled as “Efficient Packet Transmission Using Wireless Sensor


Networks” is developed by using C#.Net with Winsock controls, INET controls and MS-
SQL Server as backend. This module is used in network where in which a virtual server is
needed apart from above function.

The project was the Internet Transfer Control and Winsock control of visual basic.Net
to develop the server side application and uses Microsoft SQL Server for database.

The firewall is one of the central technologies allowing high-level access control to
organization networks. Packet matching in firewalls involves matching on many fields from
the TCP and IP packet header. At least five fields (protocol number, source and destination IP
addresses, and ports) are involved in the decision which rule applies to a given packet. With
available bandwidth increasing rapidly, very efficient matching algorithms need to be
deployed in modern firewalls to ensure that the firewall does not become a bottleneck Since
firewalls need to filter all the traffic crossing the network perimeter, they should be able to
sustain a very high throughput, or risk becoming a bottleneck. This project developed in
various modules

 Firewall Splitting and Matching


 Encryption module
 Protection and Detection mode
 Random Rule Simulation module
TABLE OF CONTENTS

1. INTRODUCTION
1.1 AN OVERVIEW

2. SYSTEM SPECIFCATION
2.1 HARDWARE SPECIFICATION
2.2 SOFTWARE SPECIFICATION
3. SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
3.2 PROPOSED SYSTEM
4. SYSTEM DESIGN AND DEVELOPMENT
4.1 INPUT DESIGN

4.2 OUTPUT DESIGN

4.3 DESCRIPTION OF MODULES

4.4 DATABASE DESIGN

5. TESTING AND IMPLEMENTATION


5.1 SYSTEM TESTING
5.2 UNIT TESTING
5.3 INTEGRATION TESTING
5.4 VALIDATION TEST
5.5 OUTPUT TEST
5.6 TESTING RESULTS
5.7 QUALITY ASSURANCE
5.8 GENERIC RISKS
5.9 SYSTEM IMPLEMENTATION
6. CONCLUSION
7. BIBLIOGRAPHY
8. APPENDICES
9. FLOW DIAGRAM
9.1 SYSTEM ARCHITECTURE
9.2 DATA FLOW DIAGRAM
9.3 USECASE DIAGRAM
9.4 CLASS DIAGRAM
9.5 ACTIVITY DIAGRAM
9.6 SEQUENCE DIAGRAM

9.7 USER DIAGRAM

10. CODING
1.INTRODUCTION
1.1 AN OVERVIEW

The firewall is one of the central technologies allowing high-level access control to
organization networks. Packet matching in firewalls involves matching on many fields from
the TCP and IP packet header. At least five fields (protocol number, source and destination IP
addresses, and ports) are involved in the decision which rule applies to a given packet. With
available bandwidth increasing rapidly, very efficient matching algorithms need to be
deployed in modern firewalls to ensure that the firewall. Modern firewalls all use “first
match” ,The firewall rules are numbered from 1 to n, and the firewall applies the policy (e.g.,
pass or drop) associated with the first rule that matches a given packet.

Firewall packet matching is reminiscent of the well-studied packet matching problem.


However, there are several crucial differences which make the problems quite different. First,
unlike firewalls, routers use “longest prefix match” semantics. Therefore, firewalls require
their own special algorithms.
2.SYSTEM SPECIFICATION

2.1 HARDWARE SPECIFICATION

 Operating system : Windows 10

 Coding Language : VB.Net,C#

 Data Base : SQL Server 2005

2.2 SOFTWARE SPECIFICATION

 System : Intel Core 2 Due 2.66 GHz

 Hard Disk : 500 GB

 Monitor : 15 VGA Colour.

 Mouse : Logitech.

 Ram : 1 GB
3.SYSTEM ANALYSIS
3.1 EXISTING SYSTEM

Existing algorithms implement the “longest prefix match” semantics, using several
different approaches. The IPL algorithm, which is based on results, divides the search space
into elementary intervals by different prefixes for each dimension, and finds the best (longest)
match for each such interval. Firewall state fullness is commonly implemented by two
separate search mechanisms

 A slow algorithm that implements the “first match” semantics and compares a
packet to all the rules.
 A fast state lookup mechanism that checked a packet belongs to an existing
open flow. In many firewalls, the slow algorithm is a naive linear search of the
rule-base, while the state lookup mechanism uses a hash-table or a search-tree.
DISADVANTAGES

 There is no secure when the packet sending.


 Firewall not used before.
 Time consuming is high.

3.2 PROPOSED SYSTEM

In the field of computational geometry, proposed an algorithm which solves the point
location problem for n non-overlapping-dimensional hyper-rectangles, with a linear space
requirement and O ((log n) (d−1)) search time. In our case, we have overlapping-dimensional
hyper-rectangles, since firewall rules can, and often do, overlap each other— making rules
overlap is the method firewall administrators use to implement intersection and difference
operations on sets of IP addresses or port numbers. These overlapping hyper-rectangles can
be decomposed into non-overlapping hyper-rectangles however; a moment’s reflection shows
that the number of resulting non-overlapping hyper-rectangles is the worst case complexity
for firewall rules is no better than that of GEM.

ADVANTAGES

 Packet filter firewall supports high speed.


 Packet filter firewall over configurations of simple network works with more
speed.
 The thing behind this is that packet filter firewall has the directly connection
within external hosts & internal users.
 Packet filters take decisions on the basis of the each packets, it doesn't take
decision on the basis of the traffic context.
 An increases the vulnerability over internet.
4.SYSTEM DESIGN AND DEVELOPMENT PROCESS

4.1 INPUT DESIGN

The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those steps
are necessary to put transaction data in to a usable form for processing can be achieved by
inspecting the computer to read data from a written or printed document or it can occur by
having people keying the data directly into the system. The design of input focuses on
controlling the amount of input required, controlling the errors, avoiding delay, avoiding
extra steps and keeping the process simple. The input is designed in such a way so that it
provides security and ease of use with retaining the privacy. Input Design considered the
following things:

 What data should be given as input?


 How the data should be arranged or coded?
 The dialog to guide the operating personnel in providing input.
 Methods for preparing input validations and steps to follow when error
occur.

OBJECTIVES

1. Input Design is the process of converting a user-oriented description of the


input into a computer-based system. This design is important to avoid errors in the data input
process and show the correct direction to the management for getting correct information
from the computerized system.
2.It is achieved by creating user-friendly screens for the data entry to handle
large volume of data. The goal of designing input is to make data entry easier and to be free
from errors. The data entry screen is designed in such a way that all the data manipulates can
be performed. It also provides record viewing facilities.

3. When the data is entered it will check for its validity. Data can be entered
with the help of screens. Appropriate messages are provided as when needed so that the user
will not be in maize of instant. Thus the objective of input design is to create an input layout
that is easy to follow.

4.2 OUTPUT DESIGN

A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are communicated to the
users and to other system through outputs. In output design it is determined how the
information is to be displaced for immediate need and also the hard copy output. It is the most
important and direct source information to the user. Efficient and intelligent output design
improves the system’s relationship to help user decision-making.

1. Designing computer output should proceed in an organized, well thought


out manner; the right output must be developed while ensuring that each output element is
designed so that people will find the system can use easily and effectively. When analysis
design computer output, they should Identify the specific output that is needed to meet the
requirements.

2. Select methods for presenting information.

3. Create document, report, or other formats that contain information produced


by the system.

The output form of an information system should accomplish one or more of


the following objectives.

 Convey information about past activities, current status or projections of


the
 Future.
 Signal important events, opportunities, problems, or warnings.
 Trigger an action.
 Confirm an action.

4.3 DESCRIPTION OF MODULE

1. Firewall Splitting and Matching


2. Encryption module
3. Protection and Detection mode
4. Random Rule Simulation module

Modules Description

1. Firewall Splitting and Matching

In order to test the build time, data structure size and search speed behavior, I
generated rule-bases of sizes from 1000 to 20000 and built the GEM data structure using two
approaches: 2-part heuristic splitting and 3-part heuristic splitting, as described .it shows the
data structure size of the unsplit, 2- part splitting, and 3-part splitting approaches it shows that
both splitting heuristics are very effective in reducing the data structure size. In earlier
simulations I verified that the firewall’s matching speed is largely unaffected by the
distribution of port numbers (both linear search and GEM). There is an extensive literature
dealing with router packet matching, usually called “packet classification”, Thus I believed
that GEM may be a good candidate for use in firewall matching engines.

2. Encryption module
Allows trusted users to access sensitive information while traversing untrusted
networks, it is highly useful for users. The services and users are limited in their tunnel
traffic.

3. Protection and Detection mode module

Easy testing of new rules in a live environment without disrupting the current security
policy is supported. Rule sets are applied by deploying them in Protection mode to enforce
secure behavior, permit or deny traffic and seal web application parameters against
modification. Rule sets are tested by deploying them in Detection mode to evaluate them
against traffic and log actions without enforcing them.

4. Random Rule Simulation module

On one hand, these early simulations showed us that the search itself was indeed very
fast: a single packet match took around 1μsec, since it only required 4 executions of a binary
search in memory. On the other hand, I learned that the data structure size grew rapidly and
that the order of fields had little or no effect on this size. The problem was that since the
ranges in the rules were chosen uniformly, almost every pair of ranges (in every dimension)
had a non-empty intersection. All these intersections produced a very fragmented space
subdivision, and effectively exhibited the worst-case behavior in the data structure size. I
concluded that a more realistic rule model is needed.

4.4 DATABASE DESIGN

Registration Table

Primary key: loginID

Column Data type Size Description


name

Lname Varchar 50 Login Name

LoginID Varchar 50 Log in ID

LPassword Varchar 50 Log In


Password

Date Varchar 50 Date

Mobile Varchar 50 Mobile No

Email Varchar 50 Email ID

Login Type Varchar 50 Login Type

Whoislogin Varchar 50 Whose login

The database design was contains user registration table and that table is stored user
registered details such as Login ID, Login Name, Password, etc., in the admin.

Upload Files Table

Primary key: fileId

Column Data type Size Description


Name

FileID Int 4 File ID

Fname Varchar 50 File Name

Upload files Image File Upload

Extension Varchar 50 Extension of


the file

Path Varchar Max Path of the


file

The table was contains user and admin upload files details such as File Id, File Name,
Path , Upload files etc., stored in the database.

UserSeacrch Table

Foreign key: loginID


Column Data type Size Description
Name

AID Int 4 Admin ID

ReqID Int 4 Request ID

loginID Int 4 Login ID

Username Varchar 50 User Name

Filename Varchar Max File Name

Date Varchar 50 Date

Status Varchar 50 Status

The table was contains user search details such as Admin ID, Request ID, Login ID,
User Name, File Name, Date etc., stored in the database.

Detection Table

Foreign key: fileid

Column Data Type Size Description


Name

UserID Int 4 UserID

FileID Int 4 File ID

WrongKey Varchar MAX Wrong Key

Date Varchar 50 Date

The table was contains user detection details such as User ID, File ID, Wrong Key,
Date stored in the database.
5.TESTING AND IMPLEMENTATION
5.1 SYSTEM TESTING
System testing is the process of exercising software with the intent of finding and
ultimately correcting errors. This fundamental philosophy does not change for web
applications, because web-based systems and applications resides on a network and
interoperate with many different operating systems, browsers, hardware platforms, and
communication protocols, the search for errors represents a significant challenge for web
applications.
The distributed nature of client-server environments, the performance issues
associated with transaction processing, the potential presence of number of different
hardware platform, the complexities of network communications, the need to serve multiple
clients from a centralized database and the requirements imposed on the server all combine to
make testing of client-server architectures.

TESTING ISSUES

 Client GUI considerations


 Target environment and platform diversity considerations
 Distributed database considerations
 Distributed processing considerations

5.2 UNIT TESTING


Unit testing focuses verification effort on the smallest unit or software design module.
Important control paths are tested to uncover errors within the boundary of the module. The
module interface is tested to ensure that information properly flows into and out of the
program unit under test. In this project, the client, server and router modules are tested
individually.

5.3 INTEGRATION TESTING

Integration testing is a systematic technique for constructing the program structure


while conducting tests to Uncover errors associated with interfacing. The objective is to take
unit tested modules and build a program structure that has been dictated by design. All
modules are combined in advance.

The entire program is tested as a whole and shows usually results. Set of errors are
encountered. According to integration testing in the Greedy Routing with Anti-void traversal,
all the modules are integrated and tested for its accuracy.

5.4 VALIDATION TESTING

Software validation is achieved through the series of tests that demonstrate


confirmative with requirement. Thus the proposed system and considerations has been tested
by validation and found to be working satisfactorily. The validation testing is also called as
Beta testing. The Greedy anti-void routing was tested using above specified test.

5.5 OUTPUT TESTING

The user about the format required by them to test the output generated by the system
under considerations. It can be considered in two ways, one on the screen and the other is
printed format. The output format on the screen is found to be correct as the format designed
in the system design. The Greedy Anti-void Routing was tested using above specified test.

5.6 TESTING RESULTS

All tests should be traceable to customer requirements. The focus of testing will shift
progressively from programs. Exhaustive testing is not possible. To be more effective, testing
should be one, which has probability of finding errors. The following are the attributes of
good test:

 A good test has a high probability of finding an error.


 A good test is not redundant.
 A good test should be “best of breeds”.
 A good test should neither too simple nor too complex.
5.7 QUALITY ASSURANCE

Quality assurance consists of auditing and reporting functions of management. The


goal of quality assurance is to provide management with the data necessary to be informed
about product quality, thereby gaining insight and confidence that product quality is meeting
its goal.

5.8 GENERIC RISKS

There are different types of risks. While developing the project there are various risks
and the program developer has to overcome those risks. To overcome the risks, he has to
perform the following steps.

CORRECTNESS

The extent to which the program meets system specifications and user objectives.

RELIABILITY

The degree to which the system performs Intended functions overtime.

EFFICIENCY

`The amount of computer resources required by a program to perform a function.

USABILITY

The effort required learning and operating a system.

MAINTAINABILITY

To use with which program errors are located and corrected.

TESTABILITY

The effort required testing a program to ensure its correct performance.

TEST CASE STATEMENT

BLACK BOX TEST CASE

Test Case Name: Server side

Test Test case Expected Actual Status


Id Descriptio Result Result
n

T1 Browse the Select the Selected Pass


file new file in server file Shown
side

T2 Evaluate Check Check Pass


sum value sum value
calculate calculated and
view

T3 Connect to View new New Pass


client window and window and all
view all client’s clients Shown

T4 Transfer Enter Try to Fail


wrong IP address connect in
client side

T5 Transfer Selected Connect PASS


again correct IP to client side
address and send and send to
again files with
checksum
value

Test Case for USER Register Form

Test
Test Expected Actual
Case Result
Case ID Result Result
Description

1 Enter Password Password Pass


login Name and should be * show in *
Password format method

Enter View the Show the Fail


mail id should error message in error message
2
be @ simple. can not enter @
simple

Enter Enter Alert Pass


the current date register Button Message Shown
and phone no and can be blank
3 “Please
message show in
enter all fields”
“field should be
blank”

Enter Enter all Show pass


submit button fields and then message in
4 submit view “successfully
message box register in user
details”

Search View all Client


files files in client can select the
5 window file request to
admin using
GEM

Test Case Name: client side receive the file

Test Test case Expected Actual Status


Id Description Result Result

T1 Select Selection Select Pass


of receiving path any folder to
receiving path in client side received side

T2 Evaluate Check View in Pass


sum value checksum
calculated and compare
view

T3 Validate Receive Receiv Pass


the correct file in e the file with
client side correct path.

SECURITY TECHNOLOGIES OF POLICIES

Any system developed should be secured and protected against possible hazards.
Security measures are provided to prevent unauthorized access of the database at various
levels. At uninterrupted power supply should be so that the power failures or voltages
fluctuations will not erase the data in the file.

A multi-layered security architecture comprising of firewalls, filtering routers,


encryption and digital certification must be ensured in this project in real time that ordered
and payment details protected from unauthorized access. The customer can access this order
status only by using his customer code and order number.

USER TRAINING

User training is designed to prepare the user for testing and converting
the system. The important user training element is a training demonstration. Live
demonstration with personal contact is extremely effective for training users.

OPERATIONAL DOCUMENTATION
Documentation means of communication; it establishes design and performance
criteria for phases of the project. Documentation is descriptive information that portrays the
use and/or operation of the system. The most crucial stage in achieving a new successful
system and giving confident on the new system for the users that it will work effectively and
efficiently. It involves careful planning, investigation of the current system and its constraints
on implementation, design of methods to achieve the change over. The more complex the
system being implemented, the more involved will be the system’s analysis and design effort
required just for implementation.

5.9 SYSTEM IMPLEMENTATION

Implementation is the stage in the project where the theoretical design is turned a
working system. The most crucial stage is achieving a successful new system and giving the
user confidence in that the new system will work efficiently and effectively in the
implementation stage.

Software design sits at the technical kernel of the software engineering process and is
applied regardless of the development paradigm and area of application. Design is the first
step in the development phase for any engineered product or system. The designer’s goal is to
produce a model or representation of an entity that will later be built. Beginning, once system
requirement have been specified and analyzed, system design is the first of the three technical
activities -design, code and test that is required to build and verify software.

The importance can be stated with a single word “Quality”. Design is the place where
quality is fostered in software development. Design provides us with representations of
software that can assess for quality. Design is the only way that company can accurately
translate a customer’s view into a finished software product or system. Software design
serves as a foundation for all the software engineering steps that follow. Without a strong
design risk building an unstable system – one that will be difficult to test, one whose quality
cannot be assessed until the last stage. During design, progressive refinement of data
structure, program structure, and procedural details are developed reviewed and documented.

Systems design is the process or art of defining the architecture, components,


modules, interfaces, and data for a system to satisfy specified requirements. One could see it
as the application of systems theory to product development. There is some overlap and
synergy with the disciplines of systems analysis, systems architecture and systems
engineering. The protection of computer based a resource that includes hardware, software,
data, procedures and people against unauthorized use or natural. Disaster is known as system
security.

System Security

System Security refers to the technical innovations and procedures applied to the
hardware and operation systems to protect against deliberate or accidental damage from a
defined threat.

Data Security

Data Security is the protection of data from loss, disclosure, modification and
destruction.

System Integrity

System Integrity refers to the power functioning of hardware and programs,


appropriate physical security and safety against external threats such as eavesdropping and
wiretapping.

Privacy

Privacy defines the rights of the user or organizations to determine what information
they are willing to share with or accept from others and how the organization can be protected
against unwelcome, unfair or excessive dissemination of information about it.

Confidentiality

Confidentiality is a special status given to sensitive information in a database to


minimize the possible invasion of privacy. It is an attribute of information that characterizes
its need for protection.

Usability

The effort required learning and operating a system.

Maintainability

To use with which program errors are located and corrected.

Testability
The effort required testing a program to ensure its correct performance.

6. CONCLUSION

This project, proposed firewall packet matching the Geometric Efficient Matching
Algorithm (GEM) is very efficient and practical approach. The packet matching speed is
analyzed on live traffic with the real firewall rule bases. The packet matching speed of the
GEM algorithm is better than that of naive linear search approach which is used in the
existing system. On realistic statistics I have generated the real firewall rule bases, the space
complexity of GEM algorithm is also better. The firewall packet matching GEM algorithm is
a better solution.

7. BIBLIOGRAPHY
 Don Box, with Chris Sells, “Essential. Net”-Third Edition.
 Harold Davis, “Visual Basic.Net for Windows” - Second Edition.
 Steven Holzner,” Visual Basic.Net 2003”, Pearson Education.
 Matt J.Crouch, “VB.Net Web Programming”- corporate Edition.
 G.Andrew Duthie, “Microsoft Visual Basic.Net”- version 2003
 David solution, “Sam Teach Yourself VB 3.0 In 21 Days”, Crimson Publications,
Second Edition, March 2001.
 Elias M.Award, “ System analysis and design” ,Galgotia publishers, Second Edition
(1997).
 Roger S.Pressman, “Software Engineering, A Practioner’s Approach ”, McGraw
Hill international companies, Sixth Edition.
 Shooman, “Software Engineering”, Tata Mc-Graw Hill Publishing Company Pvt
ltd, 1987.
 lee & lee,” introduction system analysis and design”,ncc publications edition –
1996.
WEBSITES REFERRED

http://www.sourcefordgde.com
http://www.patentstorm.us/patents/7124098.htmlhttp://
mktsci.journal.informs.org/cgi/content/abstract/19/1/4
http://www.almaden.ibm.com/software/quest/Resources/
http://www.computer.org/publications/dlib
http://www.ceur-ws.org/Vol-90/
http://www.microsoft.com/isapi/redir.dll?
prd=ie&pver=6&ar=msnhome

8. APPENDICES

EFFICIENT PACKET TRANSMISSION IN WIRELESS SENSOR NETWORK


9. FLOW DIAGRAM

9.1 SYSTEM ARCHITECTURE

The system architecture is performed a streaming mode operation by using very


efficient packet matching algorithms need to be deployed in modern firewalls to ensure that
the firewall. As each packet needs to be checked with each firewall rule to find the matching
rules. ‘Geometric Efficient Matching Algorithm’ is one of the computational geometry
algorithm which gives practically better solution for the purpose of finding the rule which
exactly matches.
9.2 DATA FLOW DIAGRAM

The new user entered and registration need to be approved the new user details are
stored in the register table. This table content is stored in databases and after, the login
process has been completed successfully otherwise, displayed invalid user and performs
relogin process. The user uploads the file with encrypted to admin. When the user wants the
files and sends the file request to admin. The admin views the file request with decrypted files
and sends to user.
9.3 USE CASE DIAGRAM

The user wants and views the files send the request to admin. The admin view the
request and send the secret key through image to user. The user views the files and extracts
the matching key send to admin. After the admin send the packet with encrypted file to
decrypted and download the original file.
9.4 CLASS DIAGRAM

Upload files Registration

int id() int id()


varchar filename() varchar name()
varchar extension varchar username()
image uploadfiles varchar password()
Admin varchar email() User
upload files() varchar phoneno()
usermaintenance()
insert into regigter()

Usersearch Keymaintenance
int auid()
int auid()
int id()
int id()
varchar name()
varchar name()
varchar file()
varchar file()
datetime date()
datetime date()
varchar status()
varchar status()
varchar key()
uploadfiles()
vrchar path()
Registration()
upload files()
Registration()
Usersearch()

A class diagram is contains three rectangles inside. The top rectangle creates a class
name for user and admin required details such as registration, login, upload files, etc. The
middle rectangle contains the attributes of the user and admin required class details. The
lower rectangle contains user and admin process methods such as upload, download, etc. The
methods, also called operations, of the user and admin class. Arrows connect the relationship
between the user and admin.
9.5 ACTIVITY DIAGRAM

Check

Register Login

Admin User

View the files


Upload files
and send request

View the request View the files

Extract
Send secret key the matching key
throug h image

Packet sen ding with Download the files


encryption and timing

An activity diagram is represented by shapes that are connected by arrows. The Black
circles represent an initial process of user login with send an encrypted file to admin. After
the admin send a secret key for used view files to the user. The user extracting the key and
used decrypted with download original file from the admin. The admin process is represent a
circled black circle indicates for end process.
9.6 SEQUENCE DIAGRAM

System Database

Admin User
Login Registration

Upload files View the files


and send request

View the request


and send secret key
Packet sending
with encryption and timing
Extracting the
matching key `

Download files
User maintenance

In a sequence diagram, the user registered required details with used login process.
The login process performed successfully the user wants the files send the request to admin.
The admin view the user request and generate secret key to the user. After the user extracting
the matching key used to decrypt with download original file from the admin. This process
was performed sequentially.
9.7 USER DIAGRAM

User

Admin

The user gets secure data for used firewall to access username, password include login
process. The user sends the request for accessed file from admin. The admin sends the secret
key for used encrypt and decrypt the original file. The user used to secret key and download
the original file through the secure firewall.

10. CODING
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;

namespace Firewall
{
class Class2
{
string constring =
Convert.ToString(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand cmd1, cmd2, c, c1, cmd3;
string id, id1, id2, id3, id4;
int eid, eid1, eid2, eid3, eid4;

public int idgeneration()


{
SqlConnection con = new SqlConnection(constring);
con.Open();
SqlCommand c1;
c1 = new SqlCommand("select max(ID) from Registration", con);
id = Convert.ToString(c1.ExecuteScalar());
if (id == "")
{
eid = 1;
}
else
{
eid = Convert.ToInt16(id);
eid = eid + 1;
}
con.Close();
return eid;
}

public int uploadfileid()


{
SqlConnection con1 = new SqlConnection(constring);
con1.Open();
SqlCommand c1;
c1 = new SqlCommand("select max(fileid) from uploadfiles", con1);
id1 = Convert.ToString(c1.ExecuteScalar());
if (id1 == "")
{
eid1 = 1;
}
else
{
eid1 = Convert.ToInt16(id1);
eid1 = eid1 + 1;
}
con1.Close();
return eid1;
}
public int autoid()
{
SqlConnection con4 = new SqlConnection(constring);
con4.Open();
SqlCommand c5;
c5 = new SqlCommand("select max(autid) from usersearch", con4);
id2 = Convert.ToString(c5.ExecuteScalar());
if (id2 == "")
{
eid2 = 1;
}
else
{
eid2 = Convert.ToInt16(id2);
eid2 = eid2 + 1;
}
con4.Close();
return eid2;
}
public void uploadfile(string fi, string finam, byte[] fibytes, string exe, string
path1)
{

SqlConnection con2 = new SqlConnection(constring);


con2.Open();
int n = finam.Length;
cmd2 = new SqlCommand("insert into uploadfiles values('" + fi + "','" + finam
+ "',@files,'" + exe + "','" + path1 + "')", con2);
cmd2.Parameters.AddWithValue("@files", fibytes);
cmd2.ExecuteNonQuery();
con2.Close();

}
public void usersearch(string auid, string reqid, string usrid, string unam, string
filnm, string dat, string sta)
{
SqlConnection con3 = new SqlConnection(constring);
con3.Open();
cmd3 = new SqlCommand("insert into usersearch values('" + auid + "','" +
reqid + "','" + usrid + "','" + unam + "','" + filnm + "','" + dat + "','Key not send')", con3);
cmd3.ExecuteNonQuery();
con3.Close();
}
public void keymaintain(string aid, string reqid, string usrid, string secretky,
string path, string path1)
{
SqlConnection con4 = new SqlConnection(constring);
con4.Open();
cmd1 = new SqlCommand("insert into keymaintenance values('" + aid + "','" +
reqid + "','" + usrid + "','" + secretky + "','" + path + "','')", con4);
cmd1.ExecuteNonQuery();
con4.Close();
}

}
}
private void Decryptuser_Load(object sender, EventArgs e)
{
button1.Visible = false;
label1.Text = pat1;
}
public Decryptuser(string strTextBox, string strTextBox1, string strTextBox2,
string strTextBox3)
{
InitializeComponent();
re1 = strTextBox;
id1 = strTextBox1;
pat1 = strTextBox2;
aid4 = strTextBox3;
}

private void btnBrowseEncrypted_Click(object sender, EventArgs e)


{

ofdInputImage.InitialDirectory = "C:/";
ofdInputImage.Filter = "Bitmaps|*.bmp";
ofdInputImage.FilterIndex = 0;
//Shows the dialog and interact with the user
if (ofdInputImage.ShowDialog() == DialogResult.OK)
{
pbEncryptedImage.Image = Image.FromFile(ofdInputImage.FileName);
pbEncryptedImage.SizeMode = PictureBoxSizeMode.StretchImage;
pbEncryptedImage.BorderStyle = BorderStyle.Fixed3D;
outputPath = ofdInputImage.FileName;
}

private void btnDecrypt_Click(object sender, EventArgs e)


{
button1.Visible = true;
if (outputPath == pat1)
{
DecryptMessage(outputPath);
MessageBox.Show("Successfully you taken a key!!!!Click verification...");
}
else
{
MessageBox.Show("Invalid!!!Choose given path image...");
}
}
private void DecryptMessage(string DecryptedImagePath)
{
try
{
Stegano newStegano = new Stegano();
message = newStegano.RetriveMessage(DecryptedImagePath);
txtDecryptedMessage.Text = message;
}
catch (Exception)
{
MessageBox.Show("Error Occured While Decrypting Image..", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);

}
}

private void button1_Click(object sender, EventArgs e)


{
verification vs = new verification(txtDecryptedMessage.Text, id1, re1, aid4);
vs.Show();
}

private void tpDecrypt_Click(object sender, EventArgs e)


{

You might also like